Commit 73f394e6 authored by Sathya Perla's avatar Sathya Perla Committed by David S. Miller

be2net: setup xps queue mapping

This patch sets up xps queue mapping on load, so that TX traffic is
steered to the queue whose irqs are being processed by the current cpu.
This helps in avoiding TX lock contention.
Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d658d98a
...@@ -2454,8 +2454,9 @@ static void be_tx_queues_destroy(struct be_adapter *adapter) ...@@ -2454,8 +2454,9 @@ static void be_tx_queues_destroy(struct be_adapter *adapter)
static int be_tx_qs_create(struct be_adapter *adapter) static int be_tx_qs_create(struct be_adapter *adapter)
{ {
struct be_queue_info *cq, *eq; struct be_queue_info *cq;
struct be_tx_obj *txo; struct be_tx_obj *txo;
struct be_eq_obj *eqo;
int status, i; int status, i;
adapter->num_tx_qs = min(adapter->num_evt_qs, be_max_txqs(adapter)); adapter->num_tx_qs = min(adapter->num_evt_qs, be_max_txqs(adapter));
...@@ -2473,8 +2474,8 @@ static int be_tx_qs_create(struct be_adapter *adapter) ...@@ -2473,8 +2474,8 @@ static int be_tx_qs_create(struct be_adapter *adapter)
/* If num_evt_qs is less than num_tx_qs, then more than /* If num_evt_qs is less than num_tx_qs, then more than
* one txq share an eq * one txq share an eq
*/ */
eq = &adapter->eq_obj[i % adapter->num_evt_qs].q; eqo = &adapter->eq_obj[i % adapter->num_evt_qs];
status = be_cmd_cq_create(adapter, cq, eq, false, 3); status = be_cmd_cq_create(adapter, cq, &eqo->q, false, 3);
if (status) if (status)
return status; return status;
...@@ -2486,6 +2487,9 @@ static int be_tx_qs_create(struct be_adapter *adapter) ...@@ -2486,6 +2487,9 @@ static int be_tx_qs_create(struct be_adapter *adapter)
status = be_cmd_txq_create(adapter, txo); status = be_cmd_txq_create(adapter, txo);
if (status) if (status)
return status; return status;
netif_set_xps_queue(adapter->netdev, eqo->affinity_mask,
eqo->idx);
} }
dev_info(&adapter->pdev->dev, "created %d TX queue(s)\n", dev_info(&adapter->pdev->dev, "created %d TX queue(s)\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment