From: Didier Pallard <didier.pallard@6wind.com>
To: stable@dpdk.org
Subject: [dpdk-stable] [18.02 2/2] net/vmxnet3: fix Rx offload information in multiseg packets
Date: Mon, 30 Apr 2018 18:28:29 +0200 [thread overview]
Message-ID: <20180430162829.11029-2-didier.pallard@6wind.com> (raw)
In-Reply-To: <20180430162829.11029-1-didier.pallard@6wind.com>
[ backported from upstream commit d08e3c90d4e0a37618a5174c712dee1bf3cb73a3 ]
In case we are working on a multisegment buffer, most bit are set
in last segment of the buffer. Correctly look at those bits in eop part
of the rx_offload function.
Fixes: 2fdd835f992c ("vmxnet3: support jumbo frames")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 23b69cce1029..c08d957fb093 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -656,12 +656,19 @@ vmxnet3_rx_offload(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
/* Offloads set in sop */
if (sop) {
+ } else { /* Offloads set in eop */
/* Check for RSS */
if (rcd->rssType != VMXNET3_RCD_RSS_TYPE_NONE) {
rxm->ol_flags |= PKT_RX_RSS_HASH;
rxm->hash.rss = rcd->rssHash;
}
+ /* Check for hardware stripped VLAN tag */
+ if (rcd->ts) {
+ rxm->ol_flags |= (PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
+ rxm->vlan_tci = rte_le_to_cpu_16((uint16_t)rcd->tci);
+ }
+
/* Check packet type, checksum errors. Only IPv4 for now. */
if (rcd->v4) {
struct ether_hdr *eth = rte_pktmbuf_mtod(rxm, struct ether_hdr *);
@@ -682,12 +689,6 @@ vmxnet3_rx_offload(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
} else {
rxm->packet_type = RTE_PTYPE_UNKNOWN;
}
- } else { /* Offloads set in eop */
- /* Check for hardware stripped VLAN tag */
- if (rcd->ts) {
- rxm->ol_flags |= (PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
- rxm->vlan_tci = rte_le_to_cpu_16((uint16_t)rcd->tci);
- }
}
}
--
2.11.0
next prev parent reply other threads:[~2018-04-30 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 16:28 [dpdk-stable] [18.02 1/2] net/vmxnet3: gather offload data on first and last segment Didier Pallard
2018-04-30 16:28 ` Didier Pallard [this message]
2018-04-30 16:32 ` Luca Boccassi
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=20180430162829.11029-2-didier.pallard@6wind.com \
--to=didier.pallard@6wind.com \
--cc=stable@dpdk.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).