diff options
author | Nick Child <[email protected]> | 2022-11-10 15:32:18 -0600 |
---|---|---|
committer | David S. Miller <[email protected]> | 2022-11-14 10:47:07 +0000 |
commit | df8f66d02df7b44516635edbc8c17b1311cfa0d8 (patch) | |
tree | 3a1bccf3406fd5b21789491d0f632bda8c1e3e75 | |
parent | 92125c3a602454824d70edb1b2abb382811cab4f (diff) |
ibmvnic: Update XPS assignments during affinity binding
Transmit Packet Steering (XPS) maps cpu numbers to transmit
queues. By running the same connection on the same set of cpu's,
contention for the queue and cache miss rate can be minimized.
When assigning a cpu mask for a tranmit queues irq number, assign
the same cpu mask as the set of cpu's that XPS should use for that
queue.
Signed-off-by: Thomas Falcon <[email protected]>
Signed-off-by: Dany Madden <[email protected]>
Signed-off-by: Nick Child <[email protected]>
Reviewed-by: Rick Lindsley <[email protected]>
Reviewed-by: Haren Myneni <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 2fc0d50dbb86..e19a6bb3f444 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -279,6 +279,16 @@ static void ibmvnic_set_affinity(struct ibmvnic_adapter *adapter) stride); if (rc) goto out; + + if (!queue) + continue; + + rc = __netif_set_xps_queue(adapter->netdev, + cpumask_bits(queue->affinity_mask), + i, XPS_CPUS); + if (rc) + netdev_warn(adapter->netdev, "%s: Set XPS on queue %d failed, rc = %d.\n", + __func__, i, rc); } for (i = 0; i < num_rxqs; i++) { |