Message ID | 20221110213218.28662-4-nnac123@linux.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Commit | df8f66d02df7b44516635edbc8c17b1311cfa0d8 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ibmvnic: Introduce affinity hint support | expand |
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++) {