From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 8DD722BF4 for ; Wed, 24 Jan 2018 18:18:41 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 09:18:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,408,1511856000"; d="scan'208";a="29167019" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.48]) ([10.237.220.48]) by orsmga002.jf.intel.com with ESMTP; 24 Jan 2018 09:18:38 -0800 To: John Daley Cc: dev@dpdk.org, Hyong Youb Kim References: <20180123010529.17748-1-johndale@cisco.com> From: Ferruh Yigit Message-ID: Date: Wed, 24 Jan 2018 17:18:37 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180123010529.17748-1-johndale@cisco.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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:18:42 -0000 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. > > Signed-off-by: Hyong Youb Kim > Reviewed-by: John Daley > --- > drivers/net/enic/enic_rxtx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c > index 98902caa0..8157697a0 100644 > --- a/drivers/net/enic/enic_rxtx.c > +++ b/drivers/net/enic/enic_rxtx.c > @@ -185,14 +185,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) 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; > > if (l4_flags == RTE_PTYPE_L4_UDP || >