lib: fix IPv6 tunnel checksum
When packet is flag of "PKT_TX_OUTER_IPV6", it also need to be
considered to be tunnel case, in order to calculate the correct
csum value.
Fixes: 2b76648872
("net/e1000: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
This commit is contained in:
parent
60da774e6e
commit
ff643f7d02
@ -120,7 +120,8 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
|
||||
struct udp_hdr *udp_hdr;
|
||||
uint64_t inner_l3_offset = m->l2_len;
|
||||
|
||||
if (ol_flags & PKT_TX_OUTER_IP_CKSUM)
|
||||
if ((ol_flags & PKT_TX_OUTER_IP_CKSUM) ||
|
||||
(ol_flags & PKT_TX_OUTER_IPV6))
|
||||
inner_l3_offset += m->outer_l2_len + m->outer_l3_len;
|
||||
|
||||
if ((ol_flags & PKT_TX_UDP_CKSUM) == PKT_TX_UDP_CKSUM) {
|
||||
|
Loading…
Reference in New Issue
Block a user