DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Iremonger, Bernard" <bernard.iremonger@intel.com>
To: Yongseok Koh <yskoh@mellanox.com>
Cc: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: make txonly mode generate	multiple flows
Date: Thu, 28 Mar 2019 17:42:04 +0000	[thread overview]
Message-ID: <8CEF83825BEC744B83065625E567D7C260D789DC@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <9F463721-2837-4B4B-B098-34E58BDE3421@mellanox.com>

Hi Yongseok,

<snip>

> >> Subject: [dpdk-dev] [PATCH v3] app/testpmd: make txonly mode generate
> >> multiple flows
> >>
> >> Testpmd can generate multiple flows without taking much cost and this
> >> could be a simple traffic generator for developer's quick tests. If
> >> "--txonly-multi- flow" is specified in the command line, IP source
> >> address is varied to gnerate multiple flows.
> >>
> >> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> >> ---
> >>
> >> v3:
> >> * Add "--txonly-multi-flow" param to enable the feature.
> >> * Replace __thread with RTE_PER_LCORE.
> >>
> >> v2:
> >> * Add detailed explanation in a comment.
> >>
> >> app/test-pmd/parameters.c             |  4 ++++
> >> app/test-pmd/testpmd.c                |  3 +++
> >> app/test-pmd/testpmd.h                |  2 ++
> >> app/test-pmd/txonly.c                 | 22 ++++++++++++++++++++++
> >> doc/guides/testpmd_app_ug/run_app.rst |  4 ++++
> >> 5 files changed, 35 insertions(+)
> >>
> >> diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
> >> index 38b419767b..7b6b60905d 100644
> >> --- a/app/test-pmd/parameters.c
> >> +++ b/app/test-pmd/parameters.c
> >> @@ -173,6 +173,7 @@ usage(char* progname)
> >> 	       " Used mainly with PCAP drivers.\n");
> >> 	printf("  --txpkts=X[,Y]*: set TX segment sizes"
> >> 		" or total packet length.\n");
> >> +	printf("  --txonly-multi-flow: generate multiple flows in txonly
> >> +mode\n");
> >> 	printf("  --disable-link-check: disable check on link status when "
> >> 	       "starting/stopping ports.\n");
> >> 	printf("  --no-lsc-interrupt: disable link status change
> >> interrupt.\n"); @@ -632,6 +633,7 @@ launch_args_parse(int argc, char**
> argv)
> >> 		{ "no-flush-rx",	0, 0, 0 },
> >> 		{ "flow-isolate-all",	        0, 0, 0 },
> >> 		{ "txpkts",			1, 0, 0 },
> >> +		{ "txonly-multi-flow",		0, 0, 0 },
> >> 		{ "disable-link-check",		0, 0, 0 },
> >> 		{ "no-lsc-interrupt",		0, 0, 0 },
> >> 		{ "no-rmv-interrupt",		0, 0, 0 },
> >> @@ -1141,6 +1143,8 @@ launch_args_parse(int argc, char** argv)
> >> 				else
> >> 					rte_exit(EXIT_FAILURE, "bad
> >> txpkts\n");
> >> 			}
> >> +			if (!strcmp(lgopts[opt_idx].name, "txonly-multi-
> >> flow"))
> >> +				txonly_multi_flow = 1;
> >> 			if (!strcmp(lgopts[opt_idx].name, "no-flush-rx"))
> >> 				no_flush_rx = 1;
> >> 			if (!strcmp(lgopts[opt_idx].name, "disable-link-
> >> check")) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> >> index 216be47f92..b950e8cc55 100644
> >> --- a/app/test-pmd/testpmd.c
> >> +++ b/app/test-pmd/testpmd.c
> >> @@ -217,6 +217,9 @@ uint8_t  tx_pkt_nb_segs = 1; /**< Number of
> >> segments in TXONLY packets */  enum tx_pkt_split tx_pkt_split =
> >> TX_PKT_SPLIT_OFF;  /**< Split policy for packets to TX. */
> >>
> >> +int txonly_multi_flow;
> >
> > This should be "uint8_t  txonly_multi_flow;" similar to other
> > variables in use, for example "uint8_t no_flush_rx = 0;"
> >
> >> +/**< Whether multiple flows are generated in TXONLY mode. */
> >> +
> >> uint16_t nb_pkt_per_burst = DEF_PKT_BURST; /**< Number of packets per
> >> burst. */  uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of
> >> mbuf mempool cache. */
> >>
> >> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index
> >> 85b791b6bb..668227bc55 100644
> >> --- a/app/test-pmd/testpmd.h
> >> +++ b/app/test-pmd/testpmd.h
> >> @@ -439,6 +439,8 @@ enum tx_pkt_split {
> >>
> >> extern enum tx_pkt_split tx_pkt_split;
> >>
> >> +extern int txonly_multi_flow;
> >
> > This should be "extern uint8_t txonly_multi_flow;" in line with the
> > similar variables in use, For example  "extern uint8_t no_flush_rx;"
> 
> Okay, will change it to uint8_t but what about the error by checkpatches.sh?
> 
> 	+ ./devtools/checkpatches.sh -n1
> 
> 	### app/testpmd: make txonly mode generate multiple flows
> 
> 	ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
> 	#50: FILE: app/test-pmd/testpmd.c:220:
> 	+uint8_t txonly_multi_flow = 0;
> 
> 	total: 1 errors, 0 warnings, 95 lines checked
> 
> 	0/1 valid patch
> 
> I'll submit without the init but if you still insist that way for consistency, let me
> know then I'll submit another version.
> 
> Thanks,
> Yongseok

Please submit without the init to avoid checkpatch error (example probably predates checkpatch checks).

Regards,

Bernard.

  parent reply	other threads:[~2019-03-28 17:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 21:11 [dpdk-dev] [PATCH] " Yongseok Koh
2018-01-12 18:08 ` Thomas Monjalon
2018-01-16  2:40 ` Lu, Wenzhuo
2018-01-17 18:04   ` Yongseok Koh
2018-01-17 18:18 ` [dpdk-dev] [PATCH v2] " Yongseok Koh
2018-01-18  1:22   ` Lu, Wenzhuo
2018-01-18 12:21   ` Ananyev, Konstantin
2018-01-19  7:09     ` Yongseok Koh
2018-01-19 11:02       ` Ananyev, Konstantin
2018-01-18 13:55   ` Jerin Jacob
2019-03-28  1:51 ` [dpdk-dev] [PATCH v3] " Yongseok Koh
2019-03-28  1:51   ` Yongseok Koh
2019-03-28 10:24   ` Iremonger, Bernard
2019-03-28 10:24     ` Iremonger, Bernard
2019-03-28 17:33     ` Yongseok Koh
2019-03-28 17:33       ` Yongseok Koh
2019-03-28 17:42       ` Iremonger, Bernard [this message]
2019-03-28 17:42         ` Iremonger, Bernard
2019-03-28 18:46 ` [dpdk-dev] [PATCH v4] " Yongseok Koh
2019-03-28 18:46   ` Yongseok Koh
2019-03-29  9:55   ` Iremonger, Bernard
2019-03-29  9:55     ` Iremonger, Bernard
2019-03-29 18:44     ` Ferruh Yigit
2019-03-29 18:44       ` 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=8CEF83825BEC744B83065625E567D7C260D789DC@IRSMSX108.ger.corp.intel.com \
    --to=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jingjing.wu@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=yskoh@mellanox.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).