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 B19C8A00C5; Thu, 30 Apr 2020 14:13:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 34BE11DBAC; Thu, 30 Apr 2020 14:13:54 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80077.outbound.protection.outlook.com [40.107.8.77]) by dpdk.org (Postfix) with ESMTP id 8F4461DBAB for ; Thu, 30 Apr 2020 14:13:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jvKMBy+SNhpuiEOZu8cfPQ9ko/iPlmScxXDudBCbTReA6brO7OlOfjPyYI+NDEgEbDl7zRuw3IhfiBr+da2ozPAF4YIUPMJ7EWp3udtuuBo2P+pQLPAzMz90Trd4cn9h7IHn7wPaBkuGcraH6jtMmebWoekttRQ5aZ4g8kc2B+TAUEN6WHn9XoV4Rk86Xc8+8K8046xCn+cRhYawL+/2hyLcNc+cybGEeFB6x3gagDPG9eu8w+3agRD5BeanbhZgqhHSdlbhdcIHYuPxnCj84GvJ/n8Nm456twfHan0qTIdo5/1bhpZRrE9A0b4LgLX7Y+/lqDJwtgn7gFAFmu6sfA== 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=CoD/2L01UK5X/o2dbI5JJq/wb8wAFnV2+OcxYX8AO5Q=; b=cUJoEzzJ+JF4eV10OgkGE9CGZBIxb79Q7mO8c+Kc2R/i0uWIaL1/67UhUgyLyVfUsNFjICkctcCwHxsIG3x8TkCuEfslsQtnPSoIcwFnOiNXqGsu0RtZ8k/8bQuT8TGqAQPaztmlcvffQ9VTNFvx0/6nnCBAlee28hKDD00xY233wHk3FDZI7q3kxJTZmLah8Fjm39ZoJD9Wh0+d1FCdZg0XXQq9LqOZVJlRSBzzoL4ynHnOSchcrPT6JXJgsYgi1fNzo2yZTv+41PF7JQrG+WEr72yoJQ8SCjVV0VwxhvWrlZFJSd/k8vyBHkaFIQXMhBglpdO5YLmN8/DmBaM9gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CoD/2L01UK5X/o2dbI5JJq/wb8wAFnV2+OcxYX8AO5Q=; b=fbk8+RNZa658wPC9rfl09gJIWdBo1BZqjjaqTrRbnNRGNS9B4a/G8E+SSQodztfYKxCqqbCikGPjEOWlj+7YysuceQHPZEvuOFAbw4Op+ySNTVp1wWlpc3mPFFIWivNqztjtAB4yJVCmOpWFfYbuH/cHMM040T6vtkIKjOauFIg= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=mellanox.com; Received: from AM6PR05MB6567.eurprd05.prod.outlook.com (2603:10a6:20b:bc::23) by AM6PR05MB5000.eurprd05.prod.outlook.com (2603:10a6:20b:2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Thu, 30 Apr 2020 12:13:51 +0000 Received: from AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::5513:b664:af25:6551]) by AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::5513:b664:af25:6551%5]) with mapi id 15.20.2958.020; Thu, 30 Apr 2020 12:13:51 +0000 Date: Thu, 30 Apr 2020 20:13:34 +0800 From: Xiaoyu Min To: "Iremonger, Bernard" Cc: "Lu, Wenzhuo" , "Wu, Jingjing" , "Mcnamara, John" , "Kovacevic, Marko" , "dev@dpdk.org" Message-ID: <20200430121334.42j7fcplco4ss7gg@mellanox.com> References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-ClientProxiedBy: HK2PR02CA0208.apcprd02.prod.outlook.com (2603:1096:201:20::20) To AM6PR05MB6567.eurprd05.prod.outlook.com (2603:10a6:20b:bc::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mellanox.com (2408:8025:34d:a20:b4b0:6780:25e1:b57a) by HK2PR02CA0208.apcprd02.prod.outlook.com (2603:1096:201:20::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Thu, 30 Apr 2020 12:13:44 +0000 X-Originating-IP: [2408:8025:34d:a20:b4b0:6780:25e1:b57a] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2242821f-fb18-4a6a-5006-08d7ecfff133 X-MS-TrafficTypeDiagnostic: AM6PR05MB5000: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 0389EDA07F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1TDmxWwkZP3RIv+xgvzjYb2HwKP1gvJaLMX9TJd1UXEwinJQTi6eZ568UPQK+kXuk12QpBou1ucUIbLGGxMkjY730Dmqb4Qsyn4TCz13KhO/OaG7X0PDdqguRYL9NvtFfwjRLpkeSoipJi2vv8zAXf3KXtvp6S0RWJkCsmx1gajOlfd6YwmJppfR1Qz2Pv/HcdK9oCQMRErkXb0R39zpzPheMZnLJrAM7O9aRL7T3NXvQYFqkOL89eaOQMFPfXaZh0/UmqIsxFphcxjFBoioMxwprdzXbZfst7xVkNyf8z4wXm4B6uFYLr9scanbzd5odgfkpV57CUcXWGkFpsp2AmWBXEmy2UlVrxawcSfrFsyfq8r/OMAyXQHfwB9LoKdP1H/MpUJDs1HWKFk7ewaAQGL9qR4RYJ/CUDavQMd3jd4DWmQ5YrzqjnrxoKtOq5QN X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR05MB6567.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(376002)(346002)(39860400002)(366004)(136003)(54906003)(6916009)(8936002)(8676002)(53546011)(6666004)(5660300002)(52116002)(86362001)(7696005)(316002)(478600001)(1076003)(4326008)(8886007)(66556008)(66476007)(55016002)(66946007)(186003)(16526019)(2616005)(2906002)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: pCmR4/Mf8Ql8NMDYekdJ2nzDCpTV+JfWBgl2Wrx/QXrF9ES+W1QwMPFQLvLuMdqJlnEQ9hKSLTZUhxtSH67yGxbJYvcWANhUDIooc6tnHZhRyaSCTljC1Uuw4XN9BpivTiQqDjCU/WBvXi8QcfW9JCZsAI7SIa80jdm30oNGYc48X2ggIw80xkMnjndILrDHLub5W7SCnL9Im23nmFdOmzI0E6RG8M0aHDm9oLj1grd1KMyZDX1yPx0zhaNxEyho8/lWIBk9RWGYL0oygn8WUvEwlO+ARw7NA+9jqdLXS/MPb05/zIHbySGKzr2PcC2sw+KskkJ5t/KLwtJh6JVsUlvQ7vfDl46RvE6d+TSxb7gXbK8ZsyjJunF7BLJbL+UM343WT/Ia72pNK2ixAZ1BXkjlesxItonSPKeCtIa9LKwTTlPHUFZLFGzCIZ8n9QBCcM8t+53BqEaAJHJ3/dI4D5F5ZOyZgjc4twzgKlthj+cQUBIytcZ4G0t9D5VYYxM3BvcxslDwttFZgFRRIhpT3+Mdlm9ErGQfCAMH6qNpHy6Cz1BFOXhW6Xl+aILVrWBIH1IXDleAYUy7Dz6wvBLNCmFTzCCxWB53svVUGvtO7Utg7QznTgU5+fzrDGQQC1xL+qeBV0JnMy5ntlgULaSVmjLco894cloRr8N6UqA27iAUr9JFv3daO8k3PYNQ/OaHE9zyIwRVKeAUO9xFwf8qBNz4P+staDI2OrpD64NkL/aducYUXgS50NNUKmgY12qtlDQm7y60Zba/B1scJ7soYbagemzlv9YhsJ8bEwFEI3Gk6XRJGWbsEoR//pld47/oDZ7Xx609Fu+9RaWpNd1RiCQO68vFWuypcB7SgmUjzhY= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2242821f-fb18-4a6a-5006-08d7ecfff133 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2020 12:13:51.0348 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Rivjwgk9QqXZWHHkCkJlnkgrUgH5gTzXG8/TvV5mHK+d9uYK+B6ySlsBwXX7EQtkEraSXEOZIhlBnjPeSM+7+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5000 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" On Thu, 20-04-30, 09:16, Iremonger, Bernard wrote: > Hi Xiaoyu, Hey Bernard, > > > -----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 > > > > 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. > > > > The reason is some NICs need to do different settings based on different RX > > mq mode, i.e RSS or not. > > > > With this support in testpmd, the above scenario can be tested easily. > > > > 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(-) > > > > 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=N: 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=anon\n"); > > + printf(" --rx-mq-mode=0xX: hexadecimal bitmask of RX mq > > mode\n"); > > } > > > > #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 }, > > }; > > > > @@ -1363,6 +1365,16 @@ launch_args_parse(int argc, char** argv) > > } > > if (!strcmp(lgopts[opt_idx].name, "no-iova-contig")) > > mempool_flags = > > MEMPOOL_F_NO_IOVA_CONTIG; > > + > > + if (!strcmp(lgopts[opt_idx].name, "rx-mq-mode")) { > > + char *end = NULL; > > + n = strtoul(optarg, &end, 16); > > + if (n >= 0) > > + rx_mq_mode = (enum > > rte_eth_rx_mq_mode)n; > > + else > > + rte_exit(EXIT_FAILURE, > > + "rx-mq-mode must be >= > > 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 = > > GRO_DEFAULT_FLUSH_CYCLES; > > > > +/* > > + * RX mq mode value set in the commandline */ enum > > rte_eth_rx_mq_mode > > +rx_mq_mode = 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) > > > > if (port->dcb_flag == 0) { > > if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) > > - port->dev_conf.rxmode.mq_mode = > > ETH_MQ_RX_RSS; > > + port->dev_conf.rxmode.mq_mode = > > + (enum rte_eth_rx_mq_mode) > > + (rx_mq_mode & > > ETH_MQ_RX_RSS); > > else > > port->dev_conf.rxmode.mq_mode = > > ETH_MQ_RX_NONE; > > } > > @@ -3438,7 +3445,9 @@ get_eth_dcb_conf(portid_t pid, struct > > rte_eth_conf *eth_conf, > > } > > > > /* set DCB mode of RX and TX of multiple queues */ > > - eth_conf->rxmode.mq_mode = ETH_MQ_RX_VMDQ_DCB; > > + eth_conf->rxmode.mq_mode = > > + (enum rte_eth_rx_mq_mode) > > + (rx_mq_mode & > > ETH_MQ_RX_VMDQ_DCB); > > eth_conf->txmode.mq_mode = ETH_MQ_TX_VMDQ_DCB; > > } else { > > struct rte_eth_dcb_rx_conf *rx_conf = @@ -3458,7 +3467,9 > > @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, > > tx_conf->dcb_tc[i] = i % num_tcs; > > } > > > > - eth_conf->rxmode.mq_mode = ETH_MQ_RX_DCB_RSS; > > + eth_conf->rxmode.mq_mode = > > + (enum rte_eth_rx_mq_mode) > > + (rx_mq_mode & > > ETH_MQ_RX_DCB_RSS); > > eth_conf->rx_adv_conf.rss_conf = rss_conf; > > eth_conf->txmode.mq_mode = 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; > > > > +/* 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: > > > > Enable to create mempool which is not IOVA contiguous. Valid only with -- > > mp-alloc=anon. > > 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? It should. I'll update release note in v2 soon. Thank you. > > Regards, > > Bernard.