summaryrefslogtreecommitdiff
path: root/drivers/net/vmxnet3
diff options
context:
space:
mode:
authorDidier Pallard <didier.pallard@6wind.com>2018-03-28 17:43:45 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-04-27 17:34:41 +0100
commitd08e3c90d4e0a37618a5174c712dee1bf3cb73a3 (patch)
treed7a183a030c03d3211e04027bffe364ce3c17fff /drivers/net/vmxnet3
parent5e5ac26f958f10ef3f1b443ed74c13898cc82e87 (diff)
downloaddpdk-next-eventdev-d08e3c90d4e0a37618a5174c712dee1bf3cb73a3.zip
dpdk-next-eventdev-d08e3c90d4e0a37618a5174c712dee1bf3cb73a3.tar.gz
dpdk-next-eventdev-d08e3c90d4e0a37618a5174c712dee1bf3cb73a3.tar.xz
net/vmxnet3: fix Rx offload information in multiseg packets
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>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_rxtx.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 84f348f..c0dad2d 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);
- }
}
}