From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr60088.outbound.protection.outlook.com [40.107.6.88]) by dpdk.org (Postfix) with ESMTP id B92371B1D3 for ; Wed, 10 Jan 2018 10:10:08 +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=9j+v7ZsHLIBNzRSVCFY2Wydrv1kItDd5R1OmK0gP0po=; b=d+gVgNF5VTkxSiQubOvmfXD8clPiwjIWW4laPLu054NRU0JSx7odjePabHeFykZw3A2KoWnxDrb5FQaPmorL9O5z03h5oL6OkOnrxvdckybDkjaIDcCCBGJTWrSDZ4f4sU2LUcI6j9gf7hlo2hkmzxsHkdxRhkuaADC3UTjXznA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 09:10:06 +0000 From: Shahaf Shuler To: jingjing.wu@intel.com, thomas@monjalon.net, ferruh.yigit@intel.com Cc: dev@dpdk.org Date: Wed, 10 Jan 2018 11:09:19 +0200 Message-Id: <7935c0af7767174eebd61ee01ebc0c4f64f3ab21.1515575134.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: <20171123120804.143897-1-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: VI1PR0202CA0030.eurprd02.prod.outlook.com (2603:10a6:803:14::43) To AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5b10e1b6-da81-4b15-902c-08d55809f169 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM4PR05MB3137; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 3:6BitK+8SVdWCDi5dEhh45SC7zG2D00pZIIU62Lf1fmXRRTOuxLBTiyT+FT2ZV1E93qFRNFpMdTxtioP+lvkFjZFwMrv6F0UMq9ZIH5GxoZCCRhbG+vP8x1pTwZsxfAfn80W4IKwzME616LySoWgcRCIdRK2yZBc9Ofepbk65QDjT0AglcsAl4hNSslWfY7o2xizCQSqQLqJkbNllriu/NywiRmsCiAPEQ65LJXTawvSCJrTzCYNhS1Tzd8js3Bxc; 25:1R4KqMWrozqUe31uCc1f6QTd55KYf08z8Bjpjp4iBDPoqyQ8LYukFB93GX4uDWlfJvVKy1sTdop67n+WMUf19N3yqlhNNfl+DpATSY00dRfBliWBgd2EAitnFxUgSaprvnjFQ9v1LG59MtP9If4eYBILeG+b1hihDEyHNp/Py/HkD6vKnDLnuHU1GN6NmUQBeFZe+a2Djj2OlxGdS9pMCqgMH5fwvYxV0xU5GloogznDODQJI+Rmz0Rah19N91khTB6M0a1UlAYVoBfohw7WVc20+pOXQtBbCEjVgFqkNdz59cgO3KyF/NpPBaUYf3h9pbcgl0mnODpjcQxMxXX+AA==; 31:VwJj1gEn5nhxEBvQOnttHDzYneDiwZ+DW2XSGjHdZx9qdHH7jLeHv6Hh+IE3IbSxo5R3Vqi8kuYEn9V6l/hF7FG7FoErOHBrFUKcr94mDln8KBdMDyjyRrVb2wCpsC/wogXluuxBcp201bO+oO8uJUkmBnN1sJN8yIobXoVCQ3kN/IWOUBidWw62IjRpOHq//EBXd1JKSArp/meRUkm5ZQ+N8crNjusMzSzQMfoAx1Y= X-MS-TrafficTypeDiagnostic: AM4PR05MB3137: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 20:IWAW+ly3PGFtgY46eLuAAYwm8HczHxi0uiHQQXtN+ahgc0l1UCROKABlC3m9/F5CH7K12RTzT6UdVVOAgHrSl6eWOJrLtICigxtmHTDEvMiNp8kR2wzuEwfE9SJP1rfIYHqe4G12Tgsjg0j7z9+uBzJ0fMflgvrAth7lBW6KdZpPC7LJigKwOMTua0reDhtgPjj6uzBL8rv477nwWvyLh38Ja7oQYgxdWyw0Cyyw5unaISTtncBI7r282dy/bqRsjlbixWfiAF14FqjE9/WGmOOYCiA15DPMqnfmx8tDudf4tOS07TNpNSmvnHp7PZi7rqmC8o7Mpv25UJZLqfSb15vIj5hNflKYdfdL0OUU48tNBoln03hjyBnhBIfQLk99MJXlVutDFfYVEHTPQRl6U2w3DMGmBhG8BNnqecZBuRN28Hjx7HZzJ6ItQxlnTlvu+79JcqWXht3EycvSxj4NQSBSOW1Mm/0GPxy3+7jpdPKWySw7DMQ2rrYZ44Pft64b; 4:IoxrFJrRTezIOYMcKy1PT8wbEP9yIhAAhBQdozR74gBNsT63wUSBI4C7zPT1gJaBY3Rtf1mlsvSrlw2lFBRhVIHFwqwC7Og8J3gTPIe99f8Oc2togrXScxGOUVRQZa84GyfiW0xBKtGZkhJAzmufrFi+Q6ZmyNYZeE0aaFgN1wVR/UP+XmxaJv4K3ekvW/wQLxloDuBfgEy5vuyknkYrSPLkhVBfdYyVzmuw8upKf+HJ+OOV1wZnFQqvaUhZ4p3GO6MsLno+gxeMcUUlsa3vQw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231023)(944501075)(6055026)(6041268)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM4PR05MB3137; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM4PR05MB3137; X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(396003)(366004)(39380400002)(346002)(199004)(189003)(6666003)(478600001)(2950100002)(5660300001)(8936002)(50226002)(8676002)(81156014)(68736007)(86362001)(81166006)(118296001)(305945005)(7736002)(55016002)(2906002)(21086003)(6116002)(3846002)(106356001)(105586002)(59450400001)(316002)(50466002)(69596002)(386003)(16586007)(36756003)(4326008)(52116002)(76176011)(51416003)(7696005)(97736004)(16526018)(47776003)(53936002)(25786009)(48376002)(33026002)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3137; 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; AM4PR05MB3137; 23:u1WHlVypT4JaQPcdZ0j+nG2TFq7o8y1ViUzXdHmEQ?= =?us-ascii?Q?WibGI2/OQacb3IzKP4yKx8GgKAgRRMRC5Epx6o03m3VikBcVwgRMxaSJJYDU?= =?us-ascii?Q?UYCVCWwyDfrzy4rW27x0fJwyYuhkfnxBmi11kgz1h9PM+RddoE9JIrdOU2Xp?= =?us-ascii?Q?065PjcFTTKCVxW6yFF6OrsbhufeWVYxIYtWVPmuDzFkhoAX/VhTdgWamc5IK?= =?us-ascii?Q?m8ZiFJgd95PQ5pDSy+N8QUneRSMohWEHv67QrJ20q1YBnyoFg56pVgjVrFra?= =?us-ascii?Q?RuRF2yyNG2sVX+w0gmfIZlLR7dVA7oGN4tven3to+dPDWOGpjWBqQUafuLcn?= =?us-ascii?Q?vtZEp64MQgG/C7q/Yugq/KNo3pggL1a0V9+0hPqkZ8fz79fApGXVPBEHrnKy?= =?us-ascii?Q?c7SqUqjJiHFKGw6PI2rahQK0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qOm0fxQzNmS2ZMzfMg6F3dut/dCjftfaOz24yuyc1mPcd4F2yKQ9Fdt+okpOqJtGQoiInfMRG5BHM8J/xMf9et4TXYtX1XKDSSGVoyZeglTUk+l/wKpaeyegPIzwhvDkpmFIopKAFkTuSZ7r++ZT8105f46IhHLME4S80IBZFpacDh6yFTr3vysKU+/qxkC7CY9erEIywpJhG4ygrablcQB3c=; 5:iTeGVk3RW09QmqycX6KnHHj6dUWMMFmCFN7U50qD98qzMHnXKqWCeNxQy+aSNTO/NodBT/Zlb5Pn4uAPDsgDCdD/Kfjsy1nqDMXkct0I8Xng3MKLE0dusbOxUjtXeokKYb1Gff3A+uaYQ/cVcIrOWIJaxp1Z4GYC4xXmLo7ANjA=; 24:+/Vcwfo+oMMpeEIxYIKJkpB7pB7oWe2MOPR4OT7x9Nw6nDDHKrRYBv8dGJhehwRFhBgXhivBlttEGuwH3s4uphVpK9eNub8sokQIJ/rfMpQ=; 7:f99SJsyHd6boctIkQ7IkJ8VKr/8th8Uv/YSwRXh5DYStfkNaKzs+2DvTuEJV1WG4m0BmC3catJDohL1j907Yvbdos698f+yEqudOxJI+8d6j8I+FZrYfyXiwFr4bDgWmmaWJgr8FkotSMjEwMfdtuLS3qSCUaleanD+Xo56VFcE0xb1t823GnOllJoB1NHFUOs1sHw8sPBCjEHYtZTXDw53cDkHclNrlTjjLkwhmO/nOQGf02mgMFLG+v1hezyg3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 09:10:06.3626 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b10e1b6-da81-4b15-902c-08d55809f169 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3137 Subject: [dpdk-dev] [PATCH v4 11/11] app/testpmd: enable fast free Tx offload 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: Wed, 10 Jan 2018 09:10:09 -0000 Enable the DEV_TX_OFFLOAD_MBUF_FAST_FREE in case the underlying device supports. This is to preserve the previous offloads configuration made according to the PMD defaults. Signed-off-by: Shahaf Shuler --- app/test-pmd/testpmd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index c1fb387fb..d6f69f5fa 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -339,7 +339,9 @@ struct rte_eth_rxmode rx_mode = { .ignore_offload_bitfield = 1, }; -struct rte_eth_txmode tx_mode; +struct rte_eth_txmode tx_mode = { + .offloads = DEV_TX_OFFLOAD_MBUF_FAST_FREE, +}; struct rte_fdir_conf fdir_conf = { .mode = RTE_FDIR_MODE_NONE, @@ -605,6 +607,10 @@ init_config(void) port->dev_conf.txmode = tx_mode; port->dev_conf.rxmode = rx_mode; rte_eth_dev_info_get(pid, &port->dev_info); + if (!(port->dev_info.tx_offload_capa & + DEV_TX_OFFLOAD_MBUF_FAST_FREE)) + port->dev_conf.txmode.offloads &= + ~DEV_TX_OFFLOAD_MBUF_FAST_FREE; if (numa_support) { if (port_numa[pid] != NUMA_NO_CONFIG) -- 2.12.0