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>
Subject: RE: [PATCH] app/testpmd: remove useless check
Date: Fri, 14 Oct 2022 09:52:15 +0000	[thread overview]
Message-ID: <PH7PR11MB6953CCF5F968BB247742BDD785249@PH7PR11MB6953.namprd11.prod.outlook.com> (raw)
In-Reply-To: <f49b987a-888c-5c7c-6281-74824d4f4f62@intel.com>

Hi Singh,

> -----Original Message-----
> From: Singh, Aman Deep <aman.deep.singh@intel.com>
> Sent: Friday, October 14, 2022 5:37 PM
> To: Wang, YuanX <yuanx.wang@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>
> Cc: dev@dpdk.org; Ding, Xuan <xuan.ding@intel.com>; Tang, Yaqi
> <yaqi.tang@intel.com>
> Subject: Re: [PATCH] app/testpmd: remove useless check
> 
> Thanks for the patch Yuan.
> 
> On 10/12/2022 7:59 PM, Yuan Wang wrote:
> > Protocol header sequence checking is supported in the ethdev library,
> > the application does not need to do it again.
> 
> I would like to rephrase the patch title to make it more specific.
> Like "remove useless check" to "remove unused parameter in rx hdr split"
> or something like that, to specify the patch.

Thank you for the correction, please feel free to fix when merging.

Thanks,
Yuan

> 
> > Coverity issue: 381396
> > Fixes: 52e2e7edcf48 ("app/testpmd: add protocol-based buffer split")
> >
> > Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> 
> > ---
> >   app/test-pmd/cmdline.c    | 6 ++----
> >   app/test-pmd/parameters.c | 2 +-
> >   app/test-pmd/testpmd.h    | 2 +-
> >   3 files changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > 17be2de402..29e4b2329b 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -3440,7 +3440,7 @@ get_ptype(char *value)
> >
> >   unsigned int
> >   parse_hdrs_list(const char *str, const char *item_name, unsigned int
> max_items,
> > -				unsigned int *parsed_items, int
> check_hdrs_sequence)
> > +				unsigned int *parsed_items)
> >   {
> >   	unsigned int nb_item;
> >   	char *cur;
> > @@ -3462,8 +3462,6 @@ parse_hdrs_list(const char *str, const char
> *item_name, unsigned int max_items,
> >   		fprintf(stderr, "Number of %s = %u > %u (maximum
> items)\n",
> >   			item_name, nb_item + 1, max_items);
> >   	free(str2);
> > -	if (!check_hdrs_sequence)
> > -		return nb_item;
> >   	return nb_item;
> >   }
> >
> > @@ -3854,7 +3852,7 @@ cmd_set_rxhdrs_parsed(void *parsed_result,
> >
> >   	res = parsed_result;
> >   	nb_segs = parse_hdrs_list(res->values, "segment hdrs",
> > -				  MAX_SEGS_BUFFER_SPLIT, seg_hdrs, 0);
> > +				  MAX_SEGS_BUFFER_SPLIT, seg_hdrs);
> >   	if (nb_segs > 0)
> >   		set_rx_pkt_hdrs(seg_hdrs, nb_segs);
> >   	cmd_reconfig_device_queue(RTE_PORT_ALL, 0, 1); diff --git
> > a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index
> > ff760460ec..5b305c833c 100644
> > --- a/app/test-pmd/parameters.c
> > +++ b/app/test-pmd/parameters.c
> > @@ -1272,7 +1272,7 @@ launch_args_parse(int argc, char** argv)
> >   				nb_segs = parse_hdrs_list
> >   						(optarg, "rxpkt segments",
> >   						MAX_SEGS_BUFFER_SPLIT,
> > -						seg_hdrs, 0);
> > +						seg_hdrs);
> >   				if (nb_segs > 0)
> >   					set_rx_pkt_hdrs(seg_hdrs, nb_segs);
> >   				else
> > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index
> > e65be323b8..0b99339df8 100644
> > --- a/app/test-pmd/testpmd.h
> > +++ b/app/test-pmd/testpmd.h
> > @@ -854,7 +854,7 @@ unsigned int parse_item_list(const char *str, const
> char *item_name,
> >   			unsigned int *parsed_items, int
> check_unique_values);
> >   unsigned int parse_hdrs_list(const char *str, const char *item_name,
> >   			unsigned int max_item,
> > -			unsigned int *parsed_items, int
> check_unique_values);
> > +			unsigned int *parsed_items);
> >   void launch_args_parse(int argc, char** argv);
> >   void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t
> queue);
> >   void cmdline_read_from_file(const char *filename);


  reply	other threads:[~2022-10-14  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 14:29 Yuan Wang
2022-10-14  9:37 ` Singh, Aman Deep
2022-10-14  9:52   ` Wang, YuanX [this message]
2022-10-17  8:36     ` 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=PH7PR11MB6953CCF5F968BB247742BDD785249@PH7PR11MB6953.namprd11.prod.outlook.com \
    --to=yuanx.wang@intel.com \
    --cc=aman.deep.singh@intel.com \
    --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).