From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0057.outbound.protection.outlook.com [104.47.2.57]) by dpdk.org (Postfix) with ESMTP id 84E8A2BBB for ; Thu, 23 Nov 2017 13:08:29 +0100 (CET) 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; bh=nITMRtSmzl9Iy2727s2uxgSzRsltq/6Wc9cVrvdy5fA=; b=rhKK6Dw78na9wEFNPZXt2DupvcL3f2KGs53T1lUcxU5ZapNsFYzlYmbbxJc7k6QLBHo/iFiZEDWJkoxcOEsaKeLTJyir52uDrkszuk1PwcI4rskBCUdBz1kcbcqkIwzavBCY55JluUZ9UQ7nw7K9r7QYMUomHuJ2As6S6zgS/Bc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by DB6PR05MB3144.eurprd05.prod.outlook.com (2603:10a6:6:1a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Thu, 23 Nov 2017 12:08:28 +0000 From: Shahaf Shuler To: jingjing.wu@intel.com Cc: dev@dpdk.org Date: Thu, 23 Nov 2017 14:08:02 +0200 Message-Id: <20171123120804.143897-4-shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171123120804.143897-1-shahafs@mellanox.com> References: <20171123120804.143897-1-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: AM5PR0601CA0033.eurprd06.prod.outlook.com (2603:10a6:203:68::19) To DB6PR05MB3144.eurprd05.prod.outlook.com (2603:10a6:6:1a::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e7331560-d29d-4cfa-f56b-08d5326ae837 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(5600025)(4604075)(2017052603258); SRVR:DB6PR05MB3144; X-Microsoft-Exchange-Diagnostics: 1; DB6PR05MB3144; 3:PPPFv+NWYKJLdD7F1OawUOiwZT2ETRfKYHeCq3pXtGf7Jhcax0udXOaacWjk5Avv42UIcBDaiCrf9zD/YNjRmNeaZ9NtWkV00uBo+Tz/braXKxoT31Eg1BEajHJa76x0mFN38mIMXhDEGpuRsgeCAlVZdwj/ilnJnALBpYUVPzPjtjkg7CGcszaMjEmqxn/20cMHM3g00QEoaXpiuS5RawTpiH9cdoJn/oGJWvUz5+d0InCOGTaEoGdqnbCRR3pE; 25:Ap56R+dKIqFNrkdckCvfz9N8cM5l2volE2eecvKMEadIICn78zyscaZJ4xfzimUJKHorFn7Jg3WwfDyy036uQ1o/eEXglBPtHrNnOKU0MwtgriabML1bpqzWRRfwdVuERPhXsTh8XmPX/YOcZdE5KONIc5GTXRIIMY1sERBm7svlBtTYk6XZiXkB5bNqeP3lQ5+FRrkEB7plryJlcp76CltpQf9lUA1ZadS+ieZJJrCKKfdVx238sWgZT70+FhXpA+0V0jstBJGteHuNtnegY7XuOZMSjaCk8OfsVUfZyO9SDgkP8YssHqMsUMnjjOy1RU/YtqDP1GwHDjMNMQpOfQ==; 31:fHu0lZLqzA08o3EmLTqzH5se/ofAJLBsZEHcJaFyJu/0dfbuW1lfWhywwY+qBkSmQHNxQoc/hUuB500s44mSyLd23K5g9R3Ta+HIfazRgBHTGerKv377sByGQ+ujeE8UXmh1yU7c+2CWX4izWf8RoRzK2KooSM5Szk3UQZBJmANg7I4WgisXE3ho5Rbc5xhYjsCAOla4AKm0ZcgNuEHrGrhBrfogt9QUQFaY59lz0js= X-MS-TrafficTypeDiagnostic: DB6PR05MB3144: X-Microsoft-Exchange-Diagnostics: 1; DB6PR05MB3144; 20:sAE3bmVxamdzCugC1VSWVIDcXjgyoiG2JMgRwICibVKvQP7qjMp2gnxn8TRgqIFCkedt9p0OgW1wDLyNM26gINPN3d5CRjH0HV8aqqMBY5jpSxu/LzYOxJLnfizTquzWMXtVHh01lQ3+v0kvKlgwjT9qwflRskmAP/vPwNEZEl7oTvUl8FXoYHEr8MfkGBIBrxNNNJbph6+HKCEkOR3UHGCE3Ue5Vyv6cV9wgZh2aj/7cDw69aB8s5EEDJUl85VhXrUhYshUX8HvLK2ApUA0U/dqCXwalHPhfSlhd4QSyAe/OT+V8wGUZlcx270UN7XWNXKHIDeBgw9gTrzYyYGnWAWwhHcUYFIQpGp1LEy2ybKgZcZxn8ufgE/zM+vH8Xe/s7u5MiLHXT9Z9jc1fzDbtiZvU5TZaUCbeMLf8b0CqTG8uiojvFviQ7LRElvVw1EiFA7E2Zw0dzdG7BiaITozAoLkGGRx5Z99zU7fEefcFJ2ev6ZeMC7bnwqKU443jZvr; 4:zOe+xe4ijnfhubPo559HS5p/KFUsRFwbbOfMaLWXDt5Npb9YMb5xOlavxIddRQtp6lwm7cf53qB0g1BJUdGBoqheqXiPQAkUv+O/+V8UeKtuJrRUu6LP3jwZ+GUvHO+djcDGG336jBffzldSPUi0NxCvZpYg4iA96xkBXLikIOIVoipWvXyFOSUM/CLYrmhWLUaHq1aysHJpAdAO6uwfQ+76w+/RvzuBxCnuL10L/6/XB9AWbcwXBrMKFUOzjF+pTuPYd775PlVFmjXqeqGKuw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3231022)(93006095)(93001095)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR05MB3144; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR05MB3144; X-Forefront-PRVS: 05009853EF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(366004)(376002)(199003)(189002)(6666003)(478600001)(8936002)(2361001)(50226002)(4326008)(106356001)(50986999)(76176999)(2351001)(33646002)(68736007)(5660300001)(189998001)(101416001)(36756003)(48376002)(6916009)(2950100002)(21086003)(50466002)(105586002)(16586007)(33026002)(25786009)(86362001)(66066001)(97736004)(2906002)(316002)(53936002)(47776003)(5003940100001)(16526018)(69596002)(55016002)(1076002)(6116002)(7736002)(3846002)(52116002)(305945005)(81156014)(81166006)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR05MB3144; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR05MB3144; 23:yNkKVI+hljA/SXQyAWn/JnP3zEd4+q8P8Opku5/Tg?= =?us-ascii?Q?xRotckIcAXW/8aBnin5tH5Xa2hf+WxB6IMrG7HmMKNlcD+QSGrg9v4BAT/Q8?= =?us-ascii?Q?prKI88y1hL9hLVNCiXEMLs+JuDnpzu36+FY9XGzWeC4WupBTztApN2O6GcKK?= =?us-ascii?Q?AkDbNyxaRk+tNHfjpiwItxBvruTHk9J/1TmICoDPizWrTYJYzEsNUcgL+QMV?= =?us-ascii?Q?VZ3uI52Gn4Gmn6Pga1AP+mErUFD4SRqLsswKaty7ls6QaZVW8LSQpsGt+dPj?= =?us-ascii?Q?RKg1z4EbKxJKtelrANWH1TwZad4hwN8dNO2xVQJO2Nia0hMDEOBNnUqp6hYC?= =?us-ascii?Q?zG3/o1SmGaO8Xu+M4/EbI2TjQN6SB4ItOgHkq24EFCLhBA26nS+BJOPH0jk3?= =?us-ascii?Q?+mfpUSPf8PfnKANqQKgbBrYIRKOkxq6XFndLv2M8GgES90z3XR2GOqZNKkhb?= =?us-ascii?Q?3C5gO98bTxmY2csgWUm3vJTHBx1Zt+MDOgA6bhmJBFUpsnec/zczlfSspr5h?= =?us-ascii?Q?BeYNO4dppMjoEIH69GBNBPsSeUoLtykjoXTxzW9ZZdkGB6Avco+p5gl3Kw3v?= =?us-ascii?Q?93Ks5LKqx3eE87+JbbZ0WAiovNNMO3yYoRpLrf87Vv87/AE5uLQvE7Ex4lG9?= =?us-ascii?Q?ia5xqocPFK3w60rYEdAjvuud7JqFGBuVGgHhpdKBn8DPKJFnOUkJ0WHsZ5c/?= =?us-ascii?Q?WuBPYY9dPBmKi/G5CcvH2D/+UqgoNJBBr9GTatuFGbiIGRm3AxZQZvqzRWr5?= =?us-ascii?Q?x9uBfkxfU17GWCkX78aCyz2xjWhi+ujkhdgL/xEoBTqS3UwASmMGn6ArrfAV?= =?us-ascii?Q?eSYsSFv0HkyEjhorTcRCBmk4tUnEH/NuqZN2ivoYQ0GurSlpHqinDsYjs3vz?= =?us-ascii?Q?anXC9BYHxP7a2/cL8GCJRm7t9vAOKgHja/FpZ1ItIxwax5XixgmLv4tWq9eH?= =?us-ascii?Q?60KavX97pogP+J1I+GPkLC6v8rciVKQPODwavt4b+EjVzedRzn+1EJ8regVX?= =?us-ascii?Q?3Ixh+wd0466XUdexr/BzeSIapb43DHpGYNRtdt+opUI5V0dVFqcEg6DJhyY2?= =?us-ascii?Q?nijkIuutPvRXoZNlgPn4P5/y1hyOwKHxx3R1XQkewk9LYDuPW09HUOSb8mjS?= =?us-ascii?Q?45uveo3z8RlhKNnIB4LBeYUS14K/pl0QlbLFNnfCbR8yTky3QtA+eupAhz+V?= =?us-ascii?Q?88H2laSgdLFwUlRw0j2i9rekyHc2CXd6AOG?= X-Microsoft-Exchange-Diagnostics: 1; DB6PR05MB3144; 6:bUGZK/HgdIb4k1fvXL4RKsWDu5oYDvwCL9xYhe5+FHkfnGzZ5W+UX4FrQziMLRcn9KENSosfc9BkiQNWoow0wf9+tt3/+v6OKs8tbeX5POvu3KIO5Vv/4GWTRroRjbOcBu2frV/mdw6m79IoUiILH5Yh2scHHP8V+WgzfpDOC4DjaiHaYFZyEm7+LQ7EEIlYId8+VphNi9czamVcvXoKK+zobwphKk1InPt3Z0xByDhER3qwnHpBJABVOkQE6ThsWKXDWwJi5kORJbkvPDYvaW7VXbR1o8yPlgcHWa/ftgDvQjEOH2AXuZJO1lRvYrxCNx2YI/STPd8iZ/jwwz+qqf3wD3EG+5KSNw6fICtuSVQ=; 5:V12OSiocT++cE6uPq1aCU/DmNTruro8mAPmnOctoW3nybGrNxgu98DiSmR4pfzYyb0GmmDulvDpw+aruyCXyXGg1p8SPqlmPOKuQYJSdklhGyh+zC0YLwTZDXv4JD6kQ5yje7msrv8AD12qE+FEz8oTSqCjEUsHaNaNmKIfAhvI=; 24:x3teLDSIvfsC5y24t2okRrrDJT1GfMrnNZNPqQzUHM/3BbjCCIGTsxVxeIIzHiggEGyShOSPhtlchzZSttUkruDQlpokmzeBNvvanvrmTfU=; 7:VJsy6RxCtlAzMmZxRW06S5tB9R7bYNGd/GrPFyOv7uPJq0MKDCxj1ubn1mtZVK0Plg5bul3dXcVT8OZkp6XTNyWpYbJH2oOYj2DUOcEGEUzLRi+1zRoNQXFz5HK1Ebi9WPUtbDjH235cm9yH6ix93Gz9FtQgXU0msh2rr1SQrO97IDWfPyEssVX3rc7sK1fbp1Y2lT13xe0fYAzIHPliLIy3XGRySASnvMAc0UFiUnv9JNQrIHBWY0gDXJsgzPoA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2017 12:08:28.2009 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e7331560-d29d-4cfa-f56b-08d5326ae837 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR05MB3144 Subject: [dpdk-dev] [PATCH 3/5] app/testpmd: add command line option for multiseg 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: , X-List-Received-Date: Thu, 23 Nov 2017 12:08:29 -0000 This patch enables multi segment send Tx offloads from the command line. Signed-off-by: Shahaf Shuler --- app/test-pmd/parameters.c | 8 ++++++++ app/test-pmd/testpmd.c | 4 ++++ app/test-pmd/testpmd.h | 1 + doc/guides/testpmd_app_ug/run_app.rst | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 1a145c387..8a68a39ea 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -214,6 +214,8 @@ usage(char* progname) "disable print of designated event or all of them.\n"); printf(" --flow-isolate-all: " "requests flow API isolated mode on all ports at initialization time.\n"); + printf(" --enable-multiseg: " + "enables multi segment send Tx offload on all ports.\n"); } #ifdef RTE_LIBRTE_CMDLINE @@ -566,6 +568,8 @@ launch_args_parse(int argc, char** argv) enum { TX, RX }; /* Default Rx offloads for all ports. */ uint64_t rx_offloads = rx_mode.offloads; + /* Default Tx offloads for all ports. */ + uint64_t tx_offloads = tx_mode.offloads; static struct option lgopts[] = { { "help", 0, 0, 0 }, @@ -642,6 +646,7 @@ launch_args_parse(int argc, char** argv) { "no-rmv-interrupt", 0, 0, 0 }, { "print-event", 1, 0, 0 }, { "mask-event", 1, 0, 0 }, + { "enable-multiseg", 0, 0, 0 }, { 0, 0, 0, 0 }, }; @@ -1115,6 +1120,8 @@ launch_args_parse(int argc, char** argv) rte_exit(EXIT_FAILURE, "invalid mask-event argument\n"); } + if (!strcmp(lgopts[opt_idx].name, "enable-multiseg")) + tx_offloads |= DEV_TX_OFFLOAD_MULTI_SEGS; break; case 'h': @@ -1131,4 +1138,5 @@ launch_args_parse(int argc, char** argv) /* Set offload configuration from command line parameters. */ rx_mode.offloads = rx_offloads; + tx_mode.offloads = tx_offloads; } diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index a97edcadd..2550677c3 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -339,6 +339,8 @@ struct rte_eth_rxmode rx_mode = { .ignore_offload_bitfield = 1, /**< Use rte_eth_rxq_conf offloads API */ }; +struct rte_eth_txmode tx_mode; + struct rte_fdir_conf fdir_conf = { .mode = RTE_FDIR_MODE_NONE, .pballoc = RTE_FDIR_PBALLOC_64K, @@ -599,6 +601,8 @@ init_config(void) RTE_ETH_FOREACH_DEV(pid) { port = &ports[pid]; + /* Apply default Tx configuration for all ports */ + port->dev_conf.txmode = tx_mode; rte_eth_dev_info_get(pid, &port->dev_info); if (numa_support) { diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 6af70e02a..8e572704e 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -415,6 +415,7 @@ extern portid_t fwd_ports_ids[RTE_MAX_ETHPORTS]; extern struct rte_port *ports; extern struct rte_eth_rxmode rx_mode; +extern struct rte_eth_txmode tx_mode; extern uint64_t rss_hf; extern queueid_t nb_rxq; diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index cb94582b9..b21a1fe8a 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -497,3 +497,7 @@ The commandline options are: configured flow rules only (see flow command). Ports that do not support this mode are automatically discarded. + +* ``--enable-multiseg`` + + Enables multi segment send Tx offload on all ports. -- 2.12.0