Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sfc: siena: eliminate xdp_rxq_info_valid using XDP base API

Commit d48523cb88e0 ("sfc: Copy shared files needed for Siena (part 2)")
use xdp_rxq_info_valid to track failures of xdp_rxq_info_reg().
However, this driver-maintained state becomes redundant since the XDP
framework already provides xdp_rxq_info_is_reg() for checking registration
status.

Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Link: https://patch.msgid.link/20250628051033.51133-1-wangfushuai@baidu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Fushuai Wang and committed by
Jakub Kicinski
ca899622 58264367

+1 -7
-2
drivers/net/ethernet/sfc/siena/net_driver.h
··· 384 384 * @recycle_count: RX buffer recycle counter. 385 385 * @slow_fill: Timer used to defer efx_nic_generate_fill_event(). 386 386 * @xdp_rxq_info: XDP specific RX queue information. 387 - * @xdp_rxq_info_valid: Is xdp_rxq_info valid data?. 388 387 */ 389 388 struct efx_rx_queue { 390 389 struct efx_nic *efx; ··· 416 417 /* Statistics to supplement MAC stats */ 417 418 unsigned long rx_packets; 418 419 struct xdp_rxq_info xdp_rxq_info; 419 - bool xdp_rxq_info_valid; 420 420 }; 421 421 422 422 enum efx_sync_events_state {
+1 -5
drivers/net/ethernet/sfc/siena/rx_common.c
··· 268 268 "Failure to initialise XDP queue information rc=%d\n", 269 269 rc); 270 270 efx->xdp_rxq_info_failed = true; 271 - } else { 272 - rx_queue->xdp_rxq_info_valid = true; 273 271 } 274 272 275 273 /* Set up RX descriptor ring */ ··· 297 299 298 300 efx_fini_rx_recycle_ring(rx_queue); 299 301 300 - if (rx_queue->xdp_rxq_info_valid) 302 + if (xdp_rxq_info_is_reg(&rx_queue->xdp_rxq_info)) 301 303 xdp_rxq_info_unreg(&rx_queue->xdp_rxq_info); 302 - 303 - rx_queue->xdp_rxq_info_valid = false; 304 304 } 305 305 306 306 void efx_siena_remove_rx_queue(struct efx_rx_queue *rx_queue)