aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/tx_common.c
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2020-09-11 23:39:02 +0100
committerDavid S. Miller <davem@davemloft.net>2020-09-11 17:15:22 -0700
commit12804793b17c0e19115a90d98f2f3df0cb79e233 (patch)
tree7b52b81c070e246e77a4747d537d7dfd767672b3 /drivers/net/ethernet/sfc/tx_common.c
parentocteontx2-af: Constify npc_kpu_profile_{action,cam} (diff)
downloadlinux-dev-12804793b17c0e19115a90d98f2f3df0cb79e233.tar.xz
linux-dev-12804793b17c0e19115a90d98f2f3df0cb79e233.zip
sfc: decouple TXQ type from label
Make it possible to have an arbitrary mapping from types to labels, because when we add inner-csum-offload TXQs there will no longer be a convenient nesting hierarchy of NIC types (EF10 will have inner-csum TXQs, while Siena will have HIGHPRI). Correct a misleading comment on efx_hard_start_xmit(). Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/tx_common.c')
-rw-r--r--drivers/net/ethernet/sfc/tx_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/tx_common.c b/drivers/net/ethernet/sfc/tx_common.c
index f2dac83beb7d..2feff2ead955 100644
--- a/drivers/net/ethernet/sfc/tx_common.c
+++ b/drivers/net/ethernet/sfc/tx_common.c
@@ -47,11 +47,12 @@ int efx_probe_tx_queue(struct efx_tx_queue *tx_queue)
goto fail1;
}
- /* Allocate hardware ring */
+ /* Allocate hardware ring, determine TXQ type */
rc = efx_nic_probe_tx(tx_queue);
if (rc)
goto fail2;
+ tx_queue->channel->tx_queue_by_type[tx_queue->type] = tx_queue;
return 0;
fail2:
@@ -141,6 +142,7 @@ void efx_remove_tx_queue(struct efx_tx_queue *tx_queue)
kfree(tx_queue->buffer);
tx_queue->buffer = NULL;
+ tx_queue->channel->tx_queue_by_type[tx_queue->type] = NULL;
}
void efx_dequeue_buffer(struct efx_tx_queue *tx_queue,