linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] AF_PACKET doesnt strip VLAN information
       [not found] <20200718091732.8761-1-srirakr2@cisco.com>
@ 2020-07-19  5:16 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-19  5:16 UTC (permalink / raw)
  To: Sriram Krishnan, Andrew Morton
  Cc: kbuild-all, Linux Memory Management List, xe-linux-external,
	Jakub Kicinski, netdev, linux-kernel

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-19  5:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20200718091732.8761-1-srirakr2@cisco.com>
2020-07-19  5:16 ` [PATCH v2] AF_PACKET doesnt strip VLAN information kernel test robot

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).