Add support to the ipv4/ipv6 pseudo-header function when TSO is enabled in the UDP case, eg PKT_TX_UDP_SEG is set in the mbuf ol_flags
Signed-off-by: Declan Doherty <declan.dohe...@intel.com> Signed-off-by: Radu Nicolau <radu.nico...@intel.com> --- lib/net/rte_ip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h index 05948b69b7..c916ec1b09 100644 --- a/lib/net/rte_ip.h +++ b/lib/net/rte_ip.h @@ -333,7 +333,7 @@ rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags) psd_hdr.dst_addr = ipv4_hdr->dst_addr; psd_hdr.zero = 0; psd_hdr.proto = ipv4_hdr->next_proto_id; - if (ol_flags & PKT_TX_TCP_SEG) { + if (ol_flags & (PKT_TX_TCP_SEG | PKT_TX_UDP_SEG)) { psd_hdr.len = 0; } else { l3_len = rte_be_to_cpu_16(ipv4_hdr->total_length); @@ -474,7 +474,7 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags) } psd_hdr; psd_hdr.proto = (uint32_t)(ipv6_hdr->proto << 24); - if (ol_flags & PKT_TX_TCP_SEG) { + if (ol_flags & (PKT_TX_TCP_SEG | PKT_TX_UDP_SEG)) { psd_hdr.len = 0; } else { psd_hdr.len = ipv6_hdr->payload_len; -- 2.25.1