From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 229D5A04FF; Wed, 4 May 2022 17:08:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBC4E40C35; Wed, 4 May 2022 17:08:02 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 359584069F for ; Wed, 4 May 2022 17:08:01 +0200 (CEST) Received: from [192.168.108.214] (unknown [188.170.87.12]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 4033282; Wed, 4 May 2022 18:08:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 4033282 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1651676880; bh=SYl6S7ax/Ti+Yg/yyyLpNRv7fiTavu0qldYRNQDmsZo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ZMyiOLUwVwzSdyHEYl/zW59MUwsvcruYCzB4gGrx7BJoBBpJwcxkyFxMSIikQm2vm wkCVmpiNmVopB1yl/hbbOlNhx1IJDymRUD31pbTqkpj1XE0wDKMMC8azS6WsPy83Dr C+5ZfUsjiyauoYMCJpJqevOD1Dgi0uaCHrEW3Ljo= Message-ID: <9cec61d7-15f0-0272-7ba4-f87b5634d276@oktetlabs.ru> Date: Wed, 4 May 2022 18:07:59 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH 7/8] vmxnet3: Set packet for fragmented packet Content-Language: en-US To: Pankaj Gupta , jbehrens@vmware.com, yongwang@vmware.com Cc: dev@dpdk.org References: <20220503042257.15626-1-pagupta@vmware.com> <20220503042257.15626-8-pagupta@vmware.com> From: Andrew Rybchenko In-Reply-To: <20220503042257.15626-8-pagupta@vmware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 5/3/22 07:22, Pankaj Gupta wrote: > The packet type is set even if it is a fragmented packet I'm wondering if is really IPv4/IPv6 fragmented packets or just scattered on Rx across many Rx buffers. I'm asking since fragmented sounds weird with TCP, since TCP spec forbids fragmentation. > > Tested, using testpmd, for different hardware versions on > ESXi 7.0 Update 2. > > Signed-off-by: Pankaj Gupta > --- > drivers/net/vmxnet3/vmxnet3_rxtx.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c > index a6665fbf70..5e177400c0 100644 > --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c > +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c > @@ -759,6 +759,23 @@ vmxnet3_rx_offload(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd, > /* Check packet type, checksum errors, etc. */ > if (rcd->cnc) { > ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN; > + > + if (rcd->v4) { > + packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN; > + if (rcd->tcp) > + packet_type |= RTE_PTYPE_L4_TCP; > + else if (rcd->udp) > + packet_type |= RTE_PTYPE_L4_UDP; > + } else if (rcd->v6) { > + packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN; > + if (rcd->tcp) > + packet_type |= RTE_PTYPE_L4_TCP; > + else if (rcd->udp) > + packet_type |= RTE_PTYPE_L4_UDP; > + } else { > + packet_type |= RTE_PTYPE_UNKNOWN; > + } > + > } else { > if (rcd->v4) { > packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;