DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Huang, ZhiminX" <zhiminx.huang@intel.com>
To: Ori Kam <orika@nvidia.com>,
	Alexander Kozyrev <akozyrev@nvidia.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Suanming Mou <suanmingm@nvidia.com>
Subject: RE: [PATCH] app/testpmd: fix flow creation parsing
Date: Wed, 2 Mar 2022 08:33:59 +0000	[thread overview]
Message-ID: <BN0PR11MB57126EA4624349126C850867FD039@BN0PR11MB5712.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MW2PR12MB46663D08163C81B2E829D1BAD6039@MW2PR12MB4666.namprd12.prod.outlook.com>

> -----Original Message-----
> From: Ori Kam <orika@nvidia.com>
> Sent: Wednesday, March 2, 2022 4:13 PM
> To: Alexander Kozyrev <akozyrev@nvidia.com>; dev@dpdk.org
> Cc: Suanming Mou <suanmingm@nvidia.com>
> Subject: RE: [PATCH] app/testpmd: fix flow creation parsing
> 
> Hi Alexander,
> 
> 
> > -----Original Message-----
> > From: Alexander Kozyrev <akozyrev@nvidia.com>
> > Subject: [PATCH] app/testpmd: fix flow creation parsing
> >
> > A pattern template creation shares the parsing mechanism with a simple
> > flow creation. The pattern template creation only consists of pattern
> > items while the flow creation continues with actions.
> > The parsing mechanism now accommodates both cases and allows to stop
> > at the item end token, which should not happen for the flow creation.
> > Fix parsing mechanism to differentiate between these two cases.
> >
> > Bugzilla ID: 941
> > Fixes: 04cc665fab ("app/testpmd: add flow template management")
> >
> > Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> > ---
> >  app/test-pmd/cmdline_flow.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> > index 4f7a9f17f9..fc4a6d9cca 100644
> > --- a/app/test-pmd/cmdline_flow.c
> > +++ b/app/test-pmd/cmdline_flow.c
> > @@ -6864,6 +6864,14 @@ parse_vc(struct context *ctx, const struct token
> *token,
> >  		ctx->object = out->args.vc.pattern;
> >  		ctx->objmask = NULL;
> >  		return len;
> > +	case ITEM_END:
> > +		if ((out->command == VALIDATE || out->command == CREATE) &&
> > +		    ctx->last)
> > +			return -1;
> > +		if (out->command == PATTERN_TEMPLATE_CREATE &&
> > +		    !ctx->last)
> > +			return -1;
> > +		break;
> >  	case ACTIONS:
> >  		out->args.vc.actions =
> >  			(void *)RTE_ALIGN_CEIL((uintptr_t)
> > --
> > 2.18.2
> 
> 
> Acked-by: Ori Kam <orika@nvidia.com>
> Thanks,
> Ori

Tested-by: Zhimin Huang <zhiminx.huang@intel.com >



  reply	other threads:[~2022-03-02  8:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01 22:47 Alexander Kozyrev
2022-03-02  8:12 ` Ori Kam
2022-03-02  8:33   ` Huang, ZhiminX [this message]
2022-03-03 13:39     ` Ferruh Yigit

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=BN0PR11MB57126EA4624349126C850867FD039@BN0PR11MB5712.namprd11.prod.outlook.com \
    --to=zhiminx.huang@intel.com \
    --cc=akozyrev@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=orika@nvidia.com \
    --cc=suanmingm@nvidia.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).