public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [Patch net] mlx5: fixup checksum for ethernet padding
Date: Fri, 30 Nov 2018 05:51:05 +0800	[thread overview]
Message-ID: <201811300558.jGZeLgLY%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181127232142.7561-1-xiyou.wangcong@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2214 bytes --]

Hi Cong,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Cong-Wang/mlx5-fixup-checksum-for-ethernet-padding/20181130-014928
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=ia64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/mellanox/mlx5/core/en_rx.c: In function 'mlx5e_csum_padding':
>> drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:740:6: warning: 'pad_offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
     u32 pad_offset, pad_len;
         ^~~~~~~~~~

vim +/pad_offset +740 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c

   734	
   735	static void mlx5e_csum_padding(struct sk_buff *skb, int network_depth,
   736				       __be16 proto, bool has_fcs)
   737	{
   738		u32 frame_len = has_fcs ? skb->len - ETH_FCS_LEN : skb->len;
   739		void *ip_p = skb->data + network_depth;
 > 740		u32 pad_offset, pad_len;
   741		void *pad;
   742	
   743		if (likely(frame_len > ETH_ZLEN))
   744			return;
   745	
   746		if (proto == htons(ETH_P_IP)) {
   747			struct iphdr *ipv4 = ip_p;
   748	
   749			pad_offset =  network_depth + be16_to_cpu(ipv4->tot_len);
   750		} else if (proto == htons(ETH_P_IPV6)) {
   751			struct ipv6hdr *ipv6 = ip_p;
   752	
   753			pad_offset = network_depth + sizeof(struct ipv6hdr) +
   754				     be16_to_cpu(ipv6->payload_len);
   755		}
   756	
   757		pad = skb->data + pad_offset;
   758		pad_len = frame_len - pad_offset;
   759	
   760		skb->csum = csum_block_add(skb->csum, csum_partial(pad, pad_len, 0),
   761					   pad_offset);
   762	}
   763	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52363 bytes --]

      parent reply	other threads:[~2018-11-30  9:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 23:21 [Patch net] mlx5: fixup checksum for ethernet padding Cong Wang
2018-11-27 23:23 ` Cong Wang
2018-11-27 23:48 ` Eric Dumazet
2018-11-28  0:07   ` Cong Wang
2018-11-28  1:11     ` Saeed Mahameed
2018-11-28  1:38       ` Cong Wang
2018-11-28  1:25     ` Eric Dumazet
2018-11-28  1:42       ` Cong Wang
2018-11-28  1:48         ` Eric Dumazet
2018-11-28  1:52           ` Cong Wang
2018-11-29 21:51 ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201811300558.jGZeLgLY%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=edumazet@google.com \
    --cc=kbuild-all@01.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox