As HW vlan strip will reduce the packet length by minus length of vlan tag,
so it need restore the packet length by plus it.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
rte_pktmbuf_free(m);
return;
}
- offset = 4;
+
+ /*
+ * HW vlan strip will reduce the packet length
+ * by minus length of vlan tag, so need restore
+ * the packet length by plus it.
+ */
+ offset = VLAN_HLEN;
vlan_tag =
(uint16_t)
vlan_tags[(uint16_t)dev_ll->vdev->dev->device_fh];
len = tx_q->len;
m->ol_flags = PKT_TX_VLAN_PKT;
- /*FIXME: offset*/
+
m->data_len += offset;
+ m->pkt_len += offset;
+
m->vlan_tci = vlan_tag;
tx_q->m_table[len] = m;