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 14B91A054A; Tue, 25 Oct 2022 11:57:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05186427FF; Tue, 25 Oct 2022 11:57:20 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 6FA0D41143 for ; Tue, 25 Oct 2022 11:57:18 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 0DC405E; Tue, 25 Oct 2022 12:57:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 0DC405E DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1666691838; bh=EKqoyggA8oA1nGE+natuY2dI3G16imVYBJjb/Ti9sY4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=tFgIrD0/pP77u1vsalLAPRMhD/HtPmytFBARnEy5E/7jEHr+mYajom6tlOg+dE6we lNbiJ5uceQYUaUjyNkYhakWM9qFQKoXVr2OwrmIMngmmDjbSPP5hbRRXrBGefGKUnE 1HkpqTBHPE9CG12NHowxa9RJHTbt8fLntYR0hkZU= Message-ID: <8f3ed602-5e60-f7d5-63c1-6b681a3e3905@oktetlabs.ru> Date: Tue, 25 Oct 2022 12:57:17 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v11 09/18] net/idpf: add support for packet type get Content-Language: en-US To: Junfeng Guo , qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, Wenjun Wu References: <20221024130134.1046536-2-junfeng.guo@intel.com> <20221024131227.1062446-1-junfeng.guo@intel.com> <20221024131227.1062446-10-junfeng.guo@intel.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20221024131227.1062446-10-junfeng.guo@intel.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 10/24/22 16:12, Junfeng Guo wrote: > Add dev ops dev_supported_ptypes_get. > > Signed-off-by: Wenjun Wu > Signed-off-by: Junfeng Guo Again, the patch should go after datapath implementation to make it reviewable. [snip] > diff --git a/doc/guides/nics/features/idpf.ini b/doc/guides/nics/features/idpf.ini > index 30e1c0831e..a03068df85 100644 > --- a/doc/guides/nics/features/idpf.ini > +++ b/doc/guides/nics/features/idpf.ini > @@ -8,4 +8,5 @@ > ; > [Features] > Queue start/stop = Y > +Packet type parsing = Y It is false without datapath implementation. > Linux = Y [snip] > diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c > index 298eaf0a1a..c3c4acb69f 100644 > --- a/drivers/net/idpf/idpf_rxtx.c > +++ b/drivers/net/idpf/idpf_rxtx.c > @@ -8,6 +8,25 @@ > #include "idpf_ethdev.h" > #include "idpf_rxtx.h" > > +const uint32_t * > +idpf_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused) > +{ > + static const uint32_t ptypes[] = { > + RTE_PTYPE_L2_ETHER, > + RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, > + RTE_PTYPE_L3_IPV6_EXT_UNKNOWN, > + RTE_PTYPE_L4_FRAG, > + RTE_PTYPE_L4_NONFRAG, > + RTE_PTYPE_L4_UDP, > + RTE_PTYPE_L4_TCP, > + RTE_PTYPE_L4_SCTP, > + RTE_PTYPE_L4_ICMP, > + RTE_PTYPE_UNKNOWN > + }; It looks like above array must not be static. It should be dynamically built based on idpf_get_pkt_type(). > + > + return ptypes; > +} > + > static inline int > check_rx_thresh(uint16_t nb_desc, uint16_t thresh) > { [snip]