From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from alln-iport-1.cisco.com (alln-iport-1.cisco.com [173.37.142.88]) by dpdk.org (Postfix) with ESMTP id 51C677CEF for ; Wed, 24 Jan 2018 18:48:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1712; q=dns/txt; s=iport; t=1516816107; x=1518025707; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=GrO1YUxMSqxgEkyjLAfGyEhPfrtCwKybQZHig4/ELpI=; b=EXbFGMCJ94FB+mw/yPA0Tv5kWEmys0dk1afLcpAFM1KXvjhYuSBqyHA0 CbwcGxA+PKCjtlwwKuSxkBzxTgbKbJpK1g9l842Lnkp2++HJwvPrDyamt IQDQ7PN/oq6UC3koL4i/stVT9gQAhBZ2dl4B80hg+ybwWz8QeousKtyAa U=; X-IronPort-AV: E=Sophos;i="5.46,408,1511827200"; d="scan'208";a="61104861" Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by alln-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 17:48:26 +0000 Received: from HYONKIM-FTCPE.cisco.com ([10.155.164.9]) by rcdn-core-7.cisco.com (8.14.5/8.14.5) with ESMTP id w0OHmOTp026801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 24 Jan 2018 17:48:26 GMT Date: Thu, 25 Jan 2018 02:48:24 +0900 From: Hyong Youb Kim To: Ferruh Yigit Cc: John Daley , dev@dpdk.org Message-ID: <20180124174824.GA8836@HYONKIM-FTCPE.cisco.com> References: <20180123010529.17748-1-johndale@cisco.com> <20180124173029.GA476@HYONKIM-FTCPE.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Subject: Re: [dpdk-dev] [PATCH] net/enic: set L4 checksum flags for IPv6 packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 17:48:27 -0000 On Wed, Jan 24, 2018 at 05:45:48PM +0000, Ferruh Yigit wrote: > On 1/24/2018 5:30 PM, Hyong Youb Kim wrote: > > 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. > > Ahh, I see. > And I assume enic_cq_rx_desc_ipv4_csum_ok() always false for IPv6. > Yes, that is correct. enic_cq_rx_desc_ipv4_csum_ok() returns true only for IPv4. It is a bit confusing.. -Hyong