netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: kbuild-all@lists.01.org, netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next 3/4] net: warn if transport header was not set
Date: Tue, 10 May 2022 07:31:13 +0800	[thread overview]
Message-ID: <202205100711.cCKt89Rb-lkp@intel.com> (raw)
In-Reply-To: <20220509190851.1107955-4-eric.dumazet@gmail.com>

Hi Eric,

I love your patch! Yet something to improve:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/net-CONFIG_DEBUG_NET-and-friends/20220510-031145
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 9c095bd0d4c451d31d0fd1131cc09d3b60de815d
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220510/202205100711.cCKt89Rb-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/d316b61f313a417d7dfa97fa006320288f3af150
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Eric-Dumazet/net-CONFIG_DEBUG_NET-and-friends/20220510-031145
        git checkout d316b61f313a417d7dfa97fa006320288f3af150
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash drivers/net/

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

All errors (new ones prefixed by >>):

   In file included from include/linux/skbuff.h:45,
                    from drivers/net/tun.c:44:
   include/net/net_debug.h:6:52: warning: 'struct net_device' declared inside parameter list will not be visible outside of this definition or declaration
       6 | void netdev_printk(const char *level, const struct net_device *dev,
         |                                                    ^~~~~~~~~~
   include/net/net_debug.h:9:32: warning: 'struct net_device' declared inside parameter list will not be visible outside of this definition or declaration
       9 | void netdev_emerg(const struct net_device *dev, const char *format, ...);
         |                                ^~~~~~~~~~
   include/net/net_debug.h:11:32: warning: 'struct net_device' declared inside parameter list will not be visible outside of this definition or declaration
      11 | void netdev_alert(const struct net_device *dev, const char *format, ...);
         |                                ^~~~~~~~~~
   include/net/net_debug.h:13:31: warning: 'struct net_device' declared inside parameter list will not be visible outside of this definition or declaration
      13 | void netdev_crit(const struct net_device *dev, const char *format, ...);
         |                               ^~~~~~~~~~
   include/net/net_debug.h:15:30: warning: 'struct net_device' declared inside parameter list will not be visible outside of this definition or declaration
      15 | void netdev_err(const struct net_device *dev, const char *format, ...);
         |                              ^~~~~~~~~~
   include/net/net_debug.h:17:31: warning: 'struct net_device' declared inside parameter list will not be visible outside of this definition or declaration
      17 | void netdev_warn(const struct net_device *dev, const char *format, ...);
         |                               ^~~~~~~~~~
   include/net/net_debug.h:19:33: warning: 'struct net_device' declared inside parameter list will not be visible outside of this definition or declaration
      19 | void netdev_notice(const struct net_device *dev, const char *format, ...);
         |                                 ^~~~~~~~~~
   include/net/net_debug.h:21:31: warning: 'struct net_device' declared inside parameter list will not be visible outside of this definition or declaration
      21 | void netdev_info(const struct net_device *dev, const char *format, ...);
         |                               ^~~~~~~~~~
   In file included from include/linux/skbuff.h:45,
                    from drivers/net/tun.c:44:
   drivers/net/tun.c: In function 'tun_flow_create':
>> drivers/net/tun.c:380:47: error: passing argument 1 of 'netdev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
     380 |                 netif_info(tun, tx_queued, tun->dev,
         |                                            ~~~^~~~~
         |                                               |
         |                                               struct net_device *
   include/net/net_debug.h:101:32: note: in definition of macro 'netif_level'
     101 |                 netdev_##level(dev, fmt, ##args);               \
         |                                ^~~
   drivers/net/tun.c:380:17: note: in expansion of macro 'netif_info'
     380 |                 netif_info(tun, tx_queued, tun->dev,
         |                 ^~~~~~~~~~
   include/net/net_debug.h:21:43: note: expected 'const struct net_device *' but argument is of type 'struct net_device *'
      21 | void netdev_info(const struct net_device *dev, const char *format, ...);
         |                  ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/tun.c: In function 'tun_flow_delete':
   drivers/net/tun.c:396:39: error: passing argument 1 of 'netdev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
     396 |         netif_info(tun, tx_queued, tun->dev, "delete flow: hash %u index %u\n",
         |                                    ~~~^~~~~
         |                                       |
         |                                       struct net_device *
   include/net/net_debug.h:101:32: note: in definition of macro 'netif_level'
     101 |                 netdev_##level(dev, fmt, ##args);               \
         |                                ^~~
   drivers/net/tun.c:396:9: note: in expansion of macro 'netif_info'
     396 |         netif_info(tun, tx_queued, tun->dev, "delete flow: hash %u index %u\n",
         |         ^~~~~~~~~~
   include/net/net_debug.h:21:43: note: expected 'const struct net_device *' but argument is of type 'struct net_device *'
      21 | void netdev_info(const struct net_device *dev, const char *format, ...);
         |                  ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/tun.c: In function 'tun_net_xmit':
   drivers/net/tun.c:1078:39: error: passing argument 1 of 'netdev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1078 |         netif_info(tun, tx_queued, tun->dev, "%s %d\n", __func__, skb->len);
         |                                    ~~~^~~~~
         |                                       |
         |                                       struct net_device *
   include/net/net_debug.h:101:32: note: in definition of macro 'netif_level'
     101 |                 netdev_##level(dev, fmt, ##args);               \
         |                                ^~~
   drivers/net/tun.c:1078:9: note: in expansion of macro 'netif_info'
    1078 |         netif_info(tun, tx_queued, tun->dev, "%s %d\n", __func__, skb->len);
         |         ^~~~~~~~~~
   include/net/net_debug.h:21:43: note: expected 'const struct net_device *' but argument is of type 'struct net_device *'
      21 | void netdev_info(const struct net_device *dev, const char *format, ...);
         |                  ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/tun.c: In function '__tun_chr_ioctl':
   drivers/net/tun.c:3095:33: error: passing argument 1 of 'netdev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
    3095 |         netif_info(tun, drv, tun->dev, "tun_chr_ioctl cmd %u\n", cmd);
         |                              ~~~^~~~~
         |                                 |
         |                                 struct net_device *
   include/net/net_debug.h:101:32: note: in definition of macro 'netif_level'
     101 |                 netdev_##level(dev, fmt, ##args);               \
         |                                ^~~
   drivers/net/tun.c:3095:9: note: in expansion of macro 'netif_info'
    3095 |         netif_info(tun, drv, tun->dev, "tun_chr_ioctl cmd %u\n", cmd);
         |         ^~~~~~~~~~
   include/net/net_debug.h:21:43: note: expected 'const struct net_device *' but argument is of type 'struct net_device *'
      21 | void netdev_info(const struct net_device *dev, const char *format, ...);
         |                  ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/tun.c:3116:41: error: passing argument 1 of 'netdev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
    3116 |                 netif_info(tun, drv, tun->dev, "ignored: set checksum %s\n",
         |                                      ~~~^~~~~
         |                                         |
         |                                         struct net_device *
   include/net/net_debug.h:101:32: note: in definition of macro 'netif_level'
     101 |                 netdev_##level(dev, fmt, ##args);               \
         |                                ^~~
   drivers/net/tun.c:3116:17: note: in expansion of macro 'netif_info'
    3116 |                 netif_info(tun, drv, tun->dev, "ignored: set checksum %s\n",
         |                 ^~~~~~~~~~
   include/net/net_debug.h:21:43: note: expected 'const struct net_device *' but argument is of type 'struct net_device *'
      21 | void netdev_info(const struct net_device *dev, const char *format, ...);
         |                  ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/tun.c:3135:41: error: passing argument 1 of 'netdev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
    3135 |                 netif_info(tun, drv, tun->dev, "persist %s\n",
         |                                      ~~~^~~~~
         |                                         |
         |                                         struct net_device *
   include/net/net_debug.h:101:32: note: in definition of macro 'netif_level'
     101 |                 netdev_##level(dev, fmt, ##args);               \
         |                                ^~~
   drivers/net/tun.c:3135:17: note: in expansion of macro 'netif_info'
    3135 |                 netif_info(tun, drv, tun->dev, "persist %s\n",
         |                 ^~~~~~~~~~
   include/net/net_debug.h:21:43: note: expected 'const struct net_device *' but argument is of type 'struct net_device *'
      21 | void netdev_info(const struct net_device *dev, const char *format, ...);
         |                  ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/tun.c:3148:41: error: passing argument 1 of 'netdev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
    3148 |                 netif_info(tun, drv, tun->dev, "owner set to %u\n",
         |                                      ~~~^~~~~
         |                                         |
         |                                         struct net_device *
   include/net/net_debug.h:101:32: note: in definition of macro 'netif_level'
     101 |                 netdev_##level(dev, fmt, ##args);               \
         |                                ^~~
   drivers/net/tun.c:3148:17: note: in expansion of macro 'netif_info'
    3148 |                 netif_info(tun, drv, tun->dev, "owner set to %u\n",
         |                 ^~~~~~~~~~
   include/net/net_debug.h:21:43: note: expected 'const struct net_device *' but argument is of type 'struct net_device *'
      21 | void netdev_info(const struct net_device *dev, const char *format, ...);
         |                  ~~~~~~~~~~~~~~~~~~~~~~~~~^~~


vim +/netdev_info +380 drivers/net/tun.c

96442e42429e5f Jason Wang     2012-10-31  372  
96442e42429e5f Jason Wang     2012-10-31  373  static struct tun_flow_entry *tun_flow_create(struct tun_struct *tun,
96442e42429e5f Jason Wang     2012-10-31  374  					      struct hlist_head *head,
96442e42429e5f Jason Wang     2012-10-31  375  					      u32 rxhash, u16 queue_index)
96442e42429e5f Jason Wang     2012-10-31  376  {
9fdc6bef5f1e8b Eric Dumazet   2012-12-21  377  	struct tun_flow_entry *e = kmalloc(sizeof(*e), GFP_ATOMIC);
9fdc6bef5f1e8b Eric Dumazet   2012-12-21  378  
96442e42429e5f Jason Wang     2012-10-31  379  	if (e) {
3424170f37e78c Michal Kubecek 2020-03-04 @380  		netif_info(tun, tx_queued, tun->dev,
3424170f37e78c Michal Kubecek 2020-03-04  381  			   "create flow: hash %u index %u\n",
96442e42429e5f Jason Wang     2012-10-31  382  			   rxhash, queue_index);
96442e42429e5f Jason Wang     2012-10-31  383  		e->updated = jiffies;
96442e42429e5f Jason Wang     2012-10-31  384  		e->rxhash = rxhash;
9bc8893937c836 Tom Herbert    2013-12-22  385  		e->rps_rxhash = 0;
96442e42429e5f Jason Wang     2012-10-31  386  		e->queue_index = queue_index;
96442e42429e5f Jason Wang     2012-10-31  387  		e->tun = tun;
96442e42429e5f Jason Wang     2012-10-31  388  		hlist_add_head_rcu(&e->hash_link, head);
b8732fb7f8920e Jason Wang     2013-01-23  389  		++tun->flow_count;
96442e42429e5f Jason Wang     2012-10-31  390  	}
96442e42429e5f Jason Wang     2012-10-31  391  	return e;
96442e42429e5f Jason Wang     2012-10-31  392  }
96442e42429e5f Jason Wang     2012-10-31  393  

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

  parent reply	other threads:[~2022-05-09 23:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 19:08 [PATCH net-next 0/4] net: CONFIG_DEBUG_NET and friends Eric Dumazet
2022-05-09 19:08 ` [PATCH net-next 1/4] net: add include/net/net_debug.h Eric Dumazet
2022-05-09 19:08 ` [PATCH net-next 2/4] net: add CONFIG_DEBUG_NET Eric Dumazet
2022-05-09 19:08 ` [PATCH net-next 3/4] net: warn if transport header was not set Eric Dumazet
2022-05-09 23:31   ` kernel test robot
2022-05-09 23:52     ` Eric Dumazet
2022-05-10  1:30       ` Jakub Kicinski
2022-05-10  2:11         ` Eric Dumazet
2022-05-10  2:23           ` Jakub Kicinski
2022-05-09 23:31   ` kernel test robot [this message]
2022-05-09 23:51   ` kernel test robot
2022-05-09 19:08 ` [PATCH net-next 4/4] net: remove two BUG() from skb_checksum_help() Eric Dumazet

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=202205100711.cCKt89Rb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).