From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30057.outbound.protection.outlook.com [40.107.3.57]) by dpdk.org (Postfix) with ESMTP id 6902A1B3D8 for ; Tue, 26 Dec 2017 10:25:53 +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=s7VB79QyK91tJHFSbHyHN0GdntrNBCSJ1IWhbAAY+o4=; b=EVB4G/Cmn2N8+FBl64vKYRYGidwpUh+f8Rs2JW8hBXiOfQpWjwmSW2M+PMNfp/dU6icLnqqEZpgBuJfDBI5C+6Mt+SQ1dk65IQQneQv5O5UgLg8AT86lIDwnz5soDI1jJtRIA9PGlcl+YGJx2o7ICCDKDiMBIkhdXeMaG4bFsBg= 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:52 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:24 +0200 Message-Id: <1155ad8d4f7dcbfeb8eb0c30d1c4bbcaa74162d4.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: aa0d034a-e763-4001-abec-08d54c42a8c2 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:dGoEhcu+CVSXrNrQNArsvt763pAaghmstzfVQz+G4ihkIg3SK2fB+83AkJ+Uq+mfuNhieYdv2TP0iasLRFRaakkQcWHF34xnEPvS1rHGAL4tvKeGh8RjXsNAj8oCNqTqcVgRhNnUkXyvwuP1iCO83Gkn200Vybay6hfqrPUNLHZFovXa+vwsjAsN3ULd24JKkrVfeGB8GKzlJi0lm2Fom/bHj3wJlRF8ClaGOSseipRwR8nsJptJhMQudGq5ZgJD; 25:lt/E+B+hfx3V5jXTVb5JLrW7Szz3KsfQah5TBxbHufOC0uNzw51FGQyeUMjwAC2oVgtRaYnNJNuIEqmSs2wZaFfMUNeprbPU8iyeB4wQa7BQEK+D0PGXgLkef658DOlzYZ/7LbvU8u6VE8xQOHwfKMOnwiMXNsYYBtU6C3/Jhod8LskkfPrfdMaqdko3SlT/B1hfAcUc37UEIex7VOWdnb/+Bx7yYj3iSauPYyQvST5KAYgbOpAHge2n6xeVVnV0/s2PqMfdMb3WG8H4nMPRXJqfWfBuj8yAv3iOTzxRnr53VxfG7dFpojAXIFeQtEFL8k2Styt0t7arzUZ61KWT7g==; 31:MrA/kB7GX3rcjx0h+Jz+8zHYSI/tFnIdzjitTmsKxkAOkXWCPThhqTzGeGgfSSUPjefC8pvgJXvuaJq/ZAXXamH1Zw1lLlcPLnEf8SZ9aXOchMWtNh3M2E0CMsyMkg4XxJ1e03zg5OkmqnXgMD7Clp1hAPf6uzoIbnobTAg1//y3i0xw5eyjH2oRBnUFE/Szp5AmWYcA2JsCEvXUVsrCb5SpNN8VunV+JJVtKkPhA9U= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:WOgligfg/7BdgkgGt0zoR6GldC8drg8d/QDkVssBuXFb+qQXaRRweAPgziSqX7ZNivvBNs0oTR79oQokAr/57Z0zrTqSURqp6GXgK6V/zv736desoW6IlmDiPG1EMUzMN9TGb+wW6V3P63RoYsgLRkkU+J4XJ4wSU1FC9gdcqa6aIeyIkwHbk7bFQ5ZL6bGiAvCIxoa/ZW3VZ/ybberylZpTH9z5vWKyLK7kY4SLo3ZLM2HjIzZ2lF+cmFaU0Dtsa9z/KPK09SA6rDAqW9ZvC0plAiip9rAxTLKCJqq2UkHH3IEkehQPSw+epc4LlFkMEMI4hpzdDIcWq9CKM1YWPwhyVLT8XAR8pchYf+0nYvLf+KlIwuWASGvzfxjBDUY8B1FYFTiWj2YJaPf3RQNlNB3PV/W0okCKU0NvkEroM9kg5gJLZjuJvj7kfdVpwYgG1AsnWAgDw3QfKLQYoMm6xRVwEe0O9qn9O2GhGvOy1o5DJ+gLUjUKWxbLI+YyKZ9u; 4:acWwJtn01geHFqgiRtwTVJaU/OLurGJwN9t0Ev0EVUCv53KchU+kLrtGGO6uSowAfxYrEe1UaxZNoqDYiwn5jxbZSKXR8WVD7C1WfI9GU0hEgGIan586BlxDWDUeDPaC21+qfiusTGSANNvKpe6XanFWH51W+KN1+/CGnW3LA/TLx+ed5S6K8X3cUpQNt9YVVg+mq48N9Bb4X2MAhMHVHRFKg4daMGtq0d2buAqt63kpINloLq38Vr/4JEi71fDptVfNiwy+UM9XXoBTE/xZzA== 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:VXuVoWEpQDhHDBWzwkPt17XRYfbwggsHwR6hHDEav?= =?us-ascii?Q?9ZflPfoZqazz7ovB/UzPjRe2FIkGjGRzcEjKC31pDtcKlvB4AhmxwtLtJj0a?= =?us-ascii?Q?T++FVOaMQ1IATgu5jqOnTFae+SKa8qfaeiGjSqgI2EEbqpspnJs0xIz04pwd?= =?us-ascii?Q?/rZz7UBnkn5HklU/P/P9pMK8K/sxxINvGVu/7SluilgFZ5C+9JEsedEdkE5b?= =?us-ascii?Q?kDqRhtXcihbaAienInknM8YvPSXh/Gc5YVXCKWp5/q172790IFEeb/yLL9u7?= =?us-ascii?Q?Ir0Hfenk1uIshCAeOo03tiNS8/FYCpr8GZZuVGWjileFk4SzK8joK0jn0x0X?= =?us-ascii?Q?J09Tpvv+qAg4p5y8cQG1xvIY35pShl3xPnJxv2bzIf8LZtOJFssRyQsubthd?= =?us-ascii?Q?TpPJ7z8wwGuNZtpxjrBW6c6gwAzLn9RyiFeDfM5rx8mQfDqemj2u2H6SlpLa?= =?us-ascii?Q?+EWLE88EzB0WaLatiNZV7WGHuMoATK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HGFkI1q8DhDJWhE7+2PBbev7UbSQ2ytb1alNnqGZ0bqvij39yK+ibJeuMvuPAxrVSlugAJeW3s784BWlog90+SYNmeHhCyeVO3b4C0EIEH3yfyeVmZrnFYD22RMl9ePEHS9Wnq3q8fvkWHC+8eVQXQnWvkTL+QrdlMHsuzuwZhzYN1Iq5WAInVfojJX/ud1gkuc9A6cvgcsE=; 5:CSTW+XWhhNJaMavBcI2Xxu+Zw/wH7QmsIId9DUHhhVm+ymeVMr7XNIexLUwHuzQomBgx7Xl3cKV/C+h5W4Nsqd3VDhEdLHtwQaiJHy9I/zFH1GzTQFgXEVfdNHd/weZfvyq4JKSvb/TzgkHYBX5JOH4abYKbf073F0CDf+rwx+w=; 24:7dugn6An41r9ojJZZfeeZUP2PCH5CopDU3QYbDAAkQB89hzmJcXZDTqzWoxchokYjF9JkqEsko6z9b5qPLY7LisJ5NIxUhkWEoKCzX5y4CU=; 7:4cOkLe3lTFycjqr/7+pWAqSz7RdUQxsv+H5lJmtQft9cHC1ZdqhZA2rE+3ZnMyIb3S9rsfsLo/A1mQwoeWRA89IdHKenxNHTSLBVpkLjIh0VVBPYNX88Zk5mwLnHHabaerp00KS5k85D0W0KnesDRTkq84kqj/qS1Fl7vJ6hgUb4yfGifQFo+lC+STAeAjFdlSiXodw0hoI2TjShqF8jmMSNLIX2Ve9Hs4feKAM7iGzVzoncFGrV2Zae78CQVbH0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:25:52.2550 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa0d034a-e763-4001-abec-08d54c42a8c2 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 25/39] examples/tep_termination: 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:53 -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/tep_termination/vxlan_setup.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c index 1ad4ca3cd..b53f8fc8d 100644 --- a/examples/tep_termination/vxlan_setup.c +++ b/examples/tep_termination/vxlan_setup.c @@ -95,17 +95,22 @@ uint8_t tep_filter_type[] = {RTE_TUNNEL_FILTER_IMAC_TENID, RTE_TUNNEL_FILTER_OMAC_TENID_IMAC,}; /* Options for configuring ethernet port */ -static const struct rte_eth_conf port_conf = { +static struct rte_eth_conf port_conf = { .rxmode = { .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 */ - .hw_strip_crc = 1, /**< CRC stripped by hardware */ + .ignore_offload_bitfield = 1, + .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, + .offloads = (DEV_TX_OFFLOAD_IPV4_CKSUM | + DEV_TX_OFFLOAD_UDP_CKSUM | + DEV_TX_OFFLOAD_TCP_CKSUM | + DEV_TX_OFFLOAD_SCTP_CKSUM | + DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | + DEV_TX_OFFLOAD_TCP_TSO | + DEV_TX_OFFLOAD_MULTI_SEGS | + DEV_TX_OFFLOAD_VXLAN_TNL_TSO), }, }; @@ -141,6 +146,7 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool) struct rte_eth_rxconf *rxconf; struct rte_eth_txconf *txconf; struct vxlan_conf *pconf = &vxdev; + struct rte_eth_conf local_port_conf = port_conf; pconf->dst_port = udp_port; @@ -154,15 +160,18 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool) rxconf = &dev_info.default_rxconf; txconf = &dev_info.default_txconf; - txconf->txq_flags = 0; + txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE; if (port >= rte_eth_dev_count()) return -1; rx_rings = nb_devices; - + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) + local_port_conf.txmode.offloads |= + DEV_TX_OFFLOAD_MBUF_FAST_FREE; /* Configure ethernet device. */ - retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf); + retval = rte_eth_dev_configure(port, rx_rings, tx_rings, + &local_port_conf); if (retval != 0) return retval; @@ -172,6 +181,7 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool) return retval; /* Setup the queues. */ + rxconf->offloads = local_port_conf.rxmode.offloads; for (q = 0; q < rx_rings; q++) { retval = rte_eth_rx_queue_setup(port, q, rx_ring_size, rte_eth_dev_socket_id(port), @@ -180,6 +190,7 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool) if (retval < 0) return retval; } + txconf->offloads = local_port_conf.txmode.offloads; for (q = 0; q < tx_rings; q++) { retval = rte_eth_tx_queue_setup(port, q, tx_ring_size, rte_eth_dev_socket_id(port), -- 2.12.0