Skip to content

Commit ca89962

Browse files
Fushuai Wangkuba-moo
authored andcommitted
sfc: siena: eliminate xdp_rxq_info_valid using XDP base API
Commit d48523c ("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 <[email protected]> Acked-by: Edward Cree <[email protected]> Reviewed-by: Larysa Zaremba <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5826436 commit ca89962

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

drivers/net/ethernet/sfc/siena/net_driver.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ struct efx_rx_page_state {
384384
* @recycle_count: RX buffer recycle counter.
385385
* @slow_fill: Timer used to defer efx_nic_generate_fill_event().
386386
* @xdp_rxq_info: XDP specific RX queue information.
387-
* @xdp_rxq_info_valid: Is xdp_rxq_info valid data?.
388387
*/
389388
struct efx_rx_queue {
390389
struct efx_nic *efx;
@@ -417,7 +416,6 @@ struct efx_rx_queue {
417416
/* Statistics to supplement MAC stats */
418417
unsigned long rx_packets;
419418
struct xdp_rxq_info xdp_rxq_info;
420-
bool xdp_rxq_info_valid;
421419
};
422420

423421
enum efx_sync_events_state {

drivers/net/ethernet/sfc/siena/rx_common.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,6 @@ void efx_siena_init_rx_queue(struct efx_rx_queue *rx_queue)
268268
"Failure to initialise XDP queue information rc=%d\n",
269269
rc);
270270
efx->xdp_rxq_info_failed = true;
271-
} else {
272-
rx_queue->xdp_rxq_info_valid = true;
273271
}
274272

275273
/* Set up RX descriptor ring */
@@ -299,10 +297,8 @@ void efx_siena_fini_rx_queue(struct efx_rx_queue *rx_queue)
299297

300298
efx_fini_rx_recycle_ring(rx_queue);
301299

302-
if (rx_queue->xdp_rxq_info_valid)
300+
if (xdp_rxq_info_is_reg(&rx_queue->xdp_rxq_info))
303301
xdp_rxq_info_unreg(&rx_queue->xdp_rxq_info);
304-
305-
rx_queue->xdp_rxq_info_valid = false;
306302
}
307303

308304
void efx_siena_remove_rx_queue(struct efx_rx_queue *rx_queue)

0 commit comments

Comments
 (0)