From: Nick Child <nnac123@linux.ibm.com>
To: netdev@vger.kernel.org
Cc: bjking1@linux.ibm.com, haren@linux.ibm.com, ricklind@us.ibm.com,
Nick Child <nnac123@linux.ibm.com>
Subject: [PATCH net-next] ibmvnic: Assign XPS map to correct queue index
Date: Thu, 23 Feb 2023 09:39:44 -0600 [thread overview]
Message-ID: <20230223153944.44969-1-nnac123@linux.ibm.com> (raw)
When setting the XPS map value for TX queues, use the index of the
transmit queue.
Previously, the function was passing the index of the loop that iterates
over all queues (RX and TX). This was causing invalid XPS map values.
Fixes: 6831582937bd ("ibmvnic: Toggle between queue types in affinity mapping")
Signed-off-by: Nick Child <nnac123@linux.ibm.com>
---
I am a little surprised that __netif_set_xps_queue() did not complain that some
index values were greater than the number of tx queues. Though maybe the function
assumes that the developers are wise enough :)
Should __netif_set_xps_queue() have a check that index < dev->num_tx_queues?
drivers/net/ethernet/ibm/ibmvnic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 146ca1d8031b..c63d3ec9d328 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -296,10 +296,10 @@ static void ibmvnic_set_affinity(struct ibmvnic_adapter *adapter)
rc = __netif_set_xps_queue(adapter->netdev,
cpumask_bits(queue->affinity_mask),
- i, XPS_CPUS);
+ i_txqs - 1, XPS_CPUS);
if (rc)
netdev_warn(adapter->netdev, "%s: Set XPS on queue %d failed, rc = %d.\n",
- __func__, i, rc);
+ __func__, i_txqs - 1, rc);
}
out:
--
2.31.1
next reply other threads:[~2023-02-23 15:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 15:39 Nick Child [this message]
2023-02-24 8:49 ` [PATCH net-next] ibmvnic: Assign XPS map to correct queue index Pavan Chebbi
2023-02-24 16:34 ` Nick Child
2023-02-25 2:36 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230223153944.44969-1-nnac123@linux.ibm.com \
--to=nnac123@linux.ibm.com \
--cc=bjking1@linux.ibm.com \
--cc=haren@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=ricklind@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).