DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wang, YuanX" <yuanx.wang@intel.com>
To: "Singh, Aman Deep" <aman.deep.singh@intel.com>,
	"Zhang, Yuying" <yuying.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Ding, Xuan" <xuan.ding@intel.com>,
	"Tang,  Yaqi" <yaqi.tang@intel.com>,
	"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>
Subject: RE: [PATCH v2] app/testpmd: fix protocol headers display for Rx buffer split
Date: Fri, 28 Oct 2022 02:04:48 +0000	[thread overview]
Message-ID: <PH7PR11MB6953F0D9BE5D2248D89F303185329@PH7PR11MB6953.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20221018145012.914586-1-yuanx.wang@intel.com>

Hi All,

Could you please review and provide suggestions if any.

Thanks,
Yuan

> -----Original Message-----
> From: Wang, YuanX <yuanx.wang@intel.com>
> Sent: Tuesday, October 18, 2022 10:50 PM
> To: andrew.rybchenko@oktetlabs.ru; Singh, Aman Deep
> <aman.deep.singh@intel.com>; Zhang, Yuying <yuying.zhang@intel.com>
> Cc: dev@dpdk.org; Ding, Xuan <xuan.ding@intel.com>; Tang, Yaqi
> <yaqi.tang@intel.com>; Wang, YuanX <yuanx.wang@intel.com>
> Subject: [PATCH v2] app/testpmd: fix protocol headers display for Rx buffer
> split
> 
> 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 <yuanx.wang@intel.com>
> Tested-by: Yaqi Tang <yaqi.tang@intel.com>
> 
> ---
> 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))
> -		return "inner-ipv4-tcp";
> -	else if ((ptype & (RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_UDP)) ==
> -		(RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_UDP))
> -		return "inner-ipv4-udp";
> -	else if ((ptype & (RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_SCTP)) ==
> -		(RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_SCTP))
> -		return "inner-ipv4-sctp";
>  	else if ((ptype & (RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_TCP)) ==
>  		(RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_TCP))
>  		return "inner-ipv6-tcp";
> @@ -4955,18 +4946,27 @@ static const char *get_ptype_str(uint32_t ptype)
>  	else if ((ptype & (RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_SCTP)) ==
>  		(RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_SCTP))
>  		return "inner-ipv6-sctp";
> +	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))
> +		return "inner-ipv4-tcp";
> +	else if ((ptype & (RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_UDP)) ==
> +		(RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_UDP))
> +		return "inner-ipv4-udp";
> +	else if ((ptype & (RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_SCTP)) ==
> +		(RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
> RTE_PTYPE_INNER_L4_SCTP))
> +		return "inner-ipv4-sctp";
>  	else if ((ptype & RTE_PTYPE_INNER_L4_TCP) ==
> RTE_PTYPE_INNER_L4_TCP)
>  		return "inner-tcp";
>  	else if ((ptype & RTE_PTYPE_INNER_L4_UDP) ==
> RTE_PTYPE_INNER_L4_UDP)
>  		return "inner-udp";
>  	else if ((ptype & RTE_PTYPE_INNER_L4_SCTP) ==
> RTE_PTYPE_INNER_L4_SCTP)
>  		return "inner-sctp";
> +	else if ((ptype & RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN) ==
> +		RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN)
> +		return "inner-ipv6";
>  	else if ((ptype & RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN) ==
>  		RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN)
>  		return "inner-ipv4";
> -	else if ((ptype & RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN) ==
> -		RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN)
> -		return "inner-ipv6";
>  	else if ((ptype & RTE_PTYPE_INNER_L2_ETHER) ==
> RTE_PTYPE_INNER_L2_ETHER)
>  		return "inner-eth";
>  	else if ((ptype & RTE_PTYPE_TUNNEL_GRENAT) ==
> RTE_PTYPE_TUNNEL_GRENAT)
> --
> 2.25.1


  reply	other threads:[~2022-10-28  2:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 17:40 [PATCH] " Yuan Wang
2022-10-17 10:03 ` Tang, Yaqi
2022-10-18 14:50 ` [PATCH v2] " Yuan Wang
2022-10-28  2:04   ` Wang, YuanX [this message]
2022-11-06  9:58   ` Andrew Rybchenko
2022-11-07  5:55     ` Wang, YuanX
2022-11-07  8:45 ` [PATCH v3] app/testpmd: fix protocol header " Yuan Wang
2022-11-07  8:51   ` Tang, Yaqi
2022-11-07 11:31   ` Andrew Rybchenko
2022-11-08 13:53     ` Wang, YuanX
2022-11-09  1:37 ` [PATCH v4] " Yuan Wang
2022-11-10  6:55   ` Andrew Rybchenko
2022-11-10  7:49     ` Wang, YuanX
2022-11-10  8:20 ` [PATCH v5] " Yuan Wang
2022-11-10  8:54   ` Andrew Rybchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH7PR11MB6953F0D9BE5D2248D89F303185329@PH7PR11MB6953.namprd11.prod.outlook.com \
    --to=yuanx.wang@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=xuan.ding@intel.com \
    --cc=yaqi.tang@intel.com \
    --cc=yuying.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).