mbox series

[net-next,0/5] sfc: refactor of efx_set_channels

Message ID 20220510084443.14473-1-ihuguet@redhat.com (mailing list archive)
Headers show
Series sfc: refactor of efx_set_channels | expand

Message

Íñigo Huguet May 10, 2022, 8:44 a.m. UTC
The code configuring RX, TX and XDP_TX queues in efx_set_channels was a
bit messy and difficult to follow. Some of my recent changes to add
support for sharing TX queues for XDP when not enough channels are
available contributed even more to this.

This patch series contains no functional changes, but only a refactor to
make that part of the driver's code clearer and easier to maintain.

Since these changes partially undo commit 059a47f1da93 ("net: sfc: add
missing xdp queue reinitialization"), I've specifically tested against
regression of this change.

Tested: receiving packets with iperf3 and with samples/bpf/xdp_rxq_info.
Then increased ring sizes to force their reallocation and repeated the
tests.

Íñigo Huguet (5):
  sfc: add new helper macros to iterate channels by type
  sfc: separate channel->tx_queue and efx->xdp_tx_queue mappings
  sfc: rename set_channels to set_queues and document it
  sfc: refactor efx_set_xdp_tx_queues
  sfc: move tx_channel_offset calculation to interrupts probe

 drivers/net/ethernet/sfc/ef100_netdev.c |   2 +-
 drivers/net/ethernet/sfc/efx.c          |   2 +-
 drivers/net/ethernet/sfc/efx_channels.c | 155 ++++++++++++------------
 drivers/net/ethernet/sfc/efx_channels.h |   2 +-
 drivers/net/ethernet/sfc/net_driver.h   |  21 ++++
 5 files changed, 99 insertions(+), 83 deletions(-)