linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sriram Krishnan <srirakr2@cisco.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	xe-linux-external@cisco.com, Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] AF_PACKET doesnt strip VLAN information
Date: Sun, 19 Jul 2020 13:16:46 +0800	[thread overview]
Message-ID: <202007191353.LOWdVwhL%lkp@intel.com> (raw)
In-Reply-To: <20200718091732.8761-1-srirakr2@cisco.com>

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

Hi Sriram,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hnaz-linux-mm/master]
[also build test WARNING on sparc-next/master linus/master v5.8-rc5 next-20200717]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sriram-Krishnan/AF_PACKET-doesnt-strip-VLAN-information/20200718-172707
base:   https://github.com/hnaz/linux-mm master
config: s390-randconfig-s031-20200719 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-49-g707c5017-dirty
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> net/packet/af_packet.c:1877:52: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [usertype] *vlan_tci @@     got restricted __be16 * @@
>> net/packet/af_packet.c:1877:52: sparse:     expected unsigned short [usertype] *vlan_tci
>> net/packet/af_packet.c:1877:52: sparse:     got restricted __be16 *
>> net/packet/af_packet.c:1881:64: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned short [usertype] vlan_tci @@     got restricted __be16 [addressable] [usertype] vlan_tci @@
   net/packet/af_packet.c:1881:64: sparse:     expected unsigned short [usertype] vlan_tci
>> net/packet/af_packet.c:1881:64: sparse:     got restricted __be16 [addressable] [usertype] vlan_tci

vim +1877 net/packet/af_packet.c

  1859	
  1860	static int packet_parse_headers(struct sk_buff *skb, struct socket *sock)
  1861	{
  1862		if ((!skb->protocol || skb->protocol == htons(ETH_P_ALL)) &&
  1863		    sock->type == SOCK_RAW) {
  1864			__be16 ethertype;
  1865	
  1866			skb_reset_mac_header(skb);
  1867	
  1868			ethertype = eth_hdr(skb)->h_proto;
  1869			/*
  1870			 * If Vlan tag is present in the packet
  1871			 *  move it to skb
  1872			*/
  1873			if (eth_type_vlan(ethertype)) {
  1874				int err;
  1875				__be16 vlan_tci;
  1876	
> 1877				err = __skb_vlan_pop(skb, &vlan_tci);
  1878				if (unlikely(err))
  1879					return err;
  1880	
> 1881				__vlan_hwaccel_put_tag(skb, ethertype, vlan_tci);
  1882			}
  1883	
  1884			skb->protocol = dev_parse_header_protocol(skb);
  1885		}
  1886	
  1887		skb_probe_transport_header(skb);
  1888		return 0;
  1889	}
  1890	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

      parent reply	other threads:[~2020-07-19  5:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18  9:17 [PATCH v2] AF_PACKET doesnt strip VLAN information Sriram Krishnan
2020-07-18 15:58 ` Willem de Bruijn
     [not found]   ` <CY4PR1101MB21013DCD55B754E29AF4A838907B0@CY4PR1101MB2101.namprd11.prod.outlook.com>
2020-07-20 13:52     ` Willem de Bruijn
2020-07-20 17:01       ` Sriram Krishnan (srirakr2)
2020-07-20 20:56       ` Stephen Hemminger
2020-07-20 21:22         ` Willem de Bruijn
2020-07-20 22:03           ` Stephen Hemminger
2020-07-20 23:36         ` David Miller
2020-07-19  5:16 ` kernel 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=202007191353.LOWdVwhL%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=netdev@vger.kernel.org \
    --cc=srirakr2@cisco.com \
    --cc=xe-linux-external@cisco.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;
as well as URLs for NNTP newsgroup(s).