From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hyong Youb Kim Subject: Re: [PATCH] net/enic: set L4 checksum flags for IPv6 packets Date: Thu, 25 Jan 2018 02:30:30 +0900 Message-ID: <20180124173029.GA476@HYONKIM-FTCPE.cisco.com> References: <20180123010529.17748-1-johndale@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: John Daley , dev@dpdk.org To: Ferruh Yigit Return-path: Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) by dpdk.org (Postfix) with ESMTP id 39A761B16D for ; Wed, 24 Jan 2018 18:30:32 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jan 24, 2018 at 05:18:37PM +0000, Ferruh Yigit wrote: > On 1/23/2018 1:05 AM, John Daley wrote: > > From: Hyong Youb Kim > > > > 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. [...] > > /* 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) > > This looks like conflicting with commit log. > Is pkt_flags intentionally not set for this case? > If so can you update commit log to say only PKT_RX_IP_CKSUM_GOOD set for ipv6? > > > pkt_flags |= PKT_RX_IP_CKSUM_BAD; Yes, it is intentional. IPv6 has no IP header checksum, and PKT_RX_IP_CKSUM_{GOOD,BAD} does not apply. So, the code does not set PKT_RX_IP_CKSUM for IPv6. As the commit log says, for IPv6, we are only setting L4 checksum flags. -Hyong