netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Anton Makarov <antonmakarov11235@gmail.com>,
	davem@davemloft.net, netdev@vger.kernel.org,
	david.lebrun@uclouvain.be, kuba@kernel.org
Cc: kbuild-all@lists.01.org, Anton Makarov <anton.makarov11235@gmail.com>
Subject: Re: [net-next 1/1] net: seg6: Add support for SRv6 Headend Reduced Encapsulation
Date: Fri, 10 Jun 2022 08:52:49 +0800	[thread overview]
Message-ID: <202206100834.gCKYSSPQ-lkp@intel.com> (raw)
In-Reply-To: <20220608112646.9331-1-anton.makarov11235@gmail.com>

Hi Anton,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Anton-Makarov/net-seg6-Add-support-for-SRv6-Headend-Reduced-Encapsulation/20220608-193600
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git da6e113ff010815fdd21ee1e9af2e8d179a2680f
config: parisc-randconfig-s032-20220608 (https://download.01.org/0day-ci/archive/20220610/202206100834.gCKYSSPQ-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.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.4-26-gb3cf30ba-dirty
        # https://github.com/intel-lab-lkp/linux/commit/16ea0251e14bdf1f5dea8a1a90318df7aac69038
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Anton-Makarov/net-seg6-Add-support-for-SRv6-Headend-Reduced-Encapsulation/20220608-193600
        git checkout 16ea0251e14bdf1f5dea8a1a90318df7aac69038
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=parisc SHELL=/bin/bash net/ipv6/

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


sparse warnings: (new ones prefixed by >>)
>> net/ipv6/seg6_iptunnel.c:237:56: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted __be32 [usertype] flowinfo @@     got unsigned char [usertype] tos @@
   net/ipv6/seg6_iptunnel.c:237:56: sparse:     expected restricted __be32 [usertype] flowinfo
   net/ipv6/seg6_iptunnel.c:237:56: sparse:     got unsigned char [usertype] tos

vim +237 net/ipv6/seg6_iptunnel.c

   199	
   200	/* encapsulate an IPv6 packet within an outer IPv6 header with reduced SRH */
   201	int seg6_do_srh_encap_red(struct sk_buff *skb, struct ipv6_sr_hdr *osrh, int proto)
   202	{
   203		struct dst_entry *dst = skb_dst(skb);
   204		struct net *net = dev_net(dst->dev);
   205		struct ipv6hdr *hdr, *inner_hdr6;
   206		struct iphdr *inner_hdr4;
   207		struct ipv6_sr_hdr *isrh;
   208		int hdrlen = 0, tot_len, err;
   209		__be32 flowlabel = 0;
   210	
   211		if (osrh->first_segment > 0)
   212			hdrlen = (osrh->hdrlen - 1) << 3;
   213	
   214		tot_len = hdrlen + sizeof(struct ipv6hdr);
   215	
   216		err = skb_cow_head(skb, tot_len + skb->mac_len);
   217		if (unlikely(err))
   218			return err;
   219	
   220		inner_hdr6 = ipv6_hdr(skb);
   221		inner_hdr4 = ip_hdr(skb);
   222		flowlabel = seg6_make_flowlabel(net, skb, inner_hdr6);
   223	
   224		skb_push(skb, tot_len);
   225		skb_reset_network_header(skb);
   226		skb_mac_header_rebuild(skb);
   227		hdr = ipv6_hdr(skb);
   228	
   229		memset(skb->cb, 0, 48);
   230		IP6CB(skb)->iif = skb->skb_iif;
   231	
   232		if (skb->protocol == htons(ETH_P_IPV6)) {
   233			ip6_flow_hdr(hdr, ip6_tclass(ip6_flowinfo(inner_hdr6)),
   234				     flowlabel);
   235			hdr->hop_limit = inner_hdr6->hop_limit;
   236		} else if (skb->protocol == htons(ETH_P_IP)) {
 > 237			ip6_flow_hdr(hdr, ip6_tclass(inner_hdr4->tos), flowlabel);
   238			hdr->hop_limit = inner_hdr4->ttl;
   239		}
   240	
   241		skb->protocol = htons(ETH_P_IPV6);
   242	
   243		hdr->daddr = osrh->segments[osrh->first_segment];
   244		hdr->version = 6;
   245	
   246		if (osrh->first_segment > 0) {
   247			hdr->nexthdr = NEXTHDR_ROUTING;
   248	
   249			isrh = (void *)hdr + sizeof(struct ipv6hdr);
   250			memcpy(isrh, osrh, hdrlen);
   251	
   252			isrh->nexthdr = proto;
   253			isrh->first_segment--;
   254			isrh->hdrlen -= 2;
   255		} else {
   256			hdr->nexthdr = proto;
   257		}
   258	
   259		set_tun_src(net, dst->dev, &hdr->daddr, &hdr->saddr);
   260	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

      parent reply	other threads:[~2022-06-10  0:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 11:26 [net-next 1/1] net: seg6: Add support for SRv6 Headend Reduced Encapsulation Anton Makarov
2022-06-09  3:45 ` Jakub Kicinski
2022-06-10  0:52 ` 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=202206100834.gCKYSSPQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anton.makarov11235@gmail.com \
    --cc=antonmakarov11235@gmail.com \
    --cc=davem@davemloft.net \
    --cc=david.lebrun@uclouvain.be \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).