[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202405290101.PV6Uluyq-lkp@intel.com>
Date: Wed, 29 May 2024 01:44:58 +0800
From: kernel test robot <lkp@...el.com>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
intel-wired-lan@...ts.osuosl.org
Cc: oe-kbuild-all@...ts.linux.dev,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
larysa.zaremba@...el.com, netdev@...r.kernel.org,
michal.kubiak@...el.com, anthony.l.nguyen@...el.com,
magnus.karlsson@...el.com
Subject: Re: [Intel-wired-lan] [PATCH iwl-net 06/11] ice: improve updating
ice_{t, r}x_ring::xsk_pool
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-respect-netif-readiness-in-AF_XDP-ZC-related-ndo-s/20240528-211914
base: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue
patch link: https://lore.kernel.org/r/20240528131429.3012910-7-maciej.fijalkowski%40intel.com
patch subject: [Intel-wired-lan] [PATCH iwl-net 06/11] ice: improve updating ice_{t, r}x_ring::xsk_pool
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240529/202405290101.PV6Uluyq-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240529/202405290101.PV6Uluyq-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405290101.PV6Uluyq-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/intel/ice/ice_xsk.c:476: warning: Function parameter or struct member 'xsk_pool' not described in '__ice_alloc_rx_bufs_zc'
>> drivers/net/ethernet/intel/ice/ice_xsk.c:525: warning: Function parameter or struct member 'xsk_pool' not described in 'ice_alloc_rx_bufs_zc'
>> drivers/net/ethernet/intel/ice/ice_xsk.c:980: warning: Function parameter or struct member 'xsk_pool' not described in 'ice_xmit_pkt'
>> drivers/net/ethernet/intel/ice/ice_xsk.c:1005: warning: Function parameter or struct member 'xsk_pool' not described in 'ice_xmit_pkt_batch'
>> drivers/net/ethernet/intel/ice/ice_xsk.c:1038: warning: Function parameter or struct member 'xsk_pool' not described in 'ice_fill_tx_hw_ring'
vim +476 drivers/net/ethernet/intel/ice/ice_xsk.c
3876ff525de70ae Maciej Fijalkowski 2022-01-25 462
3876ff525de70ae Maciej Fijalkowski 2022-01-25 463 /**
3876ff525de70ae Maciej Fijalkowski 2022-01-25 464 * __ice_alloc_rx_bufs_zc - allocate a number of Rx buffers
3876ff525de70ae Maciej Fijalkowski 2022-01-25 465 * @rx_ring: Rx ring
3876ff525de70ae Maciej Fijalkowski 2022-01-25 466 * @count: The number of buffers to allocate
3876ff525de70ae Maciej Fijalkowski 2022-01-25 467 *
3876ff525de70ae Maciej Fijalkowski 2022-01-25 468 * Place the @count of descriptors onto Rx ring. Handle the ring wrap
3876ff525de70ae Maciej Fijalkowski 2022-01-25 469 * for case where space from next_to_use up to the end of ring is less
3876ff525de70ae Maciej Fijalkowski 2022-01-25 470 * than @count. Finally do a tail bump.
3876ff525de70ae Maciej Fijalkowski 2022-01-25 471 *
3876ff525de70ae Maciej Fijalkowski 2022-01-25 472 * Returns true if all allocations were successful, false if any fail.
3876ff525de70ae Maciej Fijalkowski 2022-01-25 473 */
290b7dad8f9f257 Maciej Fijalkowski 2024-05-28 474 static bool __ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring,
290b7dad8f9f257 Maciej Fijalkowski 2024-05-28 475 struct xsk_buff_pool *xsk_pool, u16 count)
3876ff525de70ae Maciej Fijalkowski 2022-01-25 @476 {
d1fc4c6feac18f8 Maciej Fijalkowski 2022-03-17 477 u32 nb_buffs_extra = 0, nb_buffs = 0;
3876ff525de70ae Maciej Fijalkowski 2022-01-25 478 union ice_32b_rx_flex_desc *rx_desc;
3876ff525de70ae Maciej Fijalkowski 2022-01-25 479 u16 ntu = rx_ring->next_to_use;
3876ff525de70ae Maciej Fijalkowski 2022-01-25 480 u16 total_count = count;
3876ff525de70ae Maciej Fijalkowski 2022-01-25 481 struct xdp_buff **xdp;
3876ff525de70ae Maciej Fijalkowski 2022-01-25 482
3876ff525de70ae Maciej Fijalkowski 2022-01-25 483 rx_desc = ICE_RX_DESC(rx_ring, ntu);
3876ff525de70ae Maciej Fijalkowski 2022-01-25 484 xdp = ice_xdp_buf(rx_ring, ntu);
3876ff525de70ae Maciej Fijalkowski 2022-01-25 485
3876ff525de70ae Maciej Fijalkowski 2022-01-25 486 if (ntu + count >= rx_ring->count) {
290b7dad8f9f257 Maciej Fijalkowski 2024-05-28 487 nb_buffs_extra = ice_fill_rx_descs(xsk_pool, xdp, rx_desc,
3876ff525de70ae Maciej Fijalkowski 2022-01-25 488 rx_ring->count - ntu);
d1fc4c6feac18f8 Maciej Fijalkowski 2022-03-17 489 if (nb_buffs_extra != rx_ring->count - ntu) {
d1fc4c6feac18f8 Maciej Fijalkowski 2022-03-17 490 ntu += nb_buffs_extra;
d1fc4c6feac18f8 Maciej Fijalkowski 2022-03-17 491 goto exit;
d1fc4c6feac18f8 Maciej Fijalkowski 2022-03-17 492 }
3876ff525de70ae Maciej Fijalkowski 2022-01-25 493 rx_desc = ICE_RX_DESC(rx_ring, 0);
3876ff525de70ae Maciej Fijalkowski 2022-01-25 494 xdp = ice_xdp_buf(rx_ring, 0);
3876ff525de70ae Maciej Fijalkowski 2022-01-25 495 ntu = 0;
3876ff525de70ae Maciej Fijalkowski 2022-01-25 496 count -= nb_buffs_extra;
3876ff525de70ae Maciej Fijalkowski 2022-01-25 497 ice_release_rx_desc(rx_ring, 0);
3876ff525de70ae Maciej Fijalkowski 2022-01-25 498 }
3876ff525de70ae Maciej Fijalkowski 2022-01-25 499
290b7dad8f9f257 Maciej Fijalkowski 2024-05-28 500 nb_buffs = ice_fill_rx_descs(xsk_pool, xdp, rx_desc, count);
3876ff525de70ae Maciej Fijalkowski 2022-01-25 501
db804cfc21e969a Magnus Karlsson 2021-09-22 502 ntu += nb_buffs;
8b51a13c37c24c0 Maciej Fijalkowski 2021-12-13 503 if (ntu == rx_ring->count)
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 504 ntu = 0;
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 505
d1fc4c6feac18f8 Maciej Fijalkowski 2022-03-17 506 exit:
3876ff525de70ae Maciej Fijalkowski 2022-01-25 507 if (rx_ring->next_to_use != ntu)
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 508 ice_release_rx_desc(rx_ring, ntu);
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 509
3876ff525de70ae Maciej Fijalkowski 2022-01-25 510 return total_count == (nb_buffs_extra + nb_buffs);
3876ff525de70ae Maciej Fijalkowski 2022-01-25 511 }
3876ff525de70ae Maciej Fijalkowski 2022-01-25 512
3876ff525de70ae Maciej Fijalkowski 2022-01-25 513 /**
3876ff525de70ae Maciej Fijalkowski 2022-01-25 514 * ice_alloc_rx_bufs_zc - allocate a number of Rx buffers
3876ff525de70ae Maciej Fijalkowski 2022-01-25 515 * @rx_ring: Rx ring
3876ff525de70ae Maciej Fijalkowski 2022-01-25 516 * @count: The number of buffers to allocate
3876ff525de70ae Maciej Fijalkowski 2022-01-25 517 *
3876ff525de70ae Maciej Fijalkowski 2022-01-25 518 * Wrapper for internal allocation routine; figure out how many tail
3876ff525de70ae Maciej Fijalkowski 2022-01-25 519 * bumps should take place based on the given threshold
3876ff525de70ae Maciej Fijalkowski 2022-01-25 520 *
3876ff525de70ae Maciej Fijalkowski 2022-01-25 521 * Returns true if all calls to internal alloc routine succeeded
3876ff525de70ae Maciej Fijalkowski 2022-01-25 522 */
290b7dad8f9f257 Maciej Fijalkowski 2024-05-28 523 bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring,
290b7dad8f9f257 Maciej Fijalkowski 2024-05-28 524 struct xsk_buff_pool *xsk_pool, u16 count)
3876ff525de70ae Maciej Fijalkowski 2022-01-25 @525 {
3876ff525de70ae Maciej Fijalkowski 2022-01-25 526 u16 rx_thresh = ICE_RING_QUARTER(rx_ring);
b3056ae2b57858b Maciej Fijalkowski 2022-09-01 527 u16 leftover, i, tail_bumps;
3876ff525de70ae Maciej Fijalkowski 2022-01-25 528
b3056ae2b57858b Maciej Fijalkowski 2022-09-01 529 tail_bumps = count / rx_thresh;
b3056ae2b57858b Maciej Fijalkowski 2022-09-01 530 leftover = count - (tail_bumps * rx_thresh);
3876ff525de70ae Maciej Fijalkowski 2022-01-25 531
3876ff525de70ae Maciej Fijalkowski 2022-01-25 532 for (i = 0; i < tail_bumps; i++)
290b7dad8f9f257 Maciej Fijalkowski 2024-05-28 533 if (!__ice_alloc_rx_bufs_zc(rx_ring, xsk_pool, rx_thresh))
3876ff525de70ae Maciej Fijalkowski 2022-01-25 534 return false;
290b7dad8f9f257 Maciej Fijalkowski 2024-05-28 535 return __ice_alloc_rx_bufs_zc(rx_ring, xsk_pool, leftover);
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 536 }
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 537
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists