From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30077.outbound.protection.outlook.com [40.107.3.77]) by dpdk.org (Postfix) with ESMTP id 1DA771B6DE for ; Tue, 26 Dec 2017 10:25:56 +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=+reZowRcESgLhaNaFSQjWRyGVrkbeLWvJFUDbNO0YAY=; b=ZDq5BzOPIhQuJy6V/edOPBRYZsBwXUxIXu9g0dsFbQ+HWByGMzCGL2mlJgDhI+uLakZMfnDiDLahx3rSTHNcHj0gUDr3uAyqOwOkO1Mnb5Cc8Crdweh2U+qBDNqNkItosAwfPjA+1tzxOcblP73QBpFhY4pl+V4zJ5TpnmhxaLU= 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:25:55 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:26 +0200 Message-Id: <4dedee54a20d9f90136670e26d3aaf67f89b8fa3.1514280005.git.shahafs@mellanox.com> 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: d7f8efa7-d87f-4f01-6f94-08d54c42aaab 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:thuAgMdvpqT/kJjeLOA6LZKz93gWKKGpgqwGE8964fJ2pM6r735ooYX3M3SRR1sabw+1+ZEqUNczyG+U89lp3wzclQAqVEkxD7/XZ5QAhxBz1EnS3FTNTv7lMfQw9w2SEBy/6I9esNicwq6l04wdSRYWVByD903AEBgeObBPhlUPzWGVar2iKrD8ZnVLAomVf+K/B/FX+LAHCICsjfiVC4+QgCl/whs8I83dxzdtoabU6czH6tsmggGQGFL3m2Ss; 25:4cGxycrf6To3vv3nEAX26u6PunqYEUF1pNR8+bSq7YcpptEX9L6840ZaUZnTu34aGgUxdcz929fauCARA6PoatPFbeL6B4ZsVuriHfeW5i9yURL8SdDB3THEBdlUSLc8xQc5yJwOLj4m8NnELfhxULw0Pe6vv9YFhH9jtHzU+SFFxO6DHJRMlrZZMfTrA7htBzr1Q+Fj6H3NEtF2IO/RAFAHFbn+3CWe9FSOjlGnOnm9YRniYAgRMe0Je86OgcJ9fgMBvqkikcomS9Ko1n/IsJBlTDQfeTIP3YN7k6F7b5dDDL/C7kwg7HR0eweobHeoZDq8OK9abeTDSVPc/YyyjA==; 31:2vNAgN1ZYYLjiAxKzH7nCnhB/OaTcVrt5+9ulW/4wD7pTxT6xI+2GC9Q0D8eKyk1QBCzFN+rPSKvvZ5XWAz3mKWB6/aHxbf6iUoYeWYQG7UosV8XNHBVN4cjLgc6eEKmDWhFI/HtllKLpMrKSFzK6pn0MEKYJO0U+yepKO7wPKwywk0Zynuaii72Q0iKx+DYKDzAnQM1CdvpaPQFXxeewiHDSHWD4xnu0VjUYmzkeHI= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:g5A/9YJWAfLI2rbXbzx0cyATgqaCn2buQa09Crqdlec+Kg2hEk2oQc/1v8XBcjMUDxc981fMzH7ZVBtO0B7BRAVMfQGtZm1ryn9fkJme/Nf/jMtUcCfwR46GwY+kKEsVPzj0mqI14udBhO+cxWrCTzuMQdjynVEYzuMe8/GdC4U1bsnpHVggSW6RbjYkMaXC6xigH8lrumY8DzQWEQR8v7BqzP1+RgGvZhzFvPVDYEbOFxjizpt/LULgwmqzIrFTKECGgjH4yudPpeGpJZe2qzZta4EfPYqT7EtU7UMSKjkQY1fNjmjHNOazqc6fN9uEzMUkN39whwdx0gtxk0nx4CEJ7ZvhYTewP1CpTVNXTPQE2bYt875WRF36DvTU7QmszmByJOTr0Zc+q5B3tm4osVKgGeR+euG0WvbYJXpATL9V4hzzJyxt49/SVDirH/TA2v7ixTt9Q8XwJ30HAc/my6PaX9ra+B0CXYVxKVppY/xNk1vkRgZJ48UBDB9cTfL7; 4:SwWipJhXpY5lyoIAnjdYRf6kSSlG/wQVXkK0PoIvUiK6nVsoZI/0bPuQcxs4soboNrxXuBaUg+07gP52wWpbNmBnYcjGcAtCU2PRpZVORVgBcKxXcTdKZLytyCPOW6Ycfg+5OqtijUWLEF2C/lTLzt/wv1gymOps25GRv+Vh9XgFLc9TgPDq8h4C4JNb3ayQpV2T9E50nQ4n7hiyxBBhLHI4x6rENkZmFG3IVQZEgq9UBtDUBGKQtMVrwi5aNiQtfM86Gzj75urd0d4XMwKU1g== 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)(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)(346002)(366004)(39860400002)(39380400002)(376002)(396003)(189003)(199004)(316002)(6666003)(55016002)(105586002)(478600001)(106356001)(69596002)(16586007)(51416003)(7736002)(48376002)(76176011)(52116002)(305945005)(50466002)(7696005)(2361001)(2351001)(33026002)(8936002)(25786009)(5660300001)(50226002)(118296001)(66066001)(47776003)(21086003)(16526018)(36756003)(6916009)(86362001)(386003)(59450400001)(2906002)(97736004)(53936002)(68736007)(2950100002)(81156014)(81166006)(3846002)(6116002)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB3148; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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:ZqAj99wAPijXgIBBLcwbVCVC/4EIhLXpALFg+vLwy?= =?us-ascii?Q?9qs9LnTxJIHxR+RzZAnY9yhwYS0mg754Wlp7X9C7CbtigE+COAQc9gXIyrUP?= =?us-ascii?Q?hQFkZ5C5ubjfkQhgMx4T8YjIXnNfuF9TMpUDYmShzo4n1SlIqz+hdeEqxuJm?= =?us-ascii?Q?KphOjFc4t9p9/Nrmi5ENIaCbc3OskhwMbVkc0Uzta1d+4xG5balUAENy5MwN?= =?us-ascii?Q?B9NHdrWWowxd+NcfHFX8lerrgqZD3B0RqkfTXBo9woctmkJjg1wpMPIzLEDF?= =?us-ascii?Q?6W5ZZfq0vxCOySptR2zJ5cy15mDQVIaT1k8di8+OU8fox5xrJA2m6uat83l3?= =?us-ascii?Q?KOqmXIuJ4cSH+g0i01TrZtRkxpidKmakkRDypd7INaOUPE8s9Yw5zrY3f6zK?= =?us-ascii?Q?MNNN75Pm2fLN/9VT8nbGuk9/K0mKiF7cm9Vx+merAtrR8l5DZ7fdLM6omv2n?= =?us-ascii?Q?kKJhrkq/iLqC9flzVPla2GTaoSm5EJcaxWsvHeeJuWCjW23P7JwwgWZj0BIx?= =?us-ascii?Q?bj1d7MfsAcn5O5PpIj4zi0xDYV5sTdPWMmrrepD3jDq7dhwS3ETuSmzKII9K?= =?us-ascii?Q?8416l9S0+LTS5PYFer6Yiwd+K3VMgBRRAnCM00K3twKUjRplJkY1osqCblWe?= =?us-ascii?Q?lF2BVvUAXFN1tR07nqyndqexzwBahC5lpP5K4BLPQvyDdaDrH+zD3plmOVmo?= =?us-ascii?Q?Rn3kg2sLjLLq7mGfJ0gyXlbXqP20G62PNS09SA+QMkmr8wyepsi3GMKlq6ow?= =?us-ascii?Q?ytaZlLEhEyysAiecTatOB2KY7PjCF2VaOBOdWjXqoshhx3697pZysnH/zm1e?= =?us-ascii?Q?IxSbD28V4ZMC15zrTNMLZv8FnXT76mDcNVVIK1qQaD7/rhZjOXxlpjzu14iH?= =?us-ascii?Q?DLvyNY/6ik+/gCZa8NQyq4BNI8B9ygFjB61vIUQHG+f0UWfn/gwuMmxyJFh4?= =?us-ascii?Q?QYh9xi9WfmqB22sAUuI1ImrlmSoQ8NvR6lfeXNbEdonf+bGxGTj2egCNu8u9?= =?us-ascii?Q?Dbl27Hq/T+mJVG/1yiJCu/Iprf6ajXUZTdQHqesiUeuPM51vR0c/xnAIfDtB?= =?us-ascii?Q?0ij4a5lxcI9oTt5wzOoZazZhKvE2xiZhFL8zo2BSrLhuyxvFLNjG+l4q1AtH?= =?us-ascii?Q?vOGiBVgVHTwrxEyy/tzcY15Pv192RAPtJtv9wEbkl0HNrO2p/TKHCGtMsfAt?= =?us-ascii?Q?WYv1gumYocuj+I=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 6:WnV2tXecIbqkd2h1EXLWl0LAEVShrhb613r2Y1QtdArleSodAcX6c8OdM7zGYWbUow8I5zzma6MVV3n5fiG8LarcJbS2tJCfyz3A+CApqw6BqVHMf2mS8H80V9/mnHnUdT4krP1CK5pov6nvEvZ79A9IlzsLWvimEBw48TtXnf9Ovam6XeJSw8KayWs4FbYZPJ3nff043uHkrD8qSf3RfWzlaq8jX2VolShP7p9qKtaC8qgrMgLDWo1bZoWmDfcvno0B7E4BxUwEFrqf90L4i5IRefRo9XVsxYzpykjAu2Vc/nj2QRGyGuIP0EBwy5xhxtTutcEgHhx59glPP8Awxw0qkY7J4iCYaxI+STnfJg4=; 5:gyAB5aM6xIMkLwG03a9NUMC44auFvP2u0DZNHLLnPmBd6db9+/cbVR6pHaJ9I5L9mhk3k2FNhzs+r4Lc7RySuq8xTZHc9J6UCxVwdF2Jfg57Wmi/K9V4CJkphud1yg/4EX4vpAYlr6wJl0NheTt7hWcth3/giZvbPmKkSsnVrTU=; 24:wZx2P+2KUoDP5b5tZsT0sm3BwDEangwrtI0xsEcBunwogtk2JFJxWYLMGt3x/nKoX63mftqtTPsMI5dmx37cd/cHkGwUzOaxPKN+hZi3hEE=; 7:Oo3KaRMOK41cjsl2g6An+sN9f7pPa8O16IFCdrHuYVGXxIP8TPWpDFU7hUP6qCNFjQy2XAL56joTdxs5n6FOb9FwLYU5PVj7WT5GZgHHUWgTlYmLkmtbDi31ETZQK5wNfmrHnfccZN3BSwYPcmMui7JbQUm4AbiQG+D1OriuDhrzQKBhZaZBUCTVcGAURSHZ21GO9XvwjjjZuAtMvwtMrmFu4cTmNs3PV5CTcR5d5KN30IoFZyDL6xv0i4GDAD7W SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:25:55.4582 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7f8efa7-d87f-4f01-6f94-08d54c42aaab 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 27/39] examples/vmdq: 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:25:58 -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/vmdq/main.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index 84e9937d4..178f2fc8d 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq/main.c @@ -94,10 +94,7 @@ static const struct rte_eth_conf vmdq_conf_default = { .rxmode = { .mq_mode = ETH_MQ_RX_VMDQ_ONLY, .split_hdr_size = 0, - .header_split = 0, /**< Header Split disabled */ - .hw_ip_checksum = 0, /**< IP checksum offload disabled */ - .hw_vlan_filter = 0, /**< VLAN filtering disabled */ - .jumbo_frame = 0, /**< Jumbo Frame Support disabled */ + .ignore_offload_bitfield = 1, }, .txmode = { @@ -188,6 +185,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) { struct rte_eth_dev_info dev_info; struct rte_eth_rxconf *rxconf; + struct rte_eth_txconf *txconf; struct rte_eth_conf port_conf; uint16_t rxRings, txRings; uint16_t rxRingSize = RTE_TEST_RX_DESC_DEFAULT; @@ -245,6 +243,11 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) */ rxRings = (uint16_t)dev_info.max_rx_queues; txRings = (uint16_t)dev_info.max_tx_queues; + + 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, rxRings, txRings, &port_conf); if (retval != 0) return retval; @@ -260,9 +263,11 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) return -1; } - rte_eth_dev_info_get(port, &dev_info); rxconf = &dev_info.default_rxconf; rxconf->rx_drop_en = 1; + txconf = &dev_info.default_txconf; + txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE; + txconf->offloads = port_conf.txmode.offloads; for (q = 0; q < rxRings; q++) { retval = rte_eth_rx_queue_setup(port, q, rxRingSize, rte_eth_dev_socket_id(port), @@ -277,7 +282,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) for (q = 0; q < txRings; q++) { retval = rte_eth_tx_queue_setup(port, q, txRingSize, rte_eth_dev_socket_id(port), - NULL); + txconf); if (retval < 0) { printf("initialise tx queue %d failed\n", q); return retval; -- 2.12.0