public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH v2 net-next 7/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table
       [not found] <20260301181457.3539105-8-edumazet@google.com>
@ 2026-03-01 23:38 ` kernel test robot
  2026-03-02  6:02   ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-03-01 23:38 UTC (permalink / raw)
  To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: llvm, oe-kbuild-all, Simon Horman, Kuniyuki Iwashima, netdev,
	eric.dumazet, Eric Dumazet

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 net-next 7/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table
  2026-03-01 23:38 ` [PATCH v2 net-next 7/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table kernel test robot
@ 2026-03-02  6:02   ` Eric Dumazet
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2026-03-02  6:02 UTC (permalink / raw)
  To: kernel test robot
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, llvm,
	oe-kbuild-all, Simon Horman, Kuniyuki Iwashima, netdev,
	eric.dumazet

On Mon, Mar 2, 2026 at 12:39 AM kernel test robot <lkp@intel.com> wrote:
>
> 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/

Yeah, in V3 I will remove the BITS_PER_LONG distinction, prone to
errors like this one.

 #if BITS_PER_LONG > 32
 ...
#else
  ...
#endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-02  6:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260301181457.3539105-8-edumazet@google.com>
2026-03-01 23:38 ` [PATCH v2 net-next 7/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table kernel test robot
2026-03-02  6:02   ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox