From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7967A00C5; Thu, 7 May 2020 12:24:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C48C31DAA6; Thu, 7 May 2020 12:24:01 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 58BBA1DA9C for ; Thu, 7 May 2020 12:24:00 +0200 (CEST) IronPort-SDR: 9ZHcP5xF33x/Fd8DWT8EBq7ZVeKRySxTSuO/uNBYyQLlrjPfOFiAjSfo3YrC9pb5P53EGxLAW9 0t9Wmn4wIZVA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2020 03:23:59 -0700 IronPort-SDR: jXYSX5j5FO6W+gtwB25L7ATnTr0erKStTU2iErZ9CuaZpMzRZi8a3dV/mMvA5fnEkLQLt3xSBg 6G8mfd8s1NnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,363,1583222400"; d="scan'208";a="435233566" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga005.jf.intel.com with ESMTP; 07 May 2020 03:23:59 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 03:23:58 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 7 May 2020 03:23:58 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 7 May 2020 03:23:58 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 03:23:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k1oNi0wDHGb8nZLICQEUwomqQhxssh4FXkorRyQAJNwITC5YpsORimxF+a1GHepAPq0A2yVde1vRLhzMpbJfxfXltK84fuUZW/bkI5tHCbLSOuIOMLlV8vA4MIDgJH1U6aJGIihv2JmDPuXIUb62i+iSgNZ61mvXmHki4zHR0G8RzPG7a3/S6Qgwbkx5WZk5eSFaCepZq4jz7ODverd59jhPlUIf+8KdjNthOqY7/dKSiqlO3KNPcpcEK0szmCs93z3AhBGjnx9QS1hRCJe0ynJxMfhDgVEvDRNXm6yX6GjBt+s0TF4Si6sus/V8Tay1gowXLj59KTJ1GXKJ6IhKig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ts7NsFvC5R+YMv//1Rt8cEl2ca+bv2RE4C18c3sTtKg=; b=D3z3pqhDAnbK1OWzr4vBMMhhgug83vuz/mypig8z5dI2/On9nP4zfjQ/x+/LfK9DXH9LUGAVhm0eyHwI0jsM8RNtQt8fU4XcsElZ7x8+dvtDX6Us7D10DjYXbhJ0NDxoB6CxCIMP4ARDVAevd1wSd1UzSVMbynD7PRrKu9+6BFZb3wDRY1FZoVxXrwv4EtQRT07F38estft6MzwxheWGyHVTWKhSibgoKOsEURLflwONwAhIk6q6Mwig3bDo/s8yx7KkL4P4LI3LT+IrEQuOnsuToSMU9vwxLe66NS6e8lDGSaKa3rVnpqTCXXj8V53qaxlcaEt/JkmCRokxEaU01A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ts7NsFvC5R+YMv//1Rt8cEl2ca+bv2RE4C18c3sTtKg=; b=JXmc1oVlckME1ex5A1Gi7aZbPaFjWZxsfnKctt7Hf/Dl25JG7oTTOpwIY4md0fQqWY9TOK+bV93013jKi8BnZvI726XduBoyg7uFwM/ncPMoN+AQGv2iXnOTRc57yMdKoiVCgHfSV12QsDSNBoTvJr9rUy1/XIk27+myGH19/gQ= Received: from DM6PR11MB2537.namprd11.prod.outlook.com (2603:10b6:5:cd::16) by DM6PR11MB4489.namprd11.prod.outlook.com (2603:10b6:5:203::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.27; Thu, 7 May 2020 10:23:56 +0000 Received: from DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa]) by DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa%6]) with mapi id 15.20.2958.034; Thu, 7 May 2020 10:23:56 +0000 From: "Iremonger, Bernard" To: Xiaoyu Min , "Yigit, Ferruh" , "Lu, Wenzhuo" , "Wu, Jingjing" , "Mcnamara, John" , "Kovacevic, Marko" CC: "dev@dpdk.org" Thread-Topic: [PATCH v3] app/testpmd: add cmdline option to set Rx mq mode Thread-Index: AQHWJAnRC0W1AAkVrkSVyNFsapvv0KicagXg Date: Thu, 7 May 2020 10:23:56 +0000 Message-ID: References: <7610a1501291e224dce3cf7e00c968e24b5c9289.1588812049.git.jackmin@mellanox.com> In-Reply-To: <7610a1501291e224dce3cf7e00c968e24b5c9289.1588812049.git.jackmin@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.188] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b541f387-9010-42a1-816a-08d7f270bff1 x-ms-traffictypediagnostic: DM6PR11MB4489: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-forefront-prvs: 03965EFC76 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: I77AAKlH+dRQe7WqRz25XItEP2MzvqFCIB5EBczbqcB39UztJWiUYUxanxWW79kaYx4+z/N1McsIgH+px1t3e2f4Kgji4WgSqtJpheePYkMHucskTkh/HssPT1QxOMgnqU3xcFwcmj5UdvtcAy8quJQN1WdND4g6930iZteneX7+YklU9rEKTo+bxbpiXujaMlXwQHc69ie5DsKNCFTDQRoClElyg/ky8vMx8bzdqRXS9heJuf260/Sioun7WKARl2tHC+rr/IUse5YLlRBab0RjpAyUOKpW9LY0t56gFDUtJUCeGAo0agXT7bdnTFcPMef6SIznjLof7UP9VbdHd+UFDERtmyR3w42Jel3KH7+po5b08H+P+QFB+hwQZcgjf9kJ1/Ua7H2fEjpuz7m1vWUiERSIvjzYpDRTwv20JVz4/eKBXvZRUR7g09yGIl23Rbl/3nKHkJt0hYYIk9sOEs6EdjGUaiZq9byOP83ftRB1n2+qO7h1PJ1k1nYtaYyp1PgL1B1jjuSFbr3mud4+UlK7UwHPCtVVZ5wzmwZogDE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2537.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(376002)(366004)(396003)(39860400002)(136003)(346002)(33430700001)(86362001)(6636002)(8676002)(4326008)(55016002)(52536014)(66946007)(66446008)(8936002)(76116006)(64756008)(83290400001)(83300400001)(66556008)(71200400001)(66476007)(83320400001)(83280400001)(83310400001)(33440700001)(316002)(186003)(2906002)(5660300002)(7696005)(478600001)(9686003)(26005)(6506007)(53546011)(33656002)(110136005)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: pf9AAjLI8l2XdeejmSPimH1fw7nSqwySM9uOOD/Ia3R6Lt9nUh3uGFMuY9Hc1IRYQnhxRQvzVMIS4juydr40X9QOmO7QBihsh+y9efh60Htca7kgDNnvZATVtbcABmHKyW7Q+vRC/MZ0FJmrQbUFrkLkPmoWbs4kIkw3ofKoJ8+i/0mgVLQS33nYsYRQ9ApNUr3h27Rn/eRGFKZR1wAN0y+maoq30vUQ0Pf5QkiE8ZyFQNDKBJh2zlkCOc2oMOL32K/ehunnNvYWrViToLALuDyXfhx58m74YW8fEusEPw29nZP2XU1SZ2bQufsG7NQUeR2IFZfv9p0KLy8SO8L1lpH4BmB/S9/NUUFO+528XZR/23q21BcP4rV0V3O553QNE/kWnkyHbJ99IIOWSriZjaHCgqOFt6A00PDZgvSJYXF9bIvUkybntLcNHSpssuf4UHxbCHwxSNyCGYxosU1AWhoj9x363+VbFlhciclxTBNsqCV81TcpnUT6GQ/g86NX+tLLaAk5vj6MHkV4kXho0wQlhrYY/Yynm6hzZUIX5y8FOl+OvzZ68ZF29EkvkVVhz2gGrJErTYY9FJLX0Px4cjM0CdIwjP7MFYTZqXyr/9mYb/v3p4N9l9+e+3IW6V8i1i7UgKJEsxjgQw8D9fREzPNky9AOFdRuewS5eE2Oa5m1XW9XX4CYSphFbXLU6HPtzG/DVmkbcuH5J6JoM4ngclGScu+nG6KcxDsZRKuT3XlEIlRzQmS1ACc8M6VE/oe8eIlRY3wZ3RKQ04gKN8ILGTEZaGr2H5XsGk5bw+ZNPjQ/PKTpEVfcIIhmRbeRvnOV Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b541f387-9010-42a1-816a-08d7f270bff1 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2020 10:23:56.4760 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +3eDZsIyEVg+EgEQNd4tFH7cr8OhQ5O34g6bzhgl5fB0PyTNTYm/FsCXgPnxhzz139880HdWUffGfly/FITfV4YFrSXoDzFHtpo3V6esD4s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4489 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: add cmdline option to set Rx mq mode 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" Hi Xiaoyu, > -----Original Message----- > From: Xiaoyu Min > Sent: Thursday, May 7, 2020 1:52 AM > To: Yigit, Ferruh ; Lu, Wenzhuo > ; Wu, Jingjing ; Iremonger, > Bernard ; Mcnamara, John > ; Kovacevic, Marko > > Cc: dev@dpdk.org > Subject: [PATCH v3] app/testpmd: add cmdline option to set Rx mq mode >=20 > One new cmdline option `--rx-mq-mode` is added in order to have the > possibility to check whether PMD handle the mq mode correctly or not. >=20 > The reason is some NICs need to do different settings based on different = RX > mq mode, i.e RSS or not. >=20 > With this support in testpmd, the above scenario can be tested easily. >=20 > Signed-off-by: Xiaoyu Min > --- > app/test-pmd/parameters.c | 15 +++++++++++++++ > app/test-pmd/testpmd.c | 17 ++++++++++++++--- > app/test-pmd/testpmd.h | 2 ++ > doc/guides/rel_notes/release_20_05.rst | 4 ++++ > doc/guides/testpmd_app_ug/run_app.rst | 7 +++++++ > 5 files changed, 42 insertions(+), 3 deletions(-) >=20 > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index > 30c1753c32..9f80fe898f 100644 > --- a/app/test-pmd/parameters.c > +++ b/app/test-pmd/parameters.c > @@ -212,6 +212,8 @@ usage(char* progname) > printf(" --noisy-lkup-num-writes=3DN: do N random reads and writes > per packet\n"); > printf(" --no-iova-contig: mempool memory can be IOVA non > contiguous. " > "valid only with --mp-alloc=3Danon\n"); > + printf(" --rx-mq-mode=3D0xX: hexadecimal bitmask of RX mq mode > can be " > + "enabled\n"); > } >=20 > #ifdef RTE_LIBRTE_CMDLINE > @@ -670,6 +672,7 @@ launch_args_parse(int argc, char** argv) > { "noisy-lkup-num-reads", 1, 0, 0 }, > { "noisy-lkup-num-reads-writes", 1, 0, 0 }, > { "no-iova-contig", 0, 0, 0 }, > + { "rx-mq-mode", 1, 0, 0 }, > { 0, 0, 0, 0 }, > }; >=20 > @@ -1363,6 +1366,18 @@ launch_args_parse(int argc, char** argv) > } > if (!strcmp(lgopts[opt_idx].name, "no-iova-contig")) > mempool_flags =3D > MEMPOOL_F_NO_IOVA_CONTIG; > + > + if (!strcmp(lgopts[opt_idx].name, "rx-mq-mode")) { > + char *end =3D NULL; > + n =3D strtoul(optarg, &end, 16); > + if (n >=3D 0 && n <=3D > ETH_MQ_RX_VMDQ_DCB_RSS) > + rx_mq_mode =3D (enum > rte_eth_rx_mq_mode)n; > + else > + rte_exit(EXIT_FAILURE, > + "rx-mq-mode must be >=3D 0 > and " > + " <=3D %d\n", > + Better not to split error string over two lines (passes checkpatch for me) > ETH_MQ_RX_VMDQ_DCB_RSS); > + } > break; > case 'h': > usage(argv[0]); > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > 99bacddbfd..808cfae463 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -482,6 +482,11 @@ uint8_t bitrate_enabled; struct gro_status > gro_ports[RTE_MAX_ETHPORTS]; uint8_t gro_flush_cycles =3D > GRO_DEFAULT_FLUSH_CYCLES; >=20 > +/* > + * hexadecimal bitmask of RX mq mode can be enabled. > + */ > +enum rte_eth_rx_mq_mode rx_mq_mode =3D > ETH_MQ_RX_VMDQ_DCB_RSS; > + > /* Forward function declarations */ > static void setup_attached_port(portid_t pi); static void > map_port_queue_stats_mapping_registers(portid_t pi, @@ -3337,7 +3342,9 > @@ init_port_config(void) >=20 > if (port->dcb_flag =3D=3D 0) { > if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf !=3D 0) > - port->dev_conf.rxmode.mq_mode =3D > ETH_MQ_RX_RSS; > + port->dev_conf.rxmode.mq_mode =3D > + (enum rte_eth_rx_mq_mode) > + (rx_mq_mode & > ETH_MQ_RX_RSS); > else > port->dev_conf.rxmode.mq_mode =3D > ETH_MQ_RX_NONE; > } > @@ -3438,7 +3445,9 @@ get_eth_dcb_conf(portid_t pid, struct > rte_eth_conf *eth_conf, > } >=20 > /* set DCB mode of RX and TX of multiple queues */ > - eth_conf->rxmode.mq_mode =3D ETH_MQ_RX_VMDQ_DCB; > + eth_conf->rxmode.mq_mode =3D > + (enum rte_eth_rx_mq_mode) > + (rx_mq_mode & > ETH_MQ_RX_VMDQ_DCB); > eth_conf->txmode.mq_mode =3D ETH_MQ_TX_VMDQ_DCB; > } else { > struct rte_eth_dcb_rx_conf *rx_conf =3D @@ -3458,7 +3467,9 > @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, > tx_conf->dcb_tc[i] =3D i % num_tcs; > } >=20 > - eth_conf->rxmode.mq_mode =3D ETH_MQ_RX_DCB_RSS; > + eth_conf->rxmode.mq_mode =3D > + (enum rte_eth_rx_mq_mode) > + (rx_mq_mode & > ETH_MQ_RX_DCB_RSS); > eth_conf->rx_adv_conf.rss_conf =3D rss_conf; > eth_conf->txmode.mq_mode =3D ETH_MQ_TX_DCB; > } > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index > 7ff4c5dba3..e47d1a40f4 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -602,6 +602,8 @@ struct mplsoudp_decap_conf { }; extern struct > mplsoudp_decap_conf mplsoudp_decap_conf; >=20 > +extern enum rte_eth_rx_mq_mode rx_mq_mode; > + > static inline unsigned int > lcore_num(void) > { > diff --git a/doc/guides/rel_notes/release_20_05.rst > b/doc/guides/rel_notes/release_20_05.rst > index 777d36e582..c94d84a14c 100644 > --- a/doc/guides/rel_notes/release_20_05.rst > +++ b/doc/guides/rel_notes/release_20_05.rst > @@ -216,6 +216,10 @@ New Features > * Added IPsec inbound load-distribution support for ipsec-secgw > application > using NIC load distribution feature(Flow Director). >=20 > +* **Updated testpmd application.** > + > + * Added a new cmdline option ``--rx-mq-mode`` which can be used to tes= t > PMD's > + behaviour on handling Rx mq mode. >=20 > Removed Items > ------------- > diff --git a/doc/guides/testpmd_app_ug/run_app.rst > b/doc/guides/testpmd_app_ug/run_app.rst > index 727ef52b8f..d586f2e35d 100644 > --- a/doc/guides/testpmd_app_ug/run_app.rst > +++ b/doc/guides/testpmd_app_ug/run_app.rst > @@ -481,3 +481,10 @@ The command line options are: >=20 > Enable to create mempool which is not IOVA contiguous. Valid only wi= th -- > mp-alloc=3Danon. > The default value is 0. > + > +* ``--rx-mq-mode`` > + > + Set the hexadecimal bitmask of RX multi queue mode which can be > enabled. > + The default value is 0x7:: > + > + ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG | > ETH_MQ_RX_VMDQ_FLAG > -- > 2.26.2 Otherwise Acked-by: Bernard Iremonger