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 460571B6DF for ; Tue, 26 Dec 2017 10:25:58 +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=3WFBN9K6LeqTbNh/rEAbvMtyLADvhejigxJg1ECuwao=; b=mJeVD9WVwZe7/bX80nSKn+tjopnTaspwbnW4qN926T5CZ0sEGAm1OqJp7yw4ww++LVcxloGVw0aUvC3QDX8Re9Sc14AAfmRG3dpaWCRKY50k4tePQY+tnRjZZdERBTPJnHqTRehETPHPDq37FFu1xB3IDYyRKG82o+U0expAqS4= 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:56 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:27 +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: bb5f4d6b-5a8c-4688-5365-08d54c42ab71 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:7gtM8A3OVA0xXM4RGShU5bhbizScqdh6/C2N2gcZBd8m5DO5Hoc4nq16neX1ptO3AoDGmY7hNI+RNqvDTaXwl31Pf0Jez0YTpAnvpzjs88KlYkzdwBWIXJtwUalVKPn/8NJN2XXZiQI2GOXEkYYnHiehzwg9L2xieGIoqZflcWns+F5uK+Wmvuc4mkRoYBowejvSPD1HPcY0bR78GT75ChW/dla9H5EWy7Wo6g1N54i0VSY3JxvIbJcYUSEJLPul; 25:m8AoT42sA5i0xF0k1/qYl9CR+GOcrTucucWl0pFgxNe9bVSQOQfaMhDKQBdA0HhSrKck4PNdO/3mzYC526L9Ai/dwljm2itfeV8lLAGHVby+rka9WhKOKdB77c0gPaEqIn3KpqV7JKhxdJWDAS73O3sbESYC2ihJhpZ9GcgbSz/Dcsv3lS6aJ9dJh0XihX8KsAGcjdVwk5TeH/M06cXLrLB5y7jWRb10pI1YkwZC0DWZxmXVUyczieBj3RjqMMMUXEjRxNrVRa5WZCXK+rXc+oFXw/No4fTmEMWGfZbeFvvg2GTFnwTIDJ/o3mHRqBPooEcY95c4LqSzcnlJ36GWCQ==; 31:UvilcVPegBxxVdrTPGFTDUkCaTHEr/Rto2EDbcnSqrELReCpkliTG7t/ZPgzzuIu7saaMFvPI77wPQlD14ewg3WLayI8ERdAhjOAAmuTD9v7xYSIgpsqTeSxiR11TARTXy/NEy/nrRIlCRPd56lOQTskwf+E1w0zAkcc47QvUXBLcgru5IoiF38nHkj0tzIRbyvdIzBvhmX32TAaIWzA7FRaDuxl9yY4N/jKhuwXJyc= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:aY36on6Cn7va2vJmF9LXEcyxMiy/q1ZkoZ9QUaa4CC3M9JZm3E54EPvj6SgNeJnag+o9iVjapOIlm3kG+w0o46N0SHaVucn99ue+Z/7xPN5oQLsldjwvikswPiBEaUGqb2s/cZX442BMwveZXyLsuT9ssE8OjPs/LYgiFtsECTW25F3twUSoe04G7E6qC5ADbd0g66cafKS/t8imAMWlQMN3OTS4Nb0UqLigwivV4CEgUY9xH7iUEQqNWnFLygkGWaYc47x4Zqkz2z+chpVAYeHj3J140IwjC+gLDkhJQHuG2xMYAY7ihbPMHuUpI1ZdgmSYFAY4KP/Se787add6whaB3aaC/YlGVZ1rf74UtRrnCtkgNUsYkuDeTYoi4R3ZD55gPqwyf0Sl8ZvwFy4Sbw03fY430S05vGDKKVAGoMFxjqXR+fLFk7064IPdgg/6t4/ld7XSIc4xL2fWcGIEYKDobRn+hoaayGXNYGJWJ1q17aohsaN9bKcbd0K92PVA; 4:BmimUKRLrN7iD9Tg/RLHzC4WqP87AHGVcayrPJrAuQSx6R75NWEEaB7NOB2v7xTunmaf5ZLiIuCKAicpwlQtN3FTuWGSIbtL8cDpUHRcOewZqWSOa9qANBS9p/0Z7XNT7QA1NnL7eqm0LNFIvWAiJ0DneTVujuhaYU3gnUffSbbDA7hJYkxopJm6L2rhS5SzMN77vErmXoFlSlihw5Civg5rYqZ0As+SSt76JopX6wkJW+X68HeIg0DkEbQ5qGgXOk4edK/fV4CbYcvMmwKXsQ== 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:qplCQEACIreQEBGGPn4etQKZRbz8mxcQtvUOyfCQW?= =?us-ascii?Q?4KumWbuYX2VuYB/C9rFYf+7hVanfszeHuWPwajbtnOzwPzx+oMPGy25hKTmD?= =?us-ascii?Q?/dy5XzjYlBQvObfRMTDQgDrCNn94IJY7RAwNqdBlxF34KXPBRDbu3N07XcTc?= =?us-ascii?Q?lZl7vMokSSrUhg0NY4/qRlbmJoDkR7XZKL/GwtliOWkpscUHXtqKos3AkJt7?= =?us-ascii?Q?vWpo87q/CzHbnqHZY0/eew4kXDFO377jdrreURpND0EnIdzgssPKxfDq1vfs?= =?us-ascii?Q?qUkp4VyLy7/koidjzrEyY7LnEy1wUQOj1RydSowqzp92SThw0j9L89AM3D1p?= =?us-ascii?Q?GCvZx5e+yOntnjOB0xLkIdkZXfO9KzF96bdBuu4EYSHea3pqZuFZXSht5nJ4?= =?us-ascii?Q?1ZTHCaRUGF35gbq4+6mnjuiaGlRsYF5otMrn7a/yZLP9CWhMyIN+yWX8agsX?= =?us-ascii?Q?mYp5a7iEHMm7QLmzWnOeYp8E+AZSovBbY0CoY/bFhLZa8cAPLaCtKQK3oNh6?= =?us-ascii?Q?cqj2d4H+bWN9G7h6fbBl6ycufvCFwAqJqTZGOkXNOtRnuW2HF89DXyp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TPaGz7BY8PxmNAUBtBHc40Tvx5KiJRtVTC8G3s6IXJJ86mIfGSEr6FQSg57rAxMz7jnkimoQ8cDAM5UZWZoNZ8Qgk2mYP5EEmngItubLKc3Cs3kptors=; 5:fipaVuFErawI85eOYvg9O2n0/RMRdG0ql9bxiLKsFDXRcKHjFpuzkiIvcPJ1PRpQwDIhzjSFJKCVvhtPX7MrYS/bsKDRBTkZw4AdzC37pEuPYPk7OVYdfrqImpdQkm5PsKK4QwFb2Vi8FhMOG0JWaFVKd+S0kRvn51wBEUNMOb8=; 24:XB8IiYouvnYFR1g9z37m1MtXwOs8b+3Q9DlAMkJrw9fbGJ3l/olLy+Wqh4TtGQYHTiBdWVcMwYlEi03bLKG29LWpdUAwOvt5wekT/XKJKVE=; 7:eSyOVg/+sorOJcZgWhC4qZoG5IgoJL48cATBJyC4ZDzME6GTyJR69LhcGIWmyVU1sDR8mfteQiFGS7hWcCjVjYYVZ95m2V3EzLSv0TzOeF8tP6CsFblzo4Qb1mbULNTaBFT9ynSXpxH5kOFMr+e6wJHksXdWFOm7RbOviot+DwVb3ibfNHNbcO3VoHta8XboOrMpn+nKsuNjXtsMUa3STY4CpI3M34+EWIDb7HXQUItWZmBjH/BxYKX/zk3hGzsj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:25:56.7551 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb5f4d6b-5a8c-4688-5365-08d54c42ab71 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 28/39] examples/vmdq_dcb: 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_dcb/main.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c index 9dad2b8ec..752a6bdc2 100644 --- a/examples/vmdq_dcb/main.c +++ b/examples/vmdq_dcb/main.c @@ -100,10 +100,7 @@ static const struct rte_eth_conf vmdq_dcb_conf_default = { .rxmode = { .mq_mode = ETH_MQ_RX_VMDQ_DCB, .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 = { .mq_mode = ETH_MQ_TX_VMDQ_DCB, @@ -228,6 +225,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) uint16_t q; uint16_t queues_per_pool; uint32_t max_nb_pools; + struct rte_eth_txconf txq_conf; /* * The max pool number from dev_info will be used to validate the pool @@ -284,6 +282,10 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) if (retval < 0) return retval; + 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; /* * Though in this example, all queues including pf queues are setup. * This is because VMDQ queues doesn't always start from zero, and the @@ -316,10 +318,13 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) } } + txq_conf = dev_info.default_txconf; + txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE; + txq_conf.offloads = port_conf.txmode.offloads; for (q = 0; q < num_queues; q++) { retval = rte_eth_tx_queue_setup(port, q, txRingSize, rte_eth_dev_socket_id(port), - NULL); + &txq_conf); if (retval < 0) { printf("initialize tx queue %d failed\n", q); return retval; -- 2.12.0