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 1EFD5A00C4; Sun, 6 Nov 2022 10:58:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0F3C40691; Sun, 6 Nov 2022 10:58:29 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 37E564003C for ; Sun, 6 Nov 2022 10:58:28 +0100 (CET) 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 9E14262; Sun, 6 Nov 2022 12:58:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 9E14262 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1667728707; bh=Qk9GBoE5hOcISNYL+hqchjfbs3OztPHZ+JGK14Uw19Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VeJavy1T2VwaQzN9zguHtFujo9o1wu2Z1Q/e0dO5vldR3MWoQ6ZvCzugdwmhJEpGz DXhvz0lEHPuyYhkfLGXW7YpF5MftxC+hidQb5J7uowCwR1oB87TuaUjc8LeZo/c3qg yYE3CjujlKmSOEd5+jmm8SFyZDvN/Wteuhi/6Wjw= Message-ID: Date: Sun, 6 Nov 2022 12:58:27 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v2] app/testpmd: fix protocol headers display for Rx buffer split Content-Language: en-US To: Yuan Wang , Aman Singh , Yuying Zhang Cc: dev@dpdk.org, xuan.ding@intel.com, yaqi.tang@intel.com References: <20221017174054.800259-1-yuanx.wang@intel.com> <20221018145012.914586-1-yuanx.wang@intel.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20221018145012.914586-1-yuanx.wang@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/18/22 17:50, Yuan Wang wrote: > The "show config rxhdrs" cmd displays the configured protocol headers > that are used for protocol-based buffer split. > However, it shows "inner-ipv6" as "inner-ipv4". > > This patch fixes that by adjusting the order of condition judgments. > > Fixes: 52e2e7edcf48 ("app/testpmd: add protocol-based buffer split") > > Signed-off-by: Yuan Wang > Tested-by: Yaqi Tang > > --- > v2: add fixline. > > --- > app/test-pmd/config.c | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 0f7dbd698f..82fbbc9944 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -4937,15 +4937,6 @@ static const char *get_ptype_str(uint32_t ptype) > else if ((ptype & RTE_PTYPE_L2_ETHER) == RTE_PTYPE_L2_ETHER) > return "eth"; > > - else if ((ptype & (RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_INNER_L4_TCP)) == > - (RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_INNER_L4_TCP)) I realize that the patch solves the problem, but it is still wrong. Why are RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN and RTE_PTYPE_INNER_L4_TCP used as masks instead of RTE_PTYPE_L3_MASK and RTE_PTYPE_L4_MASK? It is simply incorrect from the very beginning and all conditions must be fixed to use appropriate masks instead.