From: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Cc: qemu-devel@nongnu.org, "Akihiko Odaki" <akihiko.odaki@daynix.com>,
"Jason Wang" <jasowang@redhat.com>,
"Dmitry Fleytman" <dmitry.fleytman@gmail.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Sriram Yagnaraman" <sriram.yagnaraman@est.tech>
Subject: [PATCH v10 6/8] igb: respect E1000_VMOLR_RSSE
Date: Fri, 24 Mar 2023 16:34:59 +0100 [thread overview]
Message-ID: <20230324153501.20695-7-sriram.yagnaraman@est.tech> (raw)
In-Reply-To: <20230324153501.20695-1-sriram.yagnaraman@est.tech>
RSS for VFs is only enabled if VMOLR[n].RSSE is set.
Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
---
hw/net/igb_core.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c
index 38aa4596b1..fd61c6c550 100644
--- a/hw/net/igb_core.c
+++ b/hw/net/igb_core.c
@@ -1057,8 +1057,15 @@ static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr,
if (queues) {
igb_rss_parse_packet(core, core->rx_pkt,
external_tx != NULL, rss_info);
+ /* Sec 8.26.1: PQn = VFn + VQn*8 */
if (rss_info->queue & 1) {
- queues <<= 8;
+ for (i = 0; i < IGB_NUM_VM_POOLS; i++) {
+ if ((queues & BIT(i)) &&
+ (core->mac[VMOLR0 + i] & E1000_VMOLR_RSSE)) {
+ queues |= BIT(i + IGB_NUM_VM_POOLS);
+ queues &= ~BIT(i);
+ }
+ }
}
}
} else {
--
2.34.1
next prev parent reply other threads:[~2023-03-24 18:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 15:34 [PATCH v10 0/8] igb: merge changes from <20221229190817.25500-1-sriram.yagnaraman@est.tech> Sriram Yagnaraman
2023-03-24 15:34 ` [PATCH v10 1/8] MAINTAINERS: Add Sriram Yagnaraman as a igb reviewer Sriram Yagnaraman
2023-03-24 15:34 ` [PATCH v10 2/8] igb: handle PF/VF reset properly Sriram Yagnaraman
2023-03-24 15:34 ` [PATCH v10 3/8] igb: add ICR_RXDW Sriram Yagnaraman
2023-03-24 15:34 ` [PATCH v10 4/8] igb: implement VFRE and VFTE registers Sriram Yagnaraman
2023-03-24 15:34 ` [PATCH v10 5/8] igb: check oversized packets for VMDq Sriram Yagnaraman
2023-03-24 15:34 ` Sriram Yagnaraman [this message]
2023-03-24 15:35 ` [PATCH v10 7/8] igb: implement VF Tx and Rx stats Sriram Yagnaraman
2023-03-24 15:35 ` [PATCH v10 8/8] igb: respect VMVIR and VMOLR for VLAN Sriram Yagnaraman
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=20230324153501.20695-7-sriram.yagnaraman@est.tech \
--to=sriram.yagnaraman@est.tech \
--cc=akihiko.odaki@daynix.com \
--cc=dmitry.fleytman@gmail.com \
--cc=jasowang@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).