From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30055.outbound.protection.outlook.com [40.107.3.55]) by dpdk.org (Postfix) with ESMTP id 0F48D1B667 for ; Tue, 26 Dec 2017 10:30:50 +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=W7MgCWYOXZ7ztaxkxf+7PVir6oEEmJ0rkooVunbseIo=; b=Tw3EKjMMsC+UCYiNISmRhsh507rT6ziwbUw/vyJFkJYaHGhbwRSsz4PrE7tAVHVYXGZ+6tDBO4pp96fJ7ufgqJw1eqqUIuw+c4mL77nG1k5bFNDUc07D5Y/Ld5m99AMH3RCoOhB6042tgIUmHmoLpo/7TFd5Viy8UGM9HzZB450= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by HE1PR05MB3148.eurprd05.prod.outlook.com (2603:10a6:7:36::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Tue, 26 Dec 2017 09:30:49 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:36 +0200 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: AM5PR0102CA0023.eurprd01.prod.exchangelabs.com (2603:10a6:206::36) To HE1PR05MB3148.eurprd05.prod.outlook.com (2603:10a6:7:36::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31909db6-f45c-455b-5315-08d54c4359d7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603307)(7153060); SRVR:HE1PR05MB3148; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 3:vbwfr6D6MbmXQV2SxGVBClUyK5GABVElB5JqKzheuyOF1ERS5P6TdLORpuza6HgKqHeIxOtBUFnXV/QXIqhfDQTEJ01qBNxB8NiyQvGqvK+fIZHbW1jBsauCzKMtI8gRGOXkWlJpJAMuwNAW/S79h4Hv8zsAT6YgbgzlhpHAB/oAz76WhOt5KuWpnGgSb/hRMvZknRu2LDETEgOkXmzjfOrbV4y6h/lIA4AYXviWQe5g4iVrBOo9L1ynGxuKRht+; 25:CQun27Va4dCZj0XxJdlGROxGkBMsLWi8ccFuDHrQpjTa8VNxF1rk80mgt3HD68c1buJ9XxF+OouSlXP+J3xM4I/fpA+bMR2qHQI8Z/jioy5wKeK8Pw0akfG1S0dDZzeZ1bIqmaZhp1gqvkXrOVjDWIhd91A47WmE9gZPvEqOMQp8j+p8bjVrE3sA9XntI86W7jB88hgDK9YP5uaaPwFMuKpRaJ3S8uJMGAqyolinv73FIc49txsZeWYmlK3rNuJNasw3LnZYQStgMsBU+EFMvIP9wtEmgcmP0OF248nqCT6eickgGEvQvpZbhn8Xf3ZLrACVeJsCmordiN7bylH3Bg==; 31:IAP8eXi9x8LTpYRqBws3HL11BtR/g+XrCiMlcJqpFpeAzTd50pB3JMJL1kOH9iMeOACtdSVkX7VuG1/wJr3stLiRJohq/F81WDfJKKExdSSjAEDw9waGPL3QfwcwGPbiE/jZMNPFaeg7xgataEWa9zjyiDzLvkUp7y2OmpjnVbb/26cOguN+vDs0zJbcsOADLG2ju/NBhy0I5nIuRFmAsrV5spVdNgddAARL30LLB/Y= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:2vdz2459Sk6PiH0T5++IK7KyY17I6tWiZeToEefEA1YOWEo0nIcClaGKV/vYN0EdRFKd8+brfpRmm26HcgkehrP+dLN1msPsVM8kH/u/eaBRlJbj7b61iG9zXiDMuTJFMgKLhNmtJrMZ+8IxudtTQJO/NqCwp1Fao5mu3nHqnz4A2r1fUQzzaFRW9Wo6nFlVJb2YgZMbkZKD9a5OjjFMs98NAsmuGGRfGpDUbLtQOPwmIlGjb4emKMFOlk9ovTlpzRtunxBwTawt7eT3ArnWGBaTV0VTWz/WKMZ6oliEufUNppu2vnzy+vvPFn9SpRrHyv1zCiw13rTOHSUf+9ZtBXm2l8ixkHg8hCvMh1BjBfbtC9tqcDokKv0zFJPgvHv//7P3RjJTCUcJeX443ZgsQC2DNJamXjGTdh313OdoqQG0bCzpkSUBlCLpW2HlGf37Ugn67zUnvBLdgkLUC8nHtJaTVNvofgtaMLcxZB+o3dcoJMey0EMyOIzSwLMCz9T6; 4:7ptG6NiBbH1Q6m1NnrW5N+/ctchYT4srmEReSpOg0+x+CTVhedaE2Gi/yps27FMP7ZAa+Kj8DTwsmx20FXoJus7t9y6/LGixNT7QALNuMPtGO5WWf8dWZUCukKVthzskx7bzHVhNg0RjIzuwCANfWDRVxH3cgukNDTvfspM/P5vjHJYMwVdB4lgDEOW1hQ2x2O39RH1qzwDmjL11dRGMVAWP8MVUnMTq5rHJDERMwkr4KK5joIK7xgnQ5XaylELSgege15UVOeU4ovyuPIqJdS7KiPyFELy+fKpSli2iQhZODK8fZB5OpYqUUE/mFVYN X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231023)(944501075)(10201501046)(3002001)(6055026)(6041268)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:HE1PR05MB3148; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR05MB3148; X-Forefront-PRVS: 053315510E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(376002)(346002)(366004)(39860400002)(199004)(189003)(50226002)(118296001)(47776003)(66066001)(21086003)(16526018)(5660300001)(25786009)(2906002)(97736004)(3846002)(81156014)(81166006)(6116002)(8676002)(53936002)(2950100002)(68736007)(6916009)(36756003)(386003)(86362001)(69596002)(106356001)(16586007)(478600001)(48376002)(76176011)(51416003)(7736002)(6666003)(316002)(55016002)(105586002)(33026002)(2351001)(8936002)(50466002)(52116002)(305945005)(2361001)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB3148; 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; HE1PR05MB3148; 23:enGzaTqxQsiTznrGVT0ptHutcNRqOehjpEa7mVciM?= =?us-ascii?Q?YvhQgdzaHw9DYuSgMzoy+cnfVJY9zsvXvqySni/D10+6wzezFgYm8tAHX4nN?= =?us-ascii?Q?euSzO8+58Dq0EZk5jLQcjk4Qd57ohWrEGg9BfkhAPHRkYp/esjBBqvVuHFv/?= =?us-ascii?Q?5u7e13Y9wW5CV+0Dot6cJIseOkV5N8byTQwQenllbR0hIES9B4SR83FRwCPK?= =?us-ascii?Q?gE3AV9Us/SdUQRLeiSNDJTCssomLk0DKQOWfu8UISRWUALv0f6v89c04fSIw?= =?us-ascii?Q?10IdyNQuAKUYODQTKET17u3XnFWQ7XxTf7LkTn8R6GkPOUdYiFv1VKkMJVnT?= =?us-ascii?Q?b8dPg/xmbILSV4cNAirVsbQS5aCMJwlFsBEx7emSebMzVGOSm+0x0RGyazto?= =?us-ascii?Q?uwBzbqZWGFh3nXCOkQvOfrRDrlSFAoONbSx2TSDw7jC+iADXfhi10sbI9RHE?= =?us-ascii?Q?omk9jcE2WQCVj8G2uthc7d75xF8EwNiaQ5z6vMYG/P+xPbnwoM4JuC9NQVPu?= =?us-ascii?Q?oWeq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G+3eHPFuHQ8WvUte3DypRDmH7hZr2TxnQfA9LB6VJ9PFZDWjHzK3/cVuMGfPTkAcr6ww9ceEEudmw0HLVCDjEtqQt3CaynTSlAd2mVdYJHvMgeuFZo3jBKtrRjAJic+I=; 5:GDX58H5ehCm7R7l1Op06yDeZ3alOzXSl1OD6ViX6jFoARCHOc9nNKRlissqLiqN0oQ5++TqEt7fDUq5KVsonye8DD/S41uS6OUTJuzzoVGP1RMSc/LiWdAMCkjhYHjE9foHmKAG8sbrDGa2SVQYYqflGVE166TRP0vucoK0xu9U=; 24:gdn/1YbmdQt3rZ7KzxFtL64bPO1yhAB2TNg80qakbPBLTfWiHIzfiuh3/ZWc/oV9XZCiW/nyQiZ7M/CnWhqi7lLJHm/rqOKV8XfyKbKH46U=; 7:pllxhz4mJ+N0aXHxAkdhEObGL4pgw7GYOI5Ks9RQP0C3fR1w+6zvTuPHP2YxVb1RmqE+kH+fZcDph4fdIIEepharQvDyZCN18Y4H1G3wQv3SiWjSXPrHU7ze8pT+thVbHklg1+l0KQzxLfBp0SXd4QskOA+UaH8/yoCbVoY3eFlXjOAxikF2CUUQ4r2+/7rqNPHes37fQeVG175W2Bu1cPE7lXPE71H84+tstfdime1CVVEoGPwLzOAfeglHVYSV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:30:49.3471 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 31909db6-f45c-455b-5315-08d54c4359d7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB3148 Subject: [dpdk-dev] [PATCH v3 37/39] examples/rxtx_callbacks: convert to new ethdev offloads API 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: Tue, 26 Dec 2017 09:30:51 -0000 Ethdev offloads API has changed since: commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") This commit support the new API. Signed-off-by: Shahaf Shuler Acked-by: Bruce Richardson --- examples/rxtx_callbacks/main.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c index ca135d219..57c1b9853 100644 --- a/examples/rxtx_callbacks/main.c +++ b/examples/rxtx_callbacks/main.c @@ -47,7 +47,10 @@ #define BURST_SIZE 32 static const struct rte_eth_conf port_conf_default = { - .rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN, }, + .rxmode = { + .max_rx_pkt_len = ETHER_MAX_LEN, + .ignore_offload_bitfield = 1, + }, }; static unsigned nb_ports; @@ -105,10 +108,17 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) uint16_t nb_txd = TX_RING_SIZE; int retval; uint16_t q; + struct rte_eth_dev_info dev_info; + struct rte_eth_txconf txconf; if (port >= rte_eth_dev_count()) return -1; + rte_eth_dev_info_get(port, &dev_info); + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) + port_conf.txmode.offloads |= + DEV_TX_OFFLOAD_MBUF_FAST_FREE; + retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf); if (retval != 0) return retval; @@ -124,9 +134,12 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) return retval; } + txconf = dev_info.default_txconf; + txconf.txq_flags = ETH_TXQ_FLAGS_IGNORE; + txconf.offloads = port_conf.txmode.offloads; for (q = 0; q < tx_rings; q++) { retval = rte_eth_tx_queue_setup(port, q, nb_txd, - rte_eth_dev_socket_id(port), NULL); + rte_eth_dev_socket_id(port), &txconf); if (retval < 0) return retval; } -- 2.12.0