From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20051.outbound.protection.outlook.com [40.107.2.51]) by dpdk.org (Postfix) with ESMTP id 7BDFC1B3CB for ; Mon, 29 Jan 2018 12:33:36 +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=/4UWXThP7hmnP8fYRzyknR697weR05opvDfl8NiPBK8=; b=fk1CqMIVWJiZni2P3mNEz33V3B+En7oX6zxNAPSCzaNHVSe9luQQ9cl49n0thhfx4k4AOCMBKHsHT9t7XZBuTpejcQMkixlsH2YFq3NJ1159T+uxN01gxEV3lNnMCX67TXvr3xWgAXhNtT3fDnXGRcqXdgNuRnG0Sgi+sSMOPhQ= Received: from mellanox.com (37.142.13.130) by AM4PR05MB3201.eurprd05.prod.outlook.com (2603:10a6:205:3::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 11:33:33 +0000 From: Moti Haimovsky To: wenzhuo.lu@intel.com, thomas@monjalon.net Cc: dev@dpdk.org, Moti Haimovsky Date: Mon, 29 Jan 2018 13:33:18 +0200 Message-Id: <1517225598-132061-1-git-send-email-motih@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1516695081-178919-1-git-send-email-motih@mellanox.com> References: <1516695081-178919-1-git-send-email-motih@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: DB6PR0301CA0045.eurprd03.prod.outlook.com (2603:10a6:4:54::13) To AM4PR05MB3201.eurprd05.prod.outlook.com (2603:10a6:205:3::30) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2a4a4b3f-a9d9-4544-89ae-08d5670c21b3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM4PR05MB3201; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3201; 3:KOa3ftytm/jTs9iNHHN49tt0grxhcFX1Dga7vADm9bZh7/4qaOOakc+mmq/9LXLEM6OZSCrcln1XFKX5BbcFOSZGuPV4vxJR2QmZjx48Sc1EHfBfXe42OEvzK7cqW1LZUEOr22QNf77fBj8IItKaXYv6dQfPs9jUPYTYQOq5pddJ/iPZRKwyTlrrLYX+ldiFlOHwf9e0nqJgo6vZQsgqotD6MqL6xUfVoCxrg3md1g+mRUakxPyRWVxF+2jCKYsd; 25:Ktv1WG1Sa+s/yK5N59unudWvhJupJl7sGr8ajtqsvhVVKm6HhAJN915wSPviMhuBTLfZBx9blIccuY9wsmLI1iwQLhv5UVy1I9iFqup5DPCzuVfKCIrivc8gaobjRWI+NlfW5gc4prjfPs+MmJdi9s0KZo/MsREJETDmBvHe0vMEwX0T39yrJrKeEVrS3UMxxgH2vTPVP+BgHputDx8agn8FIaueRLUL2o9rXHfB2JgLRMRNfMkm/XsZkqsLtT55td5/ys+ktOjsVbwQ49STASzEAPk2npwiRX6FeRsE95Omb7mM0imM78zUXahrtKujg1NYWG95TG9LXaqJqWyhyQ==; 31:9qHxSdzpTrppU88sFFB+qdyj4SckbnmI6fw8nqWOMhZi5z6BG61IF6Zts0vzKOUm7ft0RSa+AoCB9gflX2LwYGMpx5sctRhY52IljlAsI7SX+OmBKJ6Ew6y2TeHp/OGOcYR1rl2DSpzijDyY467gTYBvw+8CYP1MZ2JfNBP4+WezR0reZXn1j03+yJgAUNHqWOU+D3b6XuW0ZFC/R0YnOean8FhWrqHh5bET2qka0/E= X-MS-TrafficTypeDiagnostic: AM4PR05MB3201: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=motih@mellanox.com; X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3201; 20:Dli5b+KS0cT9J63NN/SYv8LFGrDy1vh83gkcux2x4vtgwUdDUvN4e1qxC0Q3cztmv6kcchgG8Um644jlhBKZW/RdbUWIU4Cl/HugLfckt5heZXu8fXcEPdQ7eR15E5+e+immND2HzX+tNPS+zbDLvalrlijWJFsw+sqOGahmNcKuJA/aJiESCLGWqfsoEkHE9Z+4OLe16LlXBZ+cxAIFSjcLUG4dxuN7tTn0Ex3M3Hywo/pjFcDKtiZBQNeOwwSdrDNVritGM4rX7JMR6IbTtExG3ulPgGS/ED3n9o1htkZ1Lz5MG6X+NEXSeKBMlUvluOmzTCNhVveaI3zL5TwHoYR8RFqaRJ8gORN0g0PNygugFFJNNgndOBvFd5kHVZZz5qr66ywWVBEK4XaQjn96ZHnO2wA985rEa/BkW+YBkUdM/Q01dAhrHsdXgw/G0ziH9bK9vpyULjzZHS5PAM+4CNZOGUMt5u114nqW4e06j9fIEDussqj7FsV4TZlgHloK; 4:y3nRkULqSzTamo0/DN+3cUxGm6Uc9gJ8cGq/b8YmxsfCRqb6Qx8pM1hsFNgyAaqh3++8I1lqtwuyMEHw/8SzP7EO9IB1kwed+Zra3bRwLQiqUWEbvLH8CTCViaNXVECoqv6Cu1T0snzaYNd78Yf86GSaGIsRhCBCF1pN2QmEmfPooKuj1xm58BjTLl4Ew0BxYSi67InTdHtb7Mt8M9aIxJtF+LAFqJfBtgpYToqXKazWemX/ig0yaq5dSlWHs06f/k9AX9K0avJy11wYLIAHMA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041288)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM4PR05MB3201; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3201; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(396003)(376002)(39860400002)(366004)(39380400002)(199004)(189003)(316002)(25786009)(7736002)(76176011)(107886003)(7696005)(68736007)(305945005)(52116002)(4326008)(51416003)(21086003)(26005)(478600001)(97736004)(48376002)(386003)(50466002)(105586002)(16586007)(55016002)(47776003)(5660300001)(2906002)(8936002)(69596002)(6666003)(4720700003)(2950100002)(106356001)(36756003)(8676002)(81166006)(81156014)(16526019)(3846002)(6116002)(66066001)(186003)(86362001)(50226002)(53936002)(33026002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3201; 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; AM4PR05MB3201; 23:4sNF+WT1rdxq1ZRS3SkuKTd+5icVAID4iHzVe68DG?= =?us-ascii?Q?QKBOlJ+F1OUL8xr9obWCGOZ+hueeZ9tsL9BBK85XhRiBmSJFM19QVS1EZUFO?= =?us-ascii?Q?1qkeBFj0JTokl/UQaU3z1mDj0qh87LvUXhu7fGYjBeLGboRAIvlMKeGbgdxJ?= =?us-ascii?Q?Ei19QMN80LukIifM44eg3bbOrgxZJJNYpdH5VHh2D2mLW+91+yjkd7nO3HZp?= =?us-ascii?Q?BgruHameq2ye50hMEPJ5g5G+bxviSWYTGXKnk2eK7etO7MnFYB6FUZo8cJe5?= =?us-ascii?Q?Q6c5KTs7YnU3WqN2JkuThiUOLDyRKjXHCVu7z13H5u+YgRAHFv/uVuU3cu9J?= =?us-ascii?Q?SrIm0jdGRtjQvQSLRhWGv2CeOYgMk/NhsSsgLFsJ45bVf8HMyAhOSu3XNDnA?= =?us-ascii?Q?M2VuEQIlV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Ry4CPL21F30mpm0HJonmkZzspaBWOvQiST1TC7wu+tEZR9r/czlChyIp2gAv7cQewXvBlUbRS/ohTxP4XBEKjPC6r+T+brP6mDcbREaSq4atJawsO2lYOP+d3Y1X3EIcBp8X6cvmFQJ3BxQJXqTUo01UhLZIUM1t6h+2I/Lx7QjSo7NRMnjdM6pgTyQRntKfjErjjUT/TIlZCHm3ASEs2yORO4gJkqXCKy3fKB8gcT5wvgQONq8fAviUVbtvxTm9jkiJvLLpB37ic8Wk+WR7lehZ8QMYgONTZM6dA=; 5:EWdUCtWCiDOwI/TruZyKkLmLXTi204l56lu/mefjDpQqAGzw4t0DwwNg8016kbC93pKJaTvxgarOJz5MqGRtB3fVdajBzYHNr3onZHja4/mYCqbaaoHR4tv/RbPDkNVX6tGCzcnMYITfRl4+DGxwgDh2eEArNtEr6RBNy5xH9hA=; 24:EqtpQ0kIktOmNreV1B1Yd43OVy/tJ+2p8WasyVwJvALeoY0i8PUT+pqcWzcrNea5WRSFWNtgAu5wWbmbkEnJEZmjQMhM/aSPd5VGrQsUqwI=; 7:vDuMw6JbrV14AqhBAx4Nip4O+T28Mt8UvMswftgdpGbM1egljvqMeWCS0AaJLStyuUA5HLujqNYeQLq5NXnLkxtEme+Fm6qp1u2wR384eATl5u28xddOIEVm0MsVSg34Snjn0RwOjEoqYhJ5kev1M0xudfWeFfgy7s1R1UHlM2imJSCeoTJ7SMX+4+MQpKFDxnSrIc+gi6zL2vBlv5uHnpuR0PG8sy4J2i61PEx+V7eC0TDitOMlC2XW9E0xNFx2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 11:33:33.7038 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a4a4b3f-a9d9-4544-89ae-08d5670c21b3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3201 Subject: [dpdk-dev] [PATCH v2] app/testpmd: do not enable Rx offloads by default 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: Mon, 29 Jan 2018 11:33:36 -0000 Removed the hardcoded preconfigured Rx offload configuration from testpmd and changed the Rx offload command line parameters from disable to enable. Testers who wish to use these offloads will now have to explicitly write them in the command-line when running testpmd. Motivation: Some PMDs such at the mlx4 may not implement all the offloads. After the offload API rework assuming no offload is enabled by default, commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") trying to enable a not supported offload is clearly an error which will cause configuration failing. Considering that testpmd is an application to test the PMD, it should not fail on a configuration which was not explicitly requested. The behavior of this test application is then turned to an opt-in model. Signed-off-by: Moti Haimovsky --- V2: Modified Rx offload command line parameters from disable to enable. This way the user can choose the offload parameters to configure the device with in a consistent manner. --- app/test-pmd/parameters.c | 30 +++++++++++++++--------------- app/test-pmd/testpmd.c | 4 +--- doc/guides/nics/thunderx.rst | 2 +- doc/guides/testpmd_app_ug/run_app.rst | 20 ++++++++++---------- 4 files changed, 27 insertions(+), 29 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index fd59071..134fd99 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -580,15 +580,15 @@ #ifdef RTE_LIBRTE_BITRATE { "bitrate-stats", 1, 0, 0 }, #endif - { "disable-crc-strip", 0, 0, 0 }, + { "enable-crc-strip", 0, 0, 0 }, { "enable-lro", 0, 0, 0 }, { "enable-rx-cksum", 0, 0, 0 }, { "enable-rx-timestamp", 0, 0, 0 }, { "enable-scatter", 0, 0, 0 }, - { "disable-hw-vlan", 0, 0, 0 }, - { "disable-hw-vlan-filter", 0, 0, 0 }, - { "disable-hw-vlan-strip", 0, 0, 0 }, - { "disable-hw-vlan-extend", 0, 0, 0 }, + { "enable-hw-vlan", 0, 0, 0 }, + { "enable-hw-vlan-filter", 0, 0, 0 }, + { "enable-hw-vlan-strip", 0, 0, 0 }, + { "enable-hw-vlan-extend", 0, 0, 0 }, { "enable-drop-en", 0, 0, 0 }, { "disable-rss", 0, 0, 0 }, { "port-topology", 1, 0, 0 }, @@ -875,8 +875,8 @@ " must be >= 0\n", n); } #endif - if (!strcmp(lgopts[opt_idx].name, "disable-crc-strip")) - rx_offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP; + if (!strcmp(lgopts[opt_idx].name, "enable-crc-strip")) + rx_offloads |= DEV_RX_OFFLOAD_CRC_STRIP; if (!strcmp(lgopts[opt_idx].name, "enable-lro")) rx_offloads |= DEV_RX_OFFLOAD_TCP_LRO; if (!strcmp(lgopts[opt_idx].name, "enable-scatter")) @@ -886,20 +886,20 @@ if (!strcmp(lgopts[opt_idx].name, "enable-rx-timestamp")) rx_offloads |= DEV_RX_OFFLOAD_TIMESTAMP; - if (!strcmp(lgopts[opt_idx].name, "disable-hw-vlan")) - rx_offloads &= ~DEV_RX_OFFLOAD_VLAN; + if (!strcmp(lgopts[opt_idx].name, "enable-hw-vlan")) + rx_offloads |= DEV_RX_OFFLOAD_VLAN; if (!strcmp(lgopts[opt_idx].name, - "disable-hw-vlan-filter")) - rx_offloads &= ~DEV_RX_OFFLOAD_VLAN_FILTER; + "enable-hw-vlan-filter")) + rx_offloads |= DEV_RX_OFFLOAD_VLAN_FILTER; if (!strcmp(lgopts[opt_idx].name, - "disable-hw-vlan-strip")) - rx_offloads &= ~DEV_RX_OFFLOAD_VLAN_STRIP; + "enable-hw-vlan-strip")) + rx_offloads |= DEV_RX_OFFLOAD_VLAN_STRIP; if (!strcmp(lgopts[opt_idx].name, - "disable-hw-vlan-extend")) - rx_offloads &= ~DEV_RX_OFFLOAD_VLAN_EXTEND; + "enable-hw-vlan-extend")) + rx_offloads |= DEV_RX_OFFLOAD_VLAN_EXTEND; if (!strcmp(lgopts[opt_idx].name, "enable-drop-en")) rx_drop_en = 1; diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 5dc8cca..a082352 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -305,9 +305,7 @@ struct fwd_engine * fwd_engines[] = { */ struct rte_eth_rxmode rx_mode = { .max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame length. */ - .offloads = (DEV_RX_OFFLOAD_VLAN_FILTER | - DEV_RX_OFFLOAD_VLAN_STRIP | - DEV_RX_OFFLOAD_CRC_STRIP), + .offloads = 0, .ignore_offload_bitfield = 1, }; diff --git a/doc/guides/nics/thunderx.rst b/doc/guides/nics/thunderx.rst index 1c800e7..5270ef2 100644 --- a/doc/guides/nics/thunderx.rst +++ b/doc/guides/nics/thunderx.rst @@ -177,7 +177,7 @@ This section provides instructions to configure SR-IOV with Linux OS. .. code-block:: console ./arm64-thunderx-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 0002:01:00.2 \ - -- -i --disable-hw-vlan-filter --disable-crc-strip --no-flush-rx \ + -- -i --no-flush-rx \ --port-topology=loop ... diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index 46da1df..076c121 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -299,9 +299,9 @@ The commandline options are: In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue. If the drop-queue does not exist, the packet is dropped. The default value is N=127. -* ``--disable-crc-strip`` +* ``--enable-crc-strip`` - Disable hardware CRC stripping. + Enable hardware CRC stripping. * ``--enable-lro`` @@ -315,21 +315,21 @@ The commandline options are: Enable scatter (multi-segment) RX. -* ``--disable-hw-vlan`` +* ``--enable-hw-vlan`` - Disable hardware VLAN. + Enable hardware VLAN. -* ``--disable-hw-vlan-filter`` +* ``--enable-hw-vlan-filter`` - Disable hardware VLAN filter. + Enable hardware VLAN filter. -* ``--disable-hw-vlan-strip`` +* ``--enable-hw-vlan-strip`` - Disable hardware VLAN strip. + Enable hardware VLAN strip. -* ``--disable-hw-vlan-extend`` +* ``--enable-hw-vlan-extend`` - Disable hardware VLAN extend. + Enable hardware VLAN extend. * ``--enable-drop-en`` -- 1.8.3.1