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 A7AD5A00C5; Thu, 30 Apr 2020 11:16:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E8D581DA60; Thu, 30 Apr 2020 11:16:28 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 729F71DA52 for ; Thu, 30 Apr 2020 11:16:26 +0200 (CEST) IronPort-SDR: DrR+gD9Yk8AIKe6hYxIIczrakHxj5nLXJAXqI/iOCRGSVCX6UJYnHJyam8j1mqZArkWZusPa5j 10b5pAnywtGg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2020 02:16:25 -0700 IronPort-SDR: nxmfVHX8JZJ6JVcpQoTpowwLLZukIjcEZM7KcUZ2za8/p/lpzunA12Ga2Dqwdgp3RVvW42sr2v ZuSNMvQgy4Uw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,334,1583222400"; d="scan'208";a="459507880" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by fmsmga005.fm.intel.com with ESMTP; 30 Apr 2020 02:16:25 -0700 Received: from orsmsx125.amr.corp.intel.com (10.22.240.125) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 30 Apr 2020 02:16:25 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX125.amr.corp.intel.com (10.22.240.125) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 30 Apr 2020 02:16:25 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 30 Apr 2020 02:16:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cpq3nbP+QRCQOM7znWQC1rewZfJN48l20BxH+wNGV/6QDlxE2eXBLOa/hXDdwO/56qDciDEo9UP7VllB2F1gAMFxJECsopo0e8kvhsFeLTtTebJtKe5yUyKymugBPXrc/2j+VWpboLOlCq3DnitmP+KG0h4W38TWJpInBiZm1LjoBUa4E+PXhklP960xp8xZswojPBMkDcEjGWFqylQBq2eFR//TdfDnlQj7XJ+rwtvLYkdV9dcFsmRcBC1xkd4gUG+yTK5WAaFzsAHNBqoprQVj7Q5QVvdn1zXQYSQG5Msju9idVYI3IDzCYTWFPOREgROEt5UUbjaDe4t7Idq7JA== 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=M9sXG9mwcMtjPb0Cvsjg3EnBix4qCzZKJ3rsmijzPMI=; b=jhjgZptqSpoDRK0yywwWXF9LhPAI6ORzprpofXhihVwWIFBJnZAvnTMJFzHKyRjOsoiYi6qwbNXXMDpmcbf6l+FKVUiNo93GHbV+Br8vkkGVtkRjnPTdqI0stFxRNhGR5BjbbsZ5OJcy4wSpyMVzih2hUA38tP46DSumXXjvjeZ2/YF3uFHW7dmyvQNWS6yUj+BtmtWKbYL9ApT/ly8zdtW04Lm4Vomzv/Vwx6UguFQpBrhiM0sNE7VUPhImiiDw5z/J7b0xSmyPoTR8DQHM35rJCpr203vpnWJKoPZ1mB5Nzif/8+Oxb/oe1qFvk0Xi0qLbrjn/Y8U8X4F4aL4uZg== 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=M9sXG9mwcMtjPb0Cvsjg3EnBix4qCzZKJ3rsmijzPMI=; b=JyeyhNa7avOyQe7m9tJgxSprcBTP24r8fJZ3CsWf80+r1KhHJIhtdPHPHWRfqBW9qdircGhCpzKAnejYWrfWkxHpd2o/SCaKtK323ZVpF+pAmKjVtrJHuJdfjSSZHYXF4HvwmQhoHMQv2AISTwSLk5+0G0xszd1LXdu6LmBVvmg= Received: from DM6PR11MB2537.namprd11.prod.outlook.com (2603:10b6:5:cd::16) by DM6PR11MB3900.namprd11.prod.outlook.com (2603:10b6:5:19a::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Thu, 30 Apr 2020 09:16:21 +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.2937.028; Thu, 30 Apr 2020 09:16:21 +0000 From: "Iremonger, Bernard" To: Xiaoyu Min , "Lu, Wenzhuo" , "Wu, Jingjing" , "Mcnamara, John" , "Kovacevic, Marko" CC: "dev@dpdk.org" Thread-Topic: [PATCH] app/testpmd: add cmdline option to set Rx mq mode Thread-Index: AQHWHibdQX4VjkC2U0myzV+9gs4Gv6iRYxjA Date: Thu, 30 Apr 2020 09:16:21 +0000 Message-ID: References: In-Reply-To: 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.187] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bfba1283-2c16-4719-e46c-08d7ece72637 x-ms-traffictypediagnostic: DM6PR11MB3900: 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:8273; x-forefront-prvs: 0389EDA07F 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)(136003)(39860400002)(346002)(396003)(366004)(478600001)(66476007)(66946007)(6636002)(76116006)(55016002)(4326008)(26005)(5660300002)(316002)(53546011)(110136005)(6506007)(9686003)(71200400001)(52536014)(64756008)(66446008)(86362001)(8676002)(8936002)(66556008)(7696005)(33656002)(2906002)(186003); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SS76Wxa8nX8Vv000rSNCXVViWXdKi8F28muwHC1x8/6x6gTym/lkXk2s+jlU0r9rI74Hr4ASNrB40CEWT83qHX37y6BFV9eX/cBAInePmCAQvCZFXJbX/gLCkPTO4q8/DdCLwPEu8dI9B2lAsCNeQ425Yo5W1UolA+Rq3efMi7f1+y5cisrByqzI7/AOJZJcsP2lL2JyQkmtyRVS7ZPXkNIOPl1Y/yBxgLZgpKIer8/pFc5W3f7AlbF9tPFcs5rI4de6ODOfWdCMK/rkJ2YVFH4uhnyk+bsQQaUQXclGU9Rv9kxV4o/ecSV/gJbJgHh3Qvqr6PaBrHHTWeVwoXJ95UwH9AGfsLOUpdc0NmB8QJ+LJfWVL4jMOyBvv7La5sKx/lFoQp98v83BGD4YUeOY4r30NTHrOr6HY4dnjEEiH/TrJsI2kJyfAfo89NqSf3Ad x-ms-exchange-antispam-messagedata: 4ZGiKXl19H5Cyd9Ul4oZYgBtR6mcDN/3Z3Me9RLMyY4w559hEpozjUFKm0Yb1kW0S7OPbXNQnwzqGdNcV9Rcs9CfoBu0mnvRoXwDA5ykw1Nn2/0W+RRCUJHaR9k3+AQU5jViO0/9T8yK6r+fO6TW/CO5yBOy2/yAm5pxbpxK1enE2+ztJZPBghmwfwrkcWELHGaO27pl7tK5007BLDo2OjXmR1vZ26Ew2E08sggnTmfh7IoTATJznT9ER7/RrG81LDB0nYnbM8ER1id1yMAzzRKeJuL22STQyUGW2rcRHA4oheeo2Y1jR0sP/HCfO1X6dtt3j6o6mwozV1LHfs0k1n0SoajQGRivm7GDfmbDQZbxsY9V/bWjcpEUOOOn3WlEAbadWtwKQ6ilcohcMhopkfkW65tyL5MWNTWOu0jx6WPzYRNcAGqvA5dBtmI7vblM69B6BlJaATkHCFr7AA2VpRNhUcoKgyv0VpjOcIBlVoi1m7SE7bmJ++cX+nH3e3FLs14K8EQ3XsPyf75dgheRUaXfdhdTy7D23iAnSlqWCOnETmKbVcwzDyrPHkXo04jAtaQkgMwRLylRLwGmzh+dRKVLHYFhvBQphRP55E04ir5HFUAtz8QnP+UQOS/vnzZ1mCNE5xM5Th1mfj86f9yIydGc0gItuwwI6JaDnS8bZsqaBpOIVToKoJoYwHk+oeUE8FQWhg28VcLVckThuWDBk3v0BysOAuv9n7+o0telq0JJywM43UZU+R6r4kWmXV8IRcr0DCKPA3iC4CbBi/MNdnXGZrlyZO1cXvXaxs9G9az2y3DD2IilZ/sDDRhcvYEz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: bfba1283-2c16-4719-e46c-08d7ece72637 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2020 09:16:21.8232 (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: r9sc6suTPWcfCVKCMexFcJKlwknqfc1e4Y9BS1F7k8wjvo7mttqIPAzgrbvuJy7hv6Ia7VleCV1creEVDHhdc5HW8dc7d2QoSpwVeA+W844= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3900 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] 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: Wednesday, April 29, 2020 2:04 PM > To: Lu, Wenzhuo ; Wu, Jingjing > ; Iremonger, Bernard > ; Mcnamara, John > ; Kovacevic, Marko > > Cc: dev@dpdk.org > Subject: [PATCH] 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 | 12 ++++++++++++ > app/test-pmd/testpmd.c | 17 ++++++++++++++--- > app/test-pmd/testpmd.h | 3 +++ > doc/guides/testpmd_app_ug/run_app.rst | 7 +++++++ > 4 files changed, 36 insertions(+), 3 deletions(-) >=20 > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index > 30c1753c32..a9dd58e96b 100644 > --- a/app/test-pmd/parameters.c > +++ b/app/test-pmd/parameters.c > @@ -212,6 +212,7 @@ 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\n"); > } >=20 > #ifdef RTE_LIBRTE_CMDLINE > @@ -670,6 +671,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 +1365,16 @@ 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) > + rx_mq_mode =3D (enum > rte_eth_rx_mq_mode)n; > + else > + rte_exit(EXIT_FAILURE, > + "rx-mq-mode must be >=3D > 0\n"); > + } > break; > case 'h': > usage(argv[0]); > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > 99bacddbfd..9536d6ee27 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 > +/* > + * RX mq mode value set in the commandline */ 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..32bb324c94 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -602,6 +602,9 @@ struct mplsoudp_decap_conf { }; extern struct > mplsoudp_decap_conf mplsoudp_decap_conf; >=20 > +/* RX mq mode parameter. */ > +extern enum rte_eth_rx_mq_mode rx_mq_mode; > + > static inline unsigned int > lcore_num(void) > { > diff --git a/doc/guides/testpmd_app_ug/run_app.rst > b/doc/guides/testpmd_app_ug/run_app.rst > index 727ef52b8f..4f46299e68 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 queue mq mode. > + The default value is 0x7:: > + > + ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG | > ETH_MQ_RX_VMDQ_FLAG > -- > 2.26.0 Should there be an update to the release notes to announce this new tespmd = command line option? Regards, Bernard.