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: 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 net-next 4/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_sock_flow_table
Date: Sat, 28 Feb 2026 16:28:55 +0800	[thread overview]
Message-ID: <202602281655.561YHaO9-lkp@intel.com> (raw)
In-Reply-To: <20260228042503.3726451-5-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/20260228-122855
base:   net-next/main
patch link:    https://lore.kernel.org/r/20260228042503.3726451-5-edumazet%40google.com
patch subject: [PATCH net-next 4/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_sock_flow_table
config: s390-randconfig-001-20260228 (https://download.01.org/0day-ci/archive/20260228/202602281655.561YHaO9-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260228/202602281655.561YHaO9-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/202602281655.561YHaO9-lkp@intel.com/

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

   In file included from net/core/net-sysfs.c:28:
>> include/net/rps.h:64:7: error: flexible array member in a struct with no named members
     u32  ents[];
          ^~~~
   include/net/rps.h: In function 'rps_record_sock_flow':
>> include/net/rps.h:72:15: warning: variable 'index' set but not used [-Wunused-but-set-variable]
     unsigned int index = hash & rps_tag_to_mask(tag_ptr);
                  ^~~~~
   include/net/rps.h: In function '_sock_rps_delete_flow':
   include/net/rps.h:124:12: warning: variable 'index' set but not used [-Wunused-but-set-variable]
     u32 hash, index;
               ^~~~~
--
   In file included from net/core/dev.c:164:
>> include/net/rps.h:64:7: error: flexible array member in a struct with no named members
     u32  ents[];
          ^~~~
   include/net/rps.h: In function 'rps_record_sock_flow':
>> include/net/rps.h:72:15: warning: variable 'index' set but not used [-Wunused-but-set-variable]
     unsigned int index = hash & rps_tag_to_mask(tag_ptr);
                  ^~~~~
   include/net/rps.h: In function '_sock_rps_delete_flow':
   include/net/rps.h:124:12: warning: variable 'index' set but not used [-Wunused-but-set-variable]
     u32 hash, index;
               ^~~~~
   net/core/dev.c: In function 'get_rps_cpu':
>> net/core/dev.c:5116:7: warning: variable 'flow_id' set but not used [-Wunused-but-set-variable]
      u32 flow_id;
          ^~~~~~~


vim +64 include/net/rps.h

    41	
    42	/*
    43	 * The rps_dev_flow_table structure contains a table of flow mappings.
    44	 */
    45	struct rps_dev_flow_table {
    46		u8			log;
    47		struct rcu_head		rcu;
    48		struct rps_dev_flow	flows[];
    49	};
    50	#define RPS_DEV_FLOW_TABLE_SIZE(_num) (sizeof(struct rps_dev_flow_table) + \
    51	    ((_num) * sizeof(struct rps_dev_flow)))
    52	
    53	/*
    54	 * The rps_sock_flow_table contains mappings of flows to the last CPU
    55	 * on which they were processed by the application (set in recvmsg).
    56	 * Each entry is a 32bit value. Upper part is the high-order bits
    57	 * of flow hash, lower part is CPU number.
    58	 * rps_cpu_mask is used to partition the space, depending on number of
    59	 * possible CPUs : rps_cpu_mask = roundup_pow_of_two(nr_cpu_ids) - 1
    60	 * For example, if 64 CPUs are possible, rps_cpu_mask = 0x3f,
    61	 * meaning we use 32-6=26 bits for the hash.
    62	 */
    63	struct rps_sock_flow_table {
  > 64		u32		ents[];
    65	};
    66	#define	RPS_SOCK_FLOW_TABLE_SIZE(_num) (offsetof(struct rps_sock_flow_table, ents[_num]))
    67	
    68	#define RPS_NO_CPU 0xffff
    69	
    70	static inline void rps_record_sock_flow(rps_tag_ptr tag_ptr, u32 hash)
    71	{
  > 72		unsigned int index = hash & rps_tag_to_mask(tag_ptr);
    73		u32 val = hash & ~net_hotdata.rps_cpu_mask;
    74		struct rps_sock_flow_table *table;
    75	
    76		/* We only give a hint, preemption can change CPU under us */
    77		val |= raw_smp_processor_id();
    78	
    79		table = rps_tag_to_table(tag_ptr);
    80		/* The following WRITE_ONCE() is paired with the READ_ONCE()
    81		 * here, and another one in get_rps_cpu().
    82		 */
    83		if (READ_ONCE(table->ents[index]) != val)
    84			WRITE_ONCE(table->ents[index], val);
    85	}
    86	

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

  reply	other threads:[~2026-02-28  8:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28  4:24 [PATCH net-next 0/7] rfs: use high-order allocations for hash tables Eric Dumazet
2026-02-28  4:24 ` [PATCH net-next 1/7] net: add rps_tag_ptr type and helpers Eric Dumazet
2026-02-28  4:24 ` [PATCH net-next 2/7] net-sysfs: remove rcu field from 'struct rps_sock_flow_table' Eric Dumazet
2026-02-28  4:24 ` [PATCH net-next 3/7] net-sysfs: add rps_sock_flow_table_mask() helper Eric Dumazet
2026-02-28  4:25 ` [PATCH net-next 4/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_sock_flow_table Eric Dumazet
2026-02-28  8:28   ` kernel test robot [this message]
2026-02-28  4:25 ` [PATCH net-next 5/7] net-sysfs: get rid of rps_dev_flow_lock Eric Dumazet
2026-02-28  4:25 ` [PATCH net-next 6/7] net-sysfs: remove rcu field from 'struct rps_dev_flow_table' Eric Dumazet
2026-02-28  4:25 ` [PATCH net-next 7/7] net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table Eric Dumazet
2026-02-28 10:03   ` kernel test robot

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=202602281655.561YHaO9-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=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