summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/tx.c
diff options
context:
space:
mode:
authorBen Hutchings2011-01-12 19:39:40 +0100
committerBen Hutchings2011-02-15 20:45:34 +0100
commit60031fcc17057e21566ed34ba23e93fffda1aa27 (patch)
tree820a3b0c418cd3d8664d61e4b36f634f07c59614 /drivers/net/sfc/tx.c
parentnet: Adjust TX queue kobjects if number of queues changes during unregister (diff)
downloadkernel-qcow2-linux-60031fcc17057e21566ed34ba23e93fffda1aa27.tar.gz
kernel-qcow2-linux-60031fcc17057e21566ed34ba23e93fffda1aa27.tar.xz
kernel-qcow2-linux-60031fcc17057e21566ed34ba23e93fffda1aa27.zip
sfc: Move TX queue core queue mapping into tx.c
efx_hard_start_xmit() needs to implement a mapping which is the inverse of tx_queue::core_txq. Move the initialisation of tx_queue::core_txq next to efx_hard_start_xmit() to make the connection more obvious. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/sfc/tx.c')
-rw-r--r--drivers/net/sfc/tx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index 2f5e9da657bf..7e463fb19fb9 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -347,6 +347,13 @@ netdev_tx_t efx_hard_start_xmit(struct sk_buff *skb,
return efx_enqueue_skb(tx_queue, skb);
}
+void efx_init_tx_queue_core_txq(struct efx_tx_queue *tx_queue)
+{
+ /* Must be inverse of queue lookup in efx_hard_start_xmit() */
+ tx_queue->core_txq = netdev_get_tx_queue(
+ tx_queue->efx->net_dev, tx_queue->queue / EFX_TXQ_TYPES);
+}
+
void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
{
unsigned fill_level;