[PATCH v2] app/testpmd: fix protocol headers display for Rx buffer split
Wang, YuanX
yuanx.wang at intel.com
Mon Nov 7 06:55:34 CET 2022
Hi Andrew,
> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> Sent: Sunday, November 6, 2022 5:58 PM
> To: Wang, YuanX <yuanx.wang at intel.com>; Singh, Aman Deep
> <aman.deep.singh at intel.com>; Zhang, Yuying <yuying.zhang at intel.com>
> Cc: dev at dpdk.org; Ding, Xuan <xuan.ding at intel.com>; Tang, Yaqi
> <yaqi.tang at intel.com>
> Subject: Re: [PATCH v2] app/testpmd: fix protocol headers display for Rx
> buffer split
>
> 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 <yuanx.wang at intel.com>
> > Tested-by: Yaqi Tang <yaqi.tang at 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))
>
> 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.
Thanks for your comments. I will update the patch with the appropriate mask.
Thanks,
Yuan
More information about the dev
mailing list