public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel•com>
To: Jonas Bonn <jonas@norrbonn•se>, netdev@vger•kernel.org
Cc: kbuild-all@lists•01.org, clang-built-linux@googlegroups•com,
	pablo@netfilter•org, laforge@gnumonks•org,
	Jonas Bonn <jonas@norrbonn•se>
Subject: Re: [PATCH net-next v2 12/12] gtp: add dst_cache to tunnels
Date: Sat, 12 Dec 2020 01:25:57 +0800	[thread overview]
Message-ID: <202012120122.2HjKvTAN-lkp@intel.com> (raw)
In-Reply-To: <20201211122612.869225-13-jonas@norrbonn.se>

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

Hi Jonas,

I love your patch! Yet something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Jonas-Bonn/gtp-IPv6-support/20201211-203639
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 91163f82143630a9629a8bf0227d49173697c69c
config: mips-randconfig-r026-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5ff35356f1af2bb92785b38c657463924d9ec386)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://github.com/0day-ci/linux/commit/a8ea47bc0c1903be018f4d566bb96146c156ddce
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jonas-Bonn/gtp-IPv6-support/20201211-203639
        git checkout a8ea47bc0c1903be018f4d566bb96146c156ddce
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

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

All error/warnings (new ones prefixed by >>):

   drivers/net/gtp.c:471:2: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (!ptype)
           ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/gtp.c:482:9: note: uninitialized use occurs here
           return err;
                  ^~~
   drivers/net/gtp.c:471:2: note: remove the 'if' if its condition is always false
           if (!ptype)
           ^~~~~~~~~~~
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/net/gtp.c:465:2: warning: variable 'err' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
           default:
           ^~~~~~~
   drivers/net/gtp.c:482:9: note: uninitialized use occurs here
           return err;
                  ^~~
   drivers/net/gtp.c:441:9: note: initialize the variable 'err' to silence this warning
           int err;
                  ^
                   = 0
>> drivers/net/gtp.c:627:8: error: implicit declaration of function 'dst_cache_get_ip6' [-Werror,-Wimplicit-function-declaration]
           dst = dst_cache_get_ip6(dst_cache, saddr);
                 ^
   drivers/net/gtp.c:627:8: note: did you mean 'dst_cache_get_ip4'?
   include/net/dst_cache.h:33:16: note: 'dst_cache_get_ip4' declared here
   struct rtable *dst_cache_get_ip4(struct dst_cache *dst_cache, __be32 *saddr);
                  ^
>> drivers/net/gtp.c:627:6: warning: incompatible integer to pointer conversion assigning to 'struct dst_entry *' from 'int' [-Wint-conversion]
           dst = dst_cache_get_ip6(dst_cache, saddr);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/gtp.c:649:2: error: implicit declaration of function 'dst_cache_set_ip6' [-Werror,-Wimplicit-function-declaration]
           dst_cache_set_ip6(dst_cache, dst, saddr);
           ^
   3 warnings and 2 errors generated.

vim +/dst_cache_get_ip6 +627 drivers/net/gtp.c

   615	
   616	static struct dst_entry *gtp_get_v6_dst(struct sk_buff *skb,
   617						struct net_device *dev,
   618						struct pdp_ctx *pctx,
   619						struct in6_addr *saddr)
   620	{
   621		const struct sock *sk = pctx->sk;
   622		struct dst_entry *dst = NULL;
   623		struct dst_cache *dst_cache;
   624		struct flowi6 fl6;
   625	
   626		dst_cache = (struct dst_cache *)&pctx->dst_cache;
 > 627		dst = dst_cache_get_ip6(dst_cache, saddr);
   628		if (dst)
   629			return dst;
   630	
   631		memset(&fl6, 0, sizeof(fl6));
   632		fl6.flowi6_mark = skb->mark;
   633		fl6.flowi6_proto = IPPROTO_UDP;
   634		fl6.daddr = pctx->peer_addr;
   635	
   636		dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sk), sk, &fl6, NULL);
   637		if (IS_ERR(dst)) {
   638			netdev_dbg(pctx->dev, "no route to %pI6\n", &fl6.daddr);
   639			return ERR_PTR(-ENETUNREACH);
   640		}
   641		if (dst->dev == pctx->dev) {
   642			netdev_dbg(pctx->dev, "circular route to %pI6\n", &fl6.daddr);
   643			dst_release(dst);
   644			return ERR_PTR(-ELOOP);
   645		}
   646	
   647		*saddr = fl6.saddr;
   648	
 > 649		dst_cache_set_ip6(dst_cache, dst, saddr);
   650	
   651		return dst;
   652	}
   653	

---
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: 26882 bytes --]

      reply	other threads:[~2020-12-11 19:12 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 12:26 [PATCH net-next v2 00/12] gtp: IPv6 support Jonas Bonn
2020-12-11 12:26 ` [PATCH net-next v2 01/12] gtp: set initial MTU Jonas Bonn
2020-12-12  9:38   ` Harald Welte
2020-12-11 12:26 ` [PATCH net-next v2 02/12] gtp: include role in link info Jonas Bonn
2020-12-12  9:40   ` Harald Welte
2020-12-11 12:26 ` [PATCH net-next v2 03/12] gtp: really check namespaces before xmit Jonas Bonn
2020-12-12  9:41   ` Harald Welte
2020-12-11 12:26 ` [PATCH net-next v2 04/12] gtp: drop unnecessary call to skb_dst_drop Jonas Bonn
2020-12-12  9:50   ` Harald Welte
2020-12-12 11:38     ` Jonas Bonn
2020-12-11 12:26 ` [PATCH net-next v2 05/12] gtp: set device type Jonas Bonn
2020-12-12  9:51   ` Harald Welte
2020-12-11 12:26 ` [PATCH net-next v2 06/12] gtp: rework IPv4 functionality Jonas Bonn
2020-12-11 12:26 ` [PATCH net-next v2 07/12] gtp: use ephemeral source port Jonas Bonn
2020-12-12  5:35   ` Pravin Shelar
2020-12-12  7:49     ` Jonas Bonn
2020-12-12 10:07   ` Harald Welte
2020-12-12 13:40     ` Jonas Bonn
2020-12-11 12:26 ` [PATCH net-next v2 08/12] gtp: set dev features to enable GSO Jonas Bonn
2020-12-12  5:31   ` Pravin Shelar
2020-12-12  7:50     ` Jonas Bonn
2020-12-13 18:25       ` Pravin Shelar
2020-12-11 12:26 ` [PATCH net-next v2 09/12] gtp: support GRO Jonas Bonn
2020-12-11 15:43   ` kernel test robot
2020-12-11 12:26 ` [PATCH net-next v2 10/12] gtp: add IPv6 support Jonas Bonn
2020-12-12  5:51   ` Pravin Shelar
2020-12-12  7:05     ` Jonas Bonn
2020-12-12 11:05       ` Harald Welte
2020-12-12 11:22   ` Harald Welte
2020-12-12 13:59     ` Jonas Bonn
2020-12-11 12:26 ` [PATCH net-next v2 11/12] gtp: netlink update for ipv6 Jonas Bonn
2020-12-12 11:25   ` Harald Welte
2020-12-11 12:26 ` [PATCH net-next v2 12/12] gtp: add dst_cache to tunnels Jonas Bonn
2020-12-11 17:25   ` 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=202012120122.2HjKvTAN-lkp@intel.com \
    --to=lkp@intel$(echo .)com \
    --cc=clang-built-linux@googlegroups$(echo .)com \
    --cc=jonas@norrbonn$(echo .)se \
    --cc=kbuild-all@lists$(echo .)01.org \
    --cc=laforge@gnumonks$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pablo@netfilter$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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