From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30061.outbound.protection.outlook.com [40.107.3.61]) by dpdk.org (Postfix) with ESMTP id 712AC1B651 for ; Tue, 26 Dec 2017 10:30:52 +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=cFsdDTRtm2XkBiOMl/PhGQnOJndsD63F3EAZMOFG6OQ=; b=LlFEgHnr9OgPmOZBa3U0M98CQ2+E7wT5ITfsMYjLlNb1A2vzjw5Tw4N/VWpS2yLDvvpIbnHXgxGrxHFvyBKOCeokcZvWXypgaIJRbb8Iy7IYl4oFA/yIlL9AjY4PgN3HrUcbVF5QW+g4MM3urIktLILWKrh8sfiU9lmViNVcu60= 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:50 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:37 +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: 307e08db-d419-4413-8227-08d54c435aca X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081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HgJZ6IautDvoelKboP+w8uyZERjTpQWWVUhePDjU16KIXLZ0gPLqnGVp8VqogUqLtmap7agKvB5oHeUEXCpGT7HUSkRCFzpsZ2BP5VRdZKzwBpzQxyoHUvwHk5Jurd+B9FiXvXyE/avX7AgRRJlNwbn9KDVHPglHP4OgzcX0p8tawJDA81q0E89wa/WPFBYNHEz9WrHgXidm8X9EpgxKaq5UokuNyGGD03Owk5+Jy0o8FQugcH7x69cXeU8ALSWZJSCS7qW6Lhg16PI8YlQAVxpX5iZxj7TNeqT40LfYqeurygOMhzYRWLtw4n/R/AQAn0RxFGSfss/LRfy2XcgqYXIqsQ0VLXXWXaeTTq0wqZNtusC730gCZbzEPZ2rnNC8JO3s6RZPCy6PIeulAZDIC4SQYzig7Kiqyj6aKOltjddt6AfC1Scfqd3; 4:BmPo0JDl8+jnZ+VdvlUQK1gRjxl/IVSCppxE1EjMfTxkcwzFhY1Nu2MiFW5TbWIeuT87gPDH23XWCg27YlqgNNL9KlOkQfVQppvCrJ4KqC3Jc1FjckR/ObO0z68P/+isNhcBeRuRFNW3kzanBeJyfJifgP7u+ewk1/zCH3O+yZtaMyWE3F69lOrdoHGfrxSJiuqqRmdmyESZ1fVL/CiD5czZF5UVRJQe61TYV/piS/EgbvCeHw+/QaPGShTY6HzqVkUHNXxlx97klQRpLvZzRhQ2lMYy4pN0oP5VJJpWKujEaY32vdZXPNzuaD3t/Bjk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863); 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:e7ncEBtE1lVuFYSlI3PejI1/ryORmzIvl4zzIY+ip?= =?us-ascii?Q?JjfSMUTlD65HT0fVs4lVRtf6lL4M8tgtUJcA2tkuS/NYCY9xnsttcq86lPLr?= =?us-ascii?Q?lNiNUijFXuZjtGzR4CUb5nPI7b3Aao83B2yvJeGz6pPN3TZsMrsbxKKyVxeA?= =?us-ascii?Q?aQUsqy7j3NoL8NVJufOr4gLe4sFVkGeie7RAwtxSIbjmsyRicRYomDPO8K2z?= =?us-ascii?Q?5NnmNpfB7c1PmgfAV283FXMG+OwMoJKoKU6W2nc+arkI8xxvzJ2Qc7ooRMgI?= =?us-ascii?Q?jqNnW9qbL22AoM3Jd+90eLCbv3XfZ+77ndXVxcem42OVZuLTXsopwj/QcRtn?= =?us-ascii?Q?KYTA7aM3ApU4Ib8m/AlnnJhhjFVlm3YwSAkNiaV1LnF2wETYlv6CDQs/z/0Z?= =?us-ascii?Q?GQxfTRJAjIFW/TfFlJqn00TJWUqzdmy8ErzXtcV+KQ2MMnA6aAV0gJ4Tr9RA?= =?us-ascii?Q?GtC7e6DxlQdS9gYC46tMH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KMhL59QnpykzDv/SWrWSqbdl/pYFwJPu1t1p2ZyEX7w6qHr9QmgdZmfFTEfji4IDbJpBHLdtd9+CjmWMg8BnZ6JS1Km3LIwW/rIBUSBkbj/mj9uGQ2t7ND84umG5F03joptZfBTlcrVnvbizMR6cIICpUcdkDrO3D9Zkn87gVPIvw=; 5:CrJPh1j3xSkwAaEY5/8zPKHp2dLWswNba1z47QdwMbGFJ31vvNLZFPvo3wszTQiBTOTFvkhdXTzFppdVzSEHtoDWK9zzAsk/XTAN1yPwyDrgY3bHxVoxTuAXJrEVkH4+6mbXP2OUIlfMBsxjX8xdtESMbQv6ceCEOkd8Hb3UCMg=; 24:t99levLgkoRp6PClCkjxUwP3yrUeQvRX0cqy5T77y9TVVGNLvNRX/12o4iSOdBgTs2Xt6Y2oULGzRmA4gk4Y+SiJC4OM1eSHt8k/1R2cGiI=; 7:ILRbSEYzR8pPV+g75ss+isDzLcMW5NInx4DkUyGEUGUDKFRa8FlHA1FFSF+XWxuXxRc7Ypyc5m9xxuX7ubOywe8Kn4vzIh3MZZjRWglTIY14DcH6gsSotKi41aruQe0jWj2uZjya4lWCCguNYjukTRxclS9ZWLQzPM57OGGGRtcuQdILwfXHCx9VFFrnJpGaIu+8aDESlBBiRvs552NAeDCbq2DSGFMeNehIgV+QwIgC8BJjCdvfD8NidOVcpl1B SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:30:50.9409 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 307e08db-d419-4413-8227-08d54c435aca 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 38/39] examples/server_node_efd: 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:52 -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 --- examples/server_node_efd/server/init.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c index 0bcab8cc1..9f2d46ec0 100644 --- a/examples/server_node_efd/server/init.c +++ b/examples/server_node_efd/server/init.c @@ -123,14 +123,17 @@ static int init_port(uint16_t port_num) { /* for port configuration all features are off by default */ - const struct rte_eth_conf port_conf = { + struct rte_eth_conf port_conf = { .rxmode = { - .mq_mode = ETH_MQ_RX_RSS - } + .mq_mode = ETH_MQ_RX_RSS, + .ignore_offload_bitfield = 1, + }, }; const uint16_t rx_rings = 1, tx_rings = num_nodes; uint16_t rx_ring_size = RTE_MP_RX_DESC_DEFAULT; uint16_t tx_ring_size = RTE_MP_TX_DESC_DEFAULT; + struct rte_eth_dev_info dev_info; + struct rte_eth_txconf txconf; uint16_t q; int retval; @@ -138,6 +141,11 @@ init_port(uint16_t port_num) printf("Port %u init ... ", port_num); fflush(stdout); + rte_eth_dev_info_get(port_num, &dev_info); + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) + port_conf.txmode.offloads |= + DEV_TX_OFFLOAD_MBUF_FAST_FREE; + /* * Standard DPDK port initialisation - config port, then set up * rx and tx rings. @@ -159,10 +167,13 @@ init_port(uint16_t port_num) 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_num, q, tx_ring_size, rte_eth_dev_socket_id(port_num), - NULL); + &txconf); if (retval < 0) return retval; } -- 2.12.0