From: Hyong Youb Kim Date: Tue, 23 Jan 2018 01:05:27 +0000 (-0800) Subject: net/enic: set L4 checksum flags for IPv6 packets X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d26ddeaf1120e525f72e79546aa9d7164502f1d7;p=dpdk.git net/enic: set L4 checksum flags for IPv6 packets enic_cq_rx_to_pkt_flags() currently sets checksum good/bad flags only for IPv4. The hardware actually validates the TCP/UDP checksum of IPv6 packets too. Set PKT_RX_L4_CKSUM_{GOOD,BAD} accordingly. Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 5b743eb325..2fe5a3fa3d 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -195,14 +195,14 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf) } /* checksum flags */ - if (mbuf->packet_type & RTE_PTYPE_L3_IPV4) { + if (mbuf->packet_type & (RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L3_IPV6)) { if (!enic_cq_rx_desc_csum_not_calc(cqrd)) { uint32_t l4_flags; l4_flags = mbuf->packet_type & RTE_PTYPE_L4_MASK; if (enic_cq_rx_desc_ipv4_csum_ok(cqrd)) pkt_flags |= PKT_RX_IP_CKSUM_GOOD; - else + else if (mbuf->packet_type & RTE_PTYPE_L3_IPV4) pkt_flags |= PKT_RX_IP_CKSUM_BAD; if (l4_flags == RTE_PTYPE_L4_UDP ||