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: 2fdd835f99
("vmxnet3: support jumbo frames")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
This commit is contained in:
parent
5e5ac26f95
commit
d08e3c90d4
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user