Subject: Re: [Intel-wired-lan] [PATCH v4 iwl-net 3/3] ice: stop storing XDP verdict within ice_rx_buf

From: kernel test robot <[email-masked]>
Date: Thu, 23 Jan 2025 03:42:10 +0800

Hi Maciej,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tnguy-net-queue/dev-queue]

url:    https://github.com/intel-lab-lkp/linux/commits/Maciej-Fijalkowski/ice-put-Rx-buffers-after-being-done-with-current-frame/20250122-231406
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue
patch link:    https://lore.kernel.org/r/20250122151046.574061-4-maciej.fijalkowski%40intel.com
patch subject: [Intel-wired-lan] [PATCH v4 iwl-net 3/3] ice: stop storing XDP verdict within ice_rx_buf
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20250123/[email-masked]/config)
compiler: s390-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250123/[email-masked]/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 <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/intel/ice/ice_txrx.c:1140: warning: Function parameter or struct member 'verdict' not described in 'ice_put_rx_mbuf'

vim +1140 drivers/net/ethernet/intel/ice/ice_txrx.c

2b245cb29421ab Anirudh Venkataramanan 2018-03-20  1126  
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1127  /**
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1128   * ice_put_rx_mbuf - ice_put_rx_buf() caller, for all frame frags
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1129   * @rx_ring: Rx ring with all the auxiliary data
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1130   * @xdp: XDP buffer carrying linear + frags part
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1131   * @xdp_xmit: XDP_TX/XDP_REDIRECT verdict storage
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1132   * @ntc: a current next_to_clean value to be stored at rx_ring
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1133   *
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1134   * Walk through gathered fragments and satisfy internal page
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1135   * recycle mechanism; we take here an action related to verdict
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1136   * returned by XDP program;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1137   */
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1138  static void ice_put_rx_mbuf(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp,
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1139  			    u32 *xdp_xmit, u32 ntc, u32 verdict)
bee8fb85c01733 Maciej Fijalkowski     2025-01-22 @1140  {
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1141  	u32 nr_frags = rx_ring->nr_frags + 1;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1142  	u32 idx = rx_ring->first_desc;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1143  	u32 cnt = rx_ring->count;
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1144  	u32 post_xdp_frags = 1;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1145  	struct ice_rx_buf *buf;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1146  	int i;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1147  
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1148  	if (unlikely(xdp_buff_has_frags(xdp)))
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1149  		post_xdp_frags += xdp_get_shared_info_from_buff(xdp)->nr_frags;
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1150  
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1151  	for (i = 0; i < post_xdp_frags; i++) {
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1152  		buf = &rx_ring->rx_buf[idx];
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1153  
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1154  		if (verdict & (ICE_XDP_TX | ICE_XDP_REDIR)) {
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1155  			ice_rx_buf_adjust_pg_offset(buf, xdp->frame_sz);
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1156  			*xdp_xmit |= verdict;
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1157  		} else if (verdict & ICE_XDP_CONSUMED) {
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1158  			buf->pagecnt_bias++;
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1159  		} else if (verdict == ICE_XDP_PASS) {
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1160  			ice_rx_buf_adjust_pg_offset(buf, xdp->frame_sz);
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1161  		}
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1162  
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1163  		ice_put_rx_buf(rx_ring, buf);
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1164  
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1165  		if (++idx == cnt)
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1166  			idx = 0;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1167  	}
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1168  	/* handle buffers that represented frags released by XDP prog;
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1169  	 * for these we keep pagecnt_bias as-is; refcount from struct page
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1170  	 * has been decremented within XDP prog and we do not have to increase
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1171  	 * the biased refcnt
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1172  	 */
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1173  	for (; i < nr_frags; i++) {
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1174  		buf = &rx_ring->rx_buf[idx];
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1175  		ice_put_rx_buf(rx_ring, buf);
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1176  		if (++idx == cnt)
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1177  			idx = 0;
3dab6a1cb7698e Maciej Fijalkowski     2025-01-22  1178  	}
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1179  
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1180  	xdp->data = NULL;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1181  	rx_ring->first_desc = ntc;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1182  	rx_ring->nr_frags = 0;
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1183  }
bee8fb85c01733 Maciej Fijalkowski     2025-01-22  1184  

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