public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Simon Horman <horms@kernel.org>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH v2 net-next 7/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table
Date: Mon, 2 Mar 2026 07:38:51 +0800	[thread overview]
Message-ID: <202603020743.NEL0agrx-lkp@intel.com> (raw)
In-Reply-To: <20260301181457.3539105-8-edumazet@google.com>

Hi Eric,

kernel test robot noticed the following build errors:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/net-add-rps_tag_ptr-type-and-helpers/20260302-021900
base:   net-next/main
patch link:    https://lore.kernel.org/r/20260301181457.3539105-8-edumazet%40google.com
patch subject: [PATCH v2 net-next 7/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260302/202603020743.NEL0agrx-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260302/202603020743.NEL0agrx-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603020743.NEL0agrx-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/core/net-sysfs.c:1104:27: error: call to undeclared function 'RPS_DEV_FLOW_TABLE_SIZE'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1104 |                 if (mask > (ULONG_MAX - RPS_DEV_FLOW_TABLE_SIZE(1))
         |                                         ^
   1 error generated.


vim +/RPS_DEV_FLOW_TABLE_SIZE +1104 net/core/net-sysfs.c

fec5e652e58fa60 Tom Herbert       2010-04-16  1072  
f5acb907dc24c38 Eric Dumazet      2010-04-19  1073  static ssize_t store_rps_dev_flow_table_cnt(struct netdev_rx_queue *queue,
fec5e652e58fa60 Tom Herbert       2010-04-16  1074  					    const char *buf, size_t len)
fec5e652e58fa60 Tom Herbert       2010-04-16  1075  {
5b629854b594cdb Eric Dumazet      2026-03-01  1076  	struct rps_dev_flow *table;
5b629854b594cdb Eric Dumazet      2026-03-01  1077  	rps_tag_ptr otag, tag_ptr = 0UL;
60b778ce5196251 Eric Dumazet      2011-12-24  1078  	unsigned long mask, count;
5b629854b594cdb Eric Dumazet      2026-03-01  1079  	size_t sz;
60b778ce5196251 Eric Dumazet      2011-12-24  1080  	int rc;
fec5e652e58fa60 Tom Herbert       2010-04-16  1081  
fec5e652e58fa60 Tom Herbert       2010-04-16  1082  	if (!capable(CAP_NET_ADMIN))
fec5e652e58fa60 Tom Herbert       2010-04-16  1083  		return -EPERM;
fec5e652e58fa60 Tom Herbert       2010-04-16  1084  
60b778ce5196251 Eric Dumazet      2011-12-24  1085  	rc = kstrtoul(buf, 0, &count);
60b778ce5196251 Eric Dumazet      2011-12-24  1086  	if (rc < 0)
60b778ce5196251 Eric Dumazet      2011-12-24  1087  		return rc;
fec5e652e58fa60 Tom Herbert       2010-04-16  1088  
fec5e652e58fa60 Tom Herbert       2010-04-16  1089  	if (count) {
60b778ce5196251 Eric Dumazet      2011-12-24  1090  		mask = count - 1;
60b778ce5196251 Eric Dumazet      2011-12-24  1091  		/* mask = roundup_pow_of_two(count) - 1;
60b778ce5196251 Eric Dumazet      2011-12-24  1092  		 * without overflows...
60b778ce5196251 Eric Dumazet      2011-12-24  1093  		 */
60b778ce5196251 Eric Dumazet      2011-12-24  1094  		while ((mask | (mask >> 1)) != mask)
60b778ce5196251 Eric Dumazet      2011-12-24  1095  			mask |= (mask >> 1);
60b778ce5196251 Eric Dumazet      2011-12-24  1096  		/* On 64 bit arches, must check mask fits in table->mask (u32),
8e3bff96afa6736 stephen hemminger 2013-12-08  1097  		 * and on 32bit arches, must check
8e3bff96afa6736 stephen hemminger 2013-12-08  1098  		 * RPS_DEV_FLOW_TABLE_SIZE(mask + 1) doesn't overflow.
60b778ce5196251 Eric Dumazet      2011-12-24  1099  		 */
60b778ce5196251 Eric Dumazet      2011-12-24  1100  #if BITS_PER_LONG > 32
60b778ce5196251 Eric Dumazet      2011-12-24  1101  		if (mask > (unsigned long)(u32)mask)
a0a129f8b6cff54 Xi Wang           2011-12-22  1102  			return -EINVAL;
60b778ce5196251 Eric Dumazet      2011-12-24  1103  #else
60b778ce5196251 Eric Dumazet      2011-12-24 @1104  		if (mask > (ULONG_MAX - RPS_DEV_FLOW_TABLE_SIZE(1))
a0a129f8b6cff54 Xi Wang           2011-12-22  1105  				/ sizeof(struct rps_dev_flow)) {
fec5e652e58fa60 Tom Herbert       2010-04-16  1106  			/* Enforce a limit to prevent overflow */
fec5e652e58fa60 Tom Herbert       2010-04-16  1107  			return -EINVAL;
fec5e652e58fa60 Tom Herbert       2010-04-16  1108  		}
60b778ce5196251 Eric Dumazet      2011-12-24  1109  #endif
5b629854b594cdb Eric Dumazet      2026-03-01  1110  		sz = max_t(size_t, sizeof(*table) * (mask + 1),
5b629854b594cdb Eric Dumazet      2026-03-01  1111  			   PAGE_SIZE);
5b629854b594cdb Eric Dumazet      2026-03-01  1112  		if (sz <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER) ||
5b629854b594cdb Eric Dumazet      2026-03-01  1113  		    is_power_of_2(sz))
5b629854b594cdb Eric Dumazet      2026-03-01  1114  			table = kvmalloc(sz, GFP_KERNEL);
5b629854b594cdb Eric Dumazet      2026-03-01  1115  		else
5b629854b594cdb Eric Dumazet      2026-03-01  1116  			table = vmalloc(sz);
fec5e652e58fa60 Tom Herbert       2010-04-16  1117  		if (!table)
fec5e652e58fa60 Tom Herbert       2010-04-16  1118  			return -ENOMEM;
5b629854b594cdb Eric Dumazet      2026-03-01  1119  		tag_ptr = (rps_tag_ptr)table;
5b629854b594cdb Eric Dumazet      2026-03-01  1120  		if (rps_tag_to_log(tag_ptr)) {
5b629854b594cdb Eric Dumazet      2026-03-01  1121  			pr_err_once("store_rps_dev_flow_table_cnt() got a non page aligned allocation.\n");
5b629854b594cdb Eric Dumazet      2026-03-01  1122  			kvfree(table);
5b629854b594cdb Eric Dumazet      2026-03-01  1123  			return -ENOMEM;
5b629854b594cdb Eric Dumazet      2026-03-01  1124  		}
5b629854b594cdb Eric Dumazet      2026-03-01  1125  		tag_ptr |= (ilog2(mask) + 1);
97bcc5b6f45425a Krishna Kumar     2025-08-25  1126  		for (count = 0; count <= mask; count++) {
5b629854b594cdb Eric Dumazet      2026-03-01  1127  			table[count].cpu = RPS_NO_CPU;
5b629854b594cdb Eric Dumazet      2026-03-01  1128  			table[count].filter = RPS_NO_FILTER;
97bcc5b6f45425a Krishna Kumar     2025-08-25  1129  		}
6648c65e7ea72c3 stephen hemminger 2017-08-18  1130  	}
fec5e652e58fa60 Tom Herbert       2010-04-16  1131  
5b629854b594cdb Eric Dumazet      2026-03-01  1132  	otag = xchg(&queue->rps_flow_table, tag_ptr);
5b629854b594cdb Eric Dumazet      2026-03-01  1133  	if (otag)
5b629854b594cdb Eric Dumazet      2026-03-01  1134  		kvfree_rcu_mightsleep(rps_tag_to_table(otag));
fec5e652e58fa60 Tom Herbert       2010-04-16  1135  
fec5e652e58fa60 Tom Herbert       2010-04-16  1136  	return len;
fec5e652e58fa60 Tom Herbert       2010-04-16  1137  }
fec5e652e58fa60 Tom Herbert       2010-04-16  1138  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2026-03-01 23:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-01 18:14 [PATCH v2 net-next 0/7] rfs: use high-order allocations for hash tables Eric Dumazet
2026-03-01 18:14 ` [PATCH v2 net-next 1/7] net: add rps_tag_ptr type and helpers Eric Dumazet
2026-03-01 18:14 ` [PATCH v2 net-next 2/7] net-sysfs: remove rcu field from 'struct rps_sock_flow_table' Eric Dumazet
2026-03-01 18:14 ` [PATCH v2 net-next 3/7] net-sysfs: add rps_sock_flow_table_mask() helper Eric Dumazet
2026-03-01 18:14 ` [PATCH v2 net-next 4/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_sock_flow_table Eric Dumazet
2026-03-01 18:14 ` [PATCH v2 net-next 5/7] net-sysfs: get rid of rps_dev_flow_lock Eric Dumazet
2026-03-01 18:14 ` [PATCH v2 net-next 6/7] net-sysfs: remove rcu field from 'struct rps_dev_flow_table' Eric Dumazet
2026-03-01 18:14 ` [PATCH v2 net-next 7/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table Eric Dumazet
2026-03-01 22:05   ` kernel test robot
2026-03-01 23:38   ` kernel test robot [this message]
2026-03-02  6:02     ` 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=202603020743.NEL0agrx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --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