From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A782CA0679 for ; Thu, 28 Mar 2019 18:42:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D6DAA1B3BA; Thu, 28 Mar 2019 18:42:10 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 7662F1B3B6 for ; Thu, 28 Mar 2019 18:42:08 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2019 10:42:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,281,1549958400"; d="scan'208";a="286757231" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga004.jf.intel.com with ESMTP; 28 Mar 2019 10:42:06 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.7]) by IRSMSX109.ger.corp.intel.com ([169.254.13.26]) with mapi id 14.03.0415.000; Thu, 28 Mar 2019 17:42:05 +0000 From: "Iremonger, Bernard" To: Yongseok Koh CC: "Lu, Wenzhuo" , "Wu, Jingjing" , "dev@dpdk.org" , "jerinj@marvell.com" , "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] [PATCH v3] app/testpmd: make txonly mode generate multiple flows Thread-Index: AQHU5QjKTND6WUHPZ0OQJVVitee4/KYg01KggAB7NoCAAAE8YA== Date: Thu, 28 Mar 2019 17:42:04 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260D789DC@IRSMSX108.ger.corp.intel.com> References: <20171215211125.39177-1-yskoh@mellanox.com> <20190328015102.21920-1-yskoh@mellanox.com> <8CEF83825BEC744B83065625E567D7C260D775EF@IRSMSX108.ger.corp.intel.com> <9F463721-2837-4B4B-B098-34E58BDE3421@mellanox.com> In-Reply-To: <9F463721-2837-4B4B-B098-34E58BDE3421@mellanox.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWFiYTQyYWItZjMyOC00NDY4LTk1NTMtMjQ0MWU2NWQwOTQ4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYkJzbklDMmxFTmNaN3YxYkVqYXBsVElSTEljNUtaOXFSOWhxRTR3ZkJhUXhRT1ZpNzhwVUZPUjdsTTFDaGJjTSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: make txonly mode generate multiple flows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190328174204.sIhO3RwJTIZgdUZW7FaR5AuGaHyUBl0sPeh9zwgj19I@z> Hi Yongseok, > >> 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 > >> --- > >> > >> 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=3DX[,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 =3D 1; > >> if (!strcmp(lgopts[opt_idx].name, "no-flush-rx")) > >> no_flush_rx =3D 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 =3D 1; /**< Number of > >> segments in TXONLY packets */ enum tx_pkt_split tx_pkt_split =3D > >> 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 =3D 0;" > > > >> +/**< Whether multiple flows are generated in TXONLY mode. */ > >> + > >> uint16_t nb_pkt_per_burst =3D DEF_PKT_BURST; /**< Number of packets pe= r > >> burst. */ uint16_t mb_mempool_cache =3D 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;" >=20 > Okay, will change it to uint8_t but what about the error by checkpatches.= sh? >=20 > + ./devtools/checkpatches.sh -n1 >=20 > ### app/testpmd: make txonly mode generate multiple flows >=20 > ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0 > #50: FILE: app/test-pmd/testpmd.c:220: > +uint8_t txonly_multi_flow =3D 0; >=20 > total: 1 errors, 0 warnings, 95 lines checked >=20 > 0/1 valid patch >=20 > I'll submit without the init but if you still insist that way for consist= ency, let me > know then I'll submit another version. >=20 > Thanks, > Yongseok Please submit without the init to avoid checkpatch error (example probably = predates checkpatch checks). Regards, Bernard.