From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50069.outbound.protection.outlook.com [40.107.5.69]) by dpdk.org (Postfix) with ESMTP id 1C5D42A6C for ; Sun, 6 May 2018 08:06:37 +0200 (CEST) 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=UoGm30HmpLCDGixqtCM1aIvhhfUGtREFirsY8dm6HUk=; b=D6AdEpkVmP1OgZnKrsIq+w1HZgJ44tCyZeMWEkmisi4gVZqiiwe1CIPRNma8C/38mhA25/e/igle1FYwcDvVnVubOxunjgPjYY0Cuw1tdAP8jpw+mD+YqCUwjH8HAMcK7RIhOzu/IyLLH67szsijgjEFMGD/ppZOOpUioB7JHkM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (141.226.120.58) by AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.16; Sun, 6 May 2018 06:06:35 +0000 From: Shahaf Shuler To: bluca@debian.org Cc: stable@dpdk.org, nelio.laranjeiro@6wind.com, yskoh@mellanox.com, adrien.mazarguil@6wind.com Date: Sun, 6 May 2018 09:05:32 +0300 Message-Id: <54515546b2fc144b62dc37c217ca073d92132c62.1525586525.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: [141.226.120.58] X-ClientProxiedBy: LO2P265CA0008.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:62::20) To AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4422; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 3:+P9K8AuTyhUb6QirV7BuwtONGHS1jOjh+jBWIF7nhSRBqJC4sKG7ULwVX3tVdBIZsqzj4V3EMdhX0v5jwE9GhoXueu5/MISKAgM1RpCagDx5DKx9a5LAYtK2jFkt3G3rHs0A/RPo38ldfxMcTnqzA9vOcA8WJxy8cDEUDwPjR1yn9//BHyPWGL/JeRJoz9//5h7QC3ix9zKbYxX4rpXN0oCQK37KS6hA870jQKDZtiiUqORGr+ll5f6l8qEsVT3Q; 25:6v8r+DPitWc9ROMuQlXvYckZZ7PxiocE9s5Tf5olvc7Ti7DeS91JrpzRA/6aYWLbmLac6svng0bib2ckkrfV5QnKRfyybMEUCi0MAzNTId9p0PMCmj33y+8qGmSYDd0q+CZlcixpU4Stwaz08sA9tbwOgSmkzSTG6nCjzV50beW73bCdLbD/699v6RhctLDtpmQwktUl0Kpyj5nZKziiEA6YuxRuPPwWkroQQS/yr2jRl1CUl5T8nqdlsBMgO+NSQQtHqf7KDqAhr4oVWL+wlpSOOJkCnZnr/8165dmvCVzTKMUrLiW9Tri+U+PbpuZndvWJUqodUsa0n6xlWvfZhg==; 31:9zzmGCP5unTQxfBJfOh66QixTxiIm44UHezf/XspqCKfHPdPVN7EgTexui7a3cB1uB3cFocfo3qXoRhABcjthNGA+zLVzl2ej/xglx/XtnkCwWFjA4AgC7MhG5WwlTC5sCfvlM8GLh9CD0uApGOazSM3u9H/GkETq1GuAghJt5CgPxdcOxgCfJAYG3ZvIWSfUNZRT0kBFWoSckDQooMmbU1wugRcqWJqCEhtb3gMwTA= X-MS-TrafficTypeDiagnostic: AM6PR05MB4422: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 20:MtARk1gGLh9b6mgL3R2p0Ni2lbBWxRCsl+oXogRawATrUrg4MI2iMIkivScXgsFv/AWvCRALhzbfzXQL1Ro+lmIbUrC9+4dGt5uwR64RkHi4rpsSr2SLku5TmPU/+KLat5KSCNpku5RF5ZrDguVnxWLG8ZKoWdkRVjo3mrHEUmbF0TWQjoHVuFY4INf+wx3HhY+DaMN7zFf0N3pA8HcIQJEzRqJUIzw/08tX43Od5bCdpykloaNFlvL87LyeqfQJKutsYUBJmW14aKBewEzEEbMqgxaPb1PqzPwyBYhz6/SZyOl/RyXz6VNKUXoa1IOzcGuSaTPyv8jjLgO0XOL6cSdNc9rjgmHjGVTEFEPLRw0jeZqbRXoh+YAIPfr6u3dIsfaUw5yHlaj68UtY1g0d16S/4CZjb6N0eydKZJRY/kuf2NjfymsuFh3TUvEb8NhxdKP57nDQAbS0hFhEY3U9NyrDiue3EgpWLbGHGLWvQm+Gzm60SynOhnNtQwPPwDZ1; 4:VaWqnPcTr7ZQrlPJ3Sydz62rW+rK3NNt17K3HEKqS5b/lkBjj0uq/ohV3LZ116Ih7mnwNHE3cOQieos1N6WP16bOBPxNrq3JNudk/EwjkdWa0m51wRN7kbfjm2Dr0cy0oh7wBbDzLg9eVZxiasuzamSWQwbWiX6efj8RvDbEbJqRoNvgW//RB64L7j5QQo7rjY+0BkBkcE+IilbBPfJxnh9sSBL6f7y0NTjM3GsLlykSS//06U2qbRGp19pC5kpaz7V0euNLLqz6sZ4QTc4AkA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:AM6PR05MB4422; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4422; X-Forefront-PRVS: 06640999CA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(396003)(346002)(39860400002)(376002)(366004)(189003)(199004)(59450400001)(386003)(69596002)(48376002)(16526019)(26005)(186003)(956004)(97736004)(25786009)(486006)(50466002)(476003)(2616005)(5660300001)(6666003)(76176011)(11346002)(446003)(52116002)(7696005)(478600001)(51416003)(21086003)(6916009)(118296001)(6116002)(3846002)(106356001)(66066001)(16586007)(8936002)(8676002)(105586002)(2361001)(86362001)(316002)(53936002)(2351001)(4326008)(68736007)(305945005)(81166006)(7736002)(81156014)(2906002)(55016002)(36756003)(47776003)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4422; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR05MB4422; 23:V1xCUFaGxH4zfCyEccb2SPgCRpKjzTf2nErsw81mx?= =?us-ascii?Q?ezS3LaX39bDy6kwZcgHvUeWSe0mYuo5VSrLSIL8Rv9jFEpZCJldv5NC57GX2?= =?us-ascii?Q?dwaVDdcaAS99H9pJ2xe+XodLnOLO0HsO24s2gAAvNEbSpAXPB2Mj2/4c8gs4?= =?us-ascii?Q?XkmVS3zJuAYEe525xfYX6NEbf2UwwqHjigcC5yUVOs7BKsbsWqwUCDkw7irK?= =?us-ascii?Q?bQymQtNJkgtKKFxBbOj0aXeH69aOYLw18uW1EByEc31MX0CTkemF1cZoPqbB?= =?us-ascii?Q?KZUIvo1OSR5Et9ltAxC6llqo8nqAXwJ5/S9XLXfxqwH0mVSt+AaHwFpWfeua?= =?us-ascii?Q?O5ZEYGOuQuYnE9OLhZ+K1/vFik/jdjfDm7GcEI3omxNexrhMlCkW+096t9VR?= =?us-ascii?Q?KlL9UMORYNbozSHbmEtNYN4hiatukK7iupFDMqHAxF+SiYcL+fNhKnxiG0eq?= =?us-ascii?Q?EOijJywMO4hrU2gCe7I2c412RdGNle5pk9bB8eOfxZfwm6jonHmDbS/X2lyq?= =?us-ascii?Q?+5oNYIzCaevksB5CzDu2QnDKsMSB4rSHVzeiSjc7aX5qNUN+CEL5oPrsAdDR?= =?us-ascii?Q?5+WngK7Cu7iGi2eLCTfQP5u7YlMhp7VkfS8zFNDP7Y9zduvGsHJqAhKO1O9H?= =?us-ascii?Q?RWhmInlV5TGMst4ERpRtum8hUCQjflOSJYhU79FSo81wtEqhWgh6eryPhApb?= =?us-ascii?Q?QXGCD7aYYVkLHk91Kc2JKbE06cvV4/qi4fkNBluewcxPTgSu7IEw7JKg1ALZ?= =?us-ascii?Q?8XqxtRKOOUQG/y+qhRU1tU9zwb1X/wUaxpEUjQ3AyqItOc5ZOSmKoPD8Ah6/?= =?us-ascii?Q?jCb5nFXjYF6fOkqBl4JDp1zAOq8zBIg2nA5D7XA6jkGERBhtz6paFUtCYR0Z?= =?us-ascii?Q?jeBws2F1wOR29C42y8GLx1hRMYRt1MWdlPkkkZKTklZyDjVCSSvbeRRW5dGK?= =?us-ascii?Q?WOh9XlKg+mbHfZtF4/vuQp8FDLGt/IxRy1MlDddyjHBAxZV9j+2bF2plefTP?= =?us-ascii?Q?wSAaG6Ot8eNXCq5XQeQgTEm+rH0IxVHnzV3tmbXuSGHIIuDPEE77tXiQLHJ8?= =?us-ascii?Q?xBYaGGzX8zpsU8MzE77FtyHv5Fwmi8S2OCR39ZfMoA2LGaBgUG7Kfwt2Xkzg?= =?us-ascii?Q?2ks5M0XasasUa8TTmTFj2fAj1kXyvncXiEYgSAXDtuU/biFivrm1sa2VI68l?= =?us-ascii?Q?wuyImdSyF0J2MoTJbokx4osly2xkyjfTQiHx/E5ommkqAEBjhgftCwl8Hkym?= =?us-ascii?Q?qhMtFoyNwAVB756IF/5uGNFOZXJdVwhEXcymF6P9DjlWTV/VlsiRKDiqyiO8?= =?us-ascii?B?dz09?= X-Microsoft-Antispam-Message-Info: nFuxiVvOUWz6oKg1U5xxX0ZfP4xt/sXM/LxEMnwedUH86vPRzamC2lJNPGMxhsybpLueB0IBnTJs7qaisIOGdnvyuQnUutwwJYGYe6x7uuS09rZRRx8D9Lp+qw7rIoAKDw2Hz1ID34wFaut//no5E8u741BPfoTi8aV5dbT34lcPbhyCUuZPiYV9wLo0Hw86 X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 6:Qj+SIWU/Nb3Vq7B4KMXK6FhYfPcb+luV7kEClvQc6bohtCINXme2Ki/YCgiFmlo25b5yDlx/uWaz1AALrAVvA5OeJ6g80r3tF014J+nNUvkm8v8qHwWDcA3C/3Oi1BEXD4ITBcSUHgqKEwN95zVYo0HX03EsutX4roqZin+76i/XfYrTBwwb3dZJyy/Y3XG+63sMyUya0aYBaiRzXWPhdbzJzoMC6YDAckKYXC+ZXnwPgkUlo93TbPOJZ2J+mCBIgJDXI2tWbsfuwu5Mff0vJD6bdLrTLhMu6AXsDOaE9j9/LFn6jbFsQEe9g5NgR4f8+JYwxjOn6MYl00/Z1TRLoNAMO2galKLLo/PVyBHuJh0R3MlINOyb7wxFbWKT5kSoSHL9H9wsmLdtNC+K7IZLSwTHumgU9ySFFl7WB9hXiUG/lZ0lHaGAcXr/MuRg6oI2FJwy3I4d4uLvrmS2zM03ng==; 5:9ShWGL4pOyYTCL6sDWQJX9yxSkdUqEqLls1YLg6KF68lRaXx8McLSVKvRJeHjxL+DMcGoSqymfS3iWE4cRBJ7w+RvxMwZ+GsbChzqtU6iwICrHJ6fLYsb83+hf6VOv2jbC6McbI4xlQQ0ehQTEamer54ryVUysoWjb7qLvQ3lng=; 24:Jncq3lT39YZ5hy7e48MLGGcr8q5McvreJIIpcRoZuuj5oyniQ93KREdazOsa9kzqiRZ/oTDw0e0cBEvqHAzH49BxmOerFaXLED+6IB/RAcc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 7:UiiZGn1nksjyPZzJFFGXsn2//G0+v1uwSZtw2NPyKoYBK7rGbYEVq/A78zveEY8AgTeJEo03mQKD+QF7ppfpXNRiKaox4/1sMXPGGeQmoq9TKYlbaPxc2kUej6/fkTYKUJx8oHYVyEYJrk4ZBoAwE4JiqzJT7Ik8sY14pbv9h/LKdN1wVO0F3igjWZ8FiGT64FLMaDPR/ZA6jfiecxe8mrHohktQy7hykF3Onrc1wPezriYX8uffCzehTx/Zeogo X-MS-Office365-Filtering-Correlation-Id: 5b6c83a5-9d19-48a7-6657-08d5b31785fe X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2018 06:06:35.0986 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b6c83a5-9d19-48a7-6657-08d5b31785fe X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4422 Subject: [dpdk-stable] [PATCH 03/33] net/mlx5: fix tunnel offloads cap query X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 06:06:37 -0000 [ upstream commit 038e72511f2147c238ff1cb021c82d74efcf630f ] The query for the tunnel stateless offloads is wrongly implemented because of: 1. It was using the device id to query for the offloads. 2. It was using a compilation flag for Verbs which no longer exits. The main reason was lack of proper API from Verbs. Fixing the query to use rdma-core API. The capability returned from rdma-core refer to both Tx and Rx sides. Eventhough there is a separate cap for GRE and VXLAN, implementation merge them into a single flag in order to simplify the checks on the data path. Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core") Fixes: f5fde5205101 ("net/mlx5: add hardware checksum offload for tunnel packets") Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler Acked-by: Yongseok Koh Acked-by: Xueming Li Acked-by: Nelio Laranjeiro --- drivers/net/mlx5/Makefile | 6 +++--- drivers/net/mlx5/mlx5.c | 39 +++++++++++++++------------------------ drivers/net/mlx5/mlx5.h | 4 ++-- drivers/net/mlx5/mlx5_rxq.c | 2 +- 4 files changed, 21 insertions(+), 30 deletions(-) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 3bc9736c9c..afda4118fd 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -125,9 +125,9 @@ mlx5_autoconf.h.new: FORCE mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh $Q $(RM) -f -- '$@' $Q sh -- '$<' '$@' \ - HAVE_IBV_DEVICE_VXLAN_SUPPORT \ - infiniband/verbs.h \ - enum IBV_DEVICE_VXLAN_SUPPORT \ + HAVE_IBV_DEVICE_TUNNEL_SUPPORT \ + infiniband/mlx5dv.h \ + enum MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS \ $(AUTOCONF_OUTPUT) $Q sh -- '$<' '$@' \ HAVE_IBV_WQ_FLAG_RX_END_PADDING \ diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 6c0985bd69..61cb93101a 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -584,7 +584,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) unsigned int tunnel_en = 0; int idx; int i; - struct mlx5dv_context attrs_out; + struct mlx5dv_context attrs_out = {0}; #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT struct ibv_counter_set_description cs_desc; #endif @@ -633,20 +633,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) PCI_DEVICE_ID_MELLANOX_CONNECTX5VF) || (pci_dev->id.device_id == PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF)); - switch (pci_dev->id.device_id) { - case PCI_DEVICE_ID_MELLANOX_CONNECTX4: - tunnel_en = 1; - break; - case PCI_DEVICE_ID_MELLANOX_CONNECTX4LX: - case PCI_DEVICE_ID_MELLANOX_CONNECTX5: - case PCI_DEVICE_ID_MELLANOX_CONNECTX5VF: - case PCI_DEVICE_ID_MELLANOX_CONNECTX5EX: - case PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF: - tunnel_en = 1; - break; - default: - break; - } INFO("PCI information matches, using device \"%s\"" " (SR-IOV: %s)", list[i]->name, @@ -675,6 +661,9 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) * Multi-packet send is supported by ConnectX-4 Lx PF as well * as all ConnectX-5 devices. */ +#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT + attrs_out.comp_mask |= MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS; +#endif mlx5_glue->dv_query_device(attr_ctx, &attrs_out); if (attrs_out.flags & MLX5DV_CONTEXT_FLAGS_MPW_ALLOWED) { if (attrs_out.flags & MLX5DV_CONTEXT_FLAGS_ENHANCED_MPW) { @@ -693,6 +682,17 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) cqe_comp = 0; else cqe_comp = 1; +#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT + if (attrs_out.comp_mask & MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) { + tunnel_en = ((attrs_out.tunnel_offloads_caps & + MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN) && + (attrs_out.tunnel_offloads_caps & + MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE)); + } + DEBUG("Tunnel offloading is %ssupported", tunnel_en ? "" : "not "); +#else + WARN("Tunnel offloading disabled due to old OFED/rdma-core version"); +#endif if (mlx5_glue->query_device_ex(attr_ctx, NULL, &device_attr)) goto error; INFO("%u port(s) detected", device_attr.orig_attr.phys_port_cnt); @@ -838,15 +838,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) IBV_DEVICE_RAW_IP_CSUM); DEBUG("checksum offloading is %ssupported", (config.hw_csum ? "" : "not ")); - -#ifdef HAVE_IBV_DEVICE_VXLAN_SUPPORT - config.hw_csum_l2tun = - !!(exp_device_attr.exp_device_cap_flags & - IBV_DEVICE_VXLAN_SUPPORT); -#endif - DEBUG("Rx L2 tunnel checksum offloads are %ssupported", - (config.hw_csum_l2tun ? "" : "not ")); - #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT config.flow_counter_en = !!(device_attr.max_counter_sets); mlx5_glue->describe_counter_set(ctx, 0, &cs_desc); diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index da44faaf4f..9ad0533fcd 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -75,13 +75,13 @@ TAILQ_HEAD(mlx5_flows, rte_flow); */ struct mlx5_dev_config { unsigned int hw_csum:1; /* Checksum offload is supported. */ - unsigned int hw_csum_l2tun:1; /* Same for L2 tunnels. */ unsigned int hw_vlan_strip:1; /* VLAN stripping is supported. */ unsigned int hw_fcs_strip:1; /* FCS stripping is supported. */ unsigned int hw_padding:1; /* End alignment padding is supported. */ unsigned int sriov:1; /* This is a VF or PF with VF devices. */ unsigned int mps:2; /* Multi-packet send supported mode. */ - unsigned int tunnel_en:1; /* Whether tunnel is supported. */ + unsigned int tunnel_en:1; + /* Whether tunnel stateless offloads are supported. */ unsigned int flow_counter_en:1; /* Whether flow counter is supported. */ unsigned int cqe_comp:1; /* CQE compression is enabled. */ unsigned int tso:1; /* Whether TSO is supported. */ diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index ff58c49213..238fa7e563 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1006,7 +1006,7 @@ mlx5_priv_rxq_new(struct priv *priv, uint16_t idx, uint16_t desc, /* Toggle RX checksum offload if hardware supports it. */ tmpl->rxq.csum = !!(conf->offloads & DEV_RX_OFFLOAD_CHECKSUM); tmpl->rxq.csum_l2tun = (!!(conf->offloads & DEV_RX_OFFLOAD_CHECKSUM) && - priv->config.hw_csum_l2tun); + priv->config.tunnel_en); tmpl->rxq.hw_timestamp = !!(conf->offloads & DEV_RX_OFFLOAD_TIMESTAMP); /* Configure VLAN stripping. */ tmpl->rxq.vlan_strip = !!(conf->offloads & DEV_RX_OFFLOAD_VLAN_STRIP); -- 2.12.0