From: Didier Pallard <didier.pallard@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 4/8] net/vmxnet3: fix Rx offload information in multiseg packets
Date: Wed, 28 Mar 2018 17:43:45 +0200 [thread overview]
Message-ID: <20180328154349.24976-5-didier.pallard@6wind.com> (raw)
In-Reply-To: <20180328154349.24976-1-didier.pallard@6wind.com>
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")
Signed-off-by: Didier Pallard <didier.pallard@6wind.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 27f17ef0a..1acd6c19e 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) {
rxm->packet_type = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
@@ -676,12 +683,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-03-28 15:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 15:43 [dpdk-dev] [PATCH 0/8] net/vmxnet3: fix offload issues Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 1/8] net: export IPv6 header extensions skip function Didier Pallard
2018-04-17 19:28 ` Ferruh Yigit
2018-04-23 8:35 ` Olivier Matz
2018-03-28 15:43 ` [dpdk-dev] [PATCH 2/8] net/vmxnet3: return unknown IPv4 extension len ptype Didier Pallard
2018-04-16 19:46 ` Yong Wang
2018-04-17 9:09 ` Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 3/8] net/vmxnet3: gather offload data on first and last segment Didier Pallard
2018-03-28 15:43 ` Didier Pallard [this message]
2018-03-28 15:43 ` [dpdk-dev] [PATCH 5/8] net/vmxnet3: complete Rx offloads support Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 6/8] net/vmxnet3: guess mss if not provided in LRO mode Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 7/8] net/vmxnet3: ignore emtpy segments in reception Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 8/8] net/vmxnet3: skip empty segments in transmission Didier Pallard
2018-04-13 4:44 ` [dpdk-dev] [PATCH 0/8] net/vmxnet3: fix offload issues Yong Wang
2018-04-13 14:33 ` Didier Pallard
2018-04-20 22:02 ` Yong Wang
2018-04-23 14:46 ` Ferruh Yigit
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=20180328154349.24976-5-didier.pallard@6wind.com \
--to=didier.pallard@6wind.com \
--cc=dev@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).