From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0079.outbound.protection.outlook.com [104.47.0.79]) by dpdk.org (Postfix) with ESMTP id 8D4882C6A for ; Sun, 6 May 2018 08:06:44 +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=83hhsGbDO/hUir13G8BgN2VezRfl6MGwvLzzhnk7IIU=; b=K8fQqR8VdLNeuUedQhgyWKnvzexhkhAk4TiU0fmrj6rRS+eFcYE7g5Hw8eqkTJBi9ljGPwSju+typk5QY7AiDnq6U9PkIJ45a020fKY62bzhx3eAWSbOdoyZu9/cas28UmyrB9h2doI5hUoLYR25qzKSejOBP07QrTj4lfdSmGM= 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:42 +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:40 +0300 Message-Id: X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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:jYvOuFrQeL/rmL3U2iLSfA5Y+N2P8eIs8vrjOdT7/JMul7PC89EjSuJrtjKAY/hPgmXTeiATPF8qzMbkXTnb0+/XcMkUqYrMgXt0shSK3qEMG5Bo+YCGJ//H6mjuE8DlctbeRJ3RS0mIEu9fhy7CQMtGX1UauwMYtEFzC+D8J4xnQ1Uj2R5XqBz2jaIi1nIv3NlH80EDy8/CwRvm6Xbr883CkTtptJq2xCaS7j1Yoqa0+S2AveEG/2HmKCrbgFsF; 25:nMl+EOkc7VcoyUhJClW2zVKzupkfxFHHhJWJVJ6YVjQbdsVIGOjUV4J5flAK+zvXNAWopPgX3aLTx1lwV5R618HYpvE9+ENgycnu5Kkn3vCoDrkt0vkTdC/SNXDfknBz+iQfvJrvixjobLCb+JkM4P+W26stpYkZ/Yi3vELfeUirer93vbcbarDRherOxM4laXJbo2r89Fu+/3LYdMzN3tmm4VyIa31NXvuNxKY4r4gvKVF2DAonrbni4k/bxta6HTq52TCMo/adqbeODLOosrWUr0uTUh2FKDAlI45XAA8OCFYugqUX6djAVO2xBRCcFqLvV1OplejKWcdPShE9yQ==; 31:n4KYKnlwdsk1QrNl7xdmvEhWVwTrW8KPEKVuounoImyAH8xxOcXNTcLRUaqZkfsdnPjVjtG1E7EaqVJSGgGsNr64PoxpjOBI5S6SCeFGPsuMMyc3WRdBy6YKZl45pHkGqTNxd/YiK7iPNl6jrQmcBJGsXh1bxNUvVN1dHM0uWyMee8c2ndW7L+P16kINC/reoKF9hfmtyd0A0gA+sf5VlFMtVqbPVnFLiDN/nbIcuZw= X-MS-TrafficTypeDiagnostic: AM6PR05MB4422: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 20:Cgwzm0/3S2yZu/FNG5tZhpcV62gO14P8lP6G6JJxW0TSVvciwjnqPn8xR9/z5LSRh1s+bTSKck/KwChnJz/qcUIt9sQZUFeOXio+mzTE4CsWiLCpiXghrd+SJkNQL8mwuYM/kKCtf8irEbsgn0puu00svqNtZNxYftUjr0P8/yBSQTBrBKA1XyCtU1gKS5XAQY0OmRxU+CspKmFpwZArYYGqeBMMcudL0SHYztor6YxlGKyaV/1r2PeO0QWftLMCsz6CQL/PIjysCtZq4GGUA1adGZdCHnnM5yIrRj6PTQbZS+Qj1vXqpDKbmDTM19f5GyGI6i6x4d7/PWujFTP/S1bOc+ks2JUNMJmk6Y5v8ZZ+YnvpO3NtFuGlVtbiMDXHmc7U08Yg43EfkmKFNE1A4t+PbJ8dPdWp7q7CQ4limQlHLtYO2symhnDar8k8rQ1lrKOTgMT3l6knH2P3Zgq3ARckTTwBzMMsXaM9xo5U3kCZ1e4yoRYqYuQJtZF0gq+m; 4:Eeg5pibooMzpXNXokMhFWA9vBWH+sZHMSatdF9sU9SRY9PuEqKQUJgKbcBa04gZBu648+Bu+z5VVOnJX+R29UDpr+gS/c4WBpU2YYptOJa+RfSi7PTE8N4vZuWIFjAugr21FmUjIK78rh5VYC6x2OjpslfpncwV86Lc/9N8n5g3Clj6M+5kgqau8ZsRxzmexlUqXudgsNAPOqPPTm9Ge9EBwtde3GvhoxKCRt/hqTvcxombSK4eHg22krKq84kQ5ZOanls3NiICIoee7semqYQ== 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)(366004)(376002)(39380400002)(396003)(346002)(39860400002)(189003)(199004)(105586002)(8676002)(8936002)(316002)(2351001)(53936002)(86362001)(575784001)(2361001)(6116002)(3846002)(106356001)(118296001)(66066001)(36756003)(47776003)(81156014)(55016002)(2906002)(2870700001)(50226002)(4326008)(68736007)(305945005)(7736002)(81166006)(50466002)(25786009)(486006)(5660300001)(476003)(2616005)(69596002)(16526019)(26005)(59450400001)(386003)(97736004)(956004)(186003)(478600001)(7696005)(52116002)(23676004)(6916009)(21086003)(5890100001)(446003)(11346002)(76176011)(21314002)(309714004); 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: =?utf-8?B?MTtBTTZQUjA1TUI0NDIyOzIzOlJhbUt5cXJjSXNub0VwdmNrZ2NMc0tMQ2JK?= =?utf-8?B?MnZzcjJQMHJ1OS9LeXQ4RGFqQk9MUTgrMHY3UTVGMFEvY2J4Wld5dGF2WWht?= =?utf-8?B?a0hUa1VRWldmYVdFY2lwOU9qOCtxRHkrR0o5eEFoZHliZ2NOdkRjYVVrZkF3?= =?utf-8?B?Vk0wRVQxNlRpODdmRi9WTWx6ZllCQ3lvR0haQzc3cXpTak5yRFYzbWQ3dFRL?= =?utf-8?B?L1VTL2prMkZJN3grQUMwQmFqeEo0ZlMycHJubDNYUlNUSHlibGlzN3g4dDIx?= =?utf-8?B?TkF5enREcEZKaXcwdFB5ejEyMWEzSFhPbVBmQUE1L3NwRCs4cDF0YmNaY01X?= =?utf-8?B?dmkzL2VSbldubG11UDAyd1hTaFVJbzM2UmNUWXBzdEhkbm5FTVRUbm5HUXRS?= =?utf-8?B?R3BUOHkwbG1kYVJXR2dDVkVDY3BJOHd2aTQwTnlreVFSVHp5Nm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V7OvFnNutckllkr4BhjAWyNZzgyaqliom/ItTZKEBuT35U5O+LXsoCBVbaoVj5CTIhUJvSWYbTm1TYkakccbCUE2KkC1VCfKNSzw4z29fn0RqF11iPdOuBoYKaBPip2lZH3TP5qNwhrluAlGSmaMlpZnrGbfEhCHzRleLPV6BQ7aQXzt/JYISolLyRjKoAsuB6nDAb1PvVTqVYuM84OQOhKmNnB1KuW/Xe/EQs64NFSKl8N+7XTGI1P/IRzmTzg==; 5:Io67wcS/d9h4MOMIIt7i5sbA+VNKKvXsEdE4LKyB+V6EcnnYZ1M/9BTN9Bei2956FQvn8mnPsTFwXGRhRxZtnhzz9j3331CUsf7t3ErhqB4VgG5UQPnVR1H3MQif6o9DO+pzWi/0pQavL7Pvv9mBxv0eZrq6IgSHlLel31tx+xc=; 24:RsIsUSU8HGL+gIt4xNPf54ASZWOCkUFmSEoZieYD6OBFCo07qsueJbt1cKd8PVPipxgxIrQKF0EZQ0BOqban3PZ5YCcj28NhMWr2hDn67VA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 7:kMec9oHD4KIcLwh7mdXRqqfrRG520TOVfQvg3nP9u5TyiXvlcbEiTU0aD1bwaD8/XI8Irrnp7WQ9/a6fbV54a8v7rOUeKI/dyz41bpCdwCRSSLMZQg7oiw3SB/CplEnR6JEDBUcaqCmjJ6/ZWU+oxl6/WsMlZ/EMixUPa9ji9UewflBxsaPs0i7kNaCBQ0oNhAM0lgcOLaDQexg+L5AhhisoIHtOA0GSHitnq7jotm3yoTzBkWD7Eaa7/CTss7Ib X-MS-Office365-Filtering-Correlation-Id: 578a34d5-1f26-4587-33b6-08d5b3178a79 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2018 06:06:42.6143 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 578a34d5-1f26-4587-33b6-08d5b3178a79 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 11/33] net/mlx5: remove useless empty lines 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:44 -0000 From: NĂ©lio Laranjeiro [ upstream commit 0b3456e391a6518e26c60ab2aa6546964d46a6f6 ] Some empty lines have been added in the middle of the code without any reason. This commit removes them. Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c | 22 ---------------------- drivers/net/mlx5/mlx5_ethdev.c | 7 ------- drivers/net/mlx5/mlx5_mr.c | 1 - drivers/net/mlx5/mlx5_rss.c | 2 -- drivers/net/mlx5/mlx5_rxq.c | 1 - drivers/net/mlx5/mlx5_vlan.c | 6 ------ 6 files changed, 39 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 5aaf568e59..cf0967a1d0 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -597,7 +597,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, return -ENOMEM; } DEBUG("using driver device index %d", idx); - /* Save PCI address. */ mlx5_dev[idx].pci_addr = pci_dev->addr; list = mlx5_glue->get_device_list(&i); @@ -644,7 +643,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, return -err; } ibv_dev = list[i]; - DEBUG("device opened"); /* * Multi-packet send is supported by ConnectX-4 Lx PF as well @@ -685,7 +683,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, 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); - for (i = 0; i < device_attr.orig_attr.phys_port_cnt; i++) { char name[RTE_ETH_NAME_MAX_LEN]; int len; @@ -716,9 +713,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, pci_dev->addr.devid, pci_dev->addr.function); if (device_attr.orig_attr.phys_port_cnt > 1) snprintf(name + len, sizeof(name), " port %u", i); - mlx5_dev[idx].ports |= test; - if (rte_eal_process_type() == RTE_PROC_SECONDARY) { eth_dev = rte_eth_dev_attach_secondary(name); if (eth_dev == NULL) { @@ -755,15 +750,12 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, priv_select_tx_function(priv, eth_dev); continue; } - DEBUG("using port %u (%08" PRIx32 ")", port, test); - ctx = mlx5_glue->open_device(ibv_dev); if (ctx == NULL) { err = ENODEV; goto port_error; } - mlx5_glue->query_device_ex(ctx, NULL, &device_attr); /* Check port status. */ err = mlx5_glue->query_port(ctx, port, &port_attr); @@ -771,19 +763,16 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, ERROR("port query failed: %s", strerror(err)); goto port_error; } - if (port_attr.link_layer != IBV_LINK_LAYER_ETHERNET) { ERROR("port %d is not configured in Ethernet mode", port); err = EINVAL; goto port_error; } - if (port_attr.state != IBV_PORT_ACTIVE) DEBUG("port %d is not active: \"%s\" (%d)", port, mlx5_glue->port_state_str(port_attr.state), port_attr.state); - /* Allocate protection domain. */ pd = mlx5_glue->alloc_pd(ctx); if (pd == NULL) { @@ -791,9 +780,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, err = ENOMEM; goto port_error; } - mlx5_dev[idx].ports |= test; - /* from rte_ethdev.c */ priv = rte_zmalloc("ethdev private structure", sizeof(*priv), @@ -803,7 +790,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, err = ENOMEM; goto port_error; } - priv->ctx = ctx; strncpy(priv->ibdev_path, priv->ctx->device->ibdev_path, sizeof(priv->ibdev_path)); @@ -821,7 +807,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, ERROR("ibv_query_device_ex() failed"); goto port_error; } - config.hw_csum = !!(device_attr_ex.device_cap_flags_ex & IBV_DEVICE_RAW_IP_CSUM); DEBUG("checksum offloading is %ssupported", @@ -857,7 +842,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, #endif DEBUG("hardware RX end alignment padding is %ssupported", (config.hw_padding ? "" : "not ")); - config.tso = ((device_attr_ex.tso_caps.max_tso > 0) && (device_attr_ex.tso_caps.supported_qpts & (1 << IBV_QPT_RAW_PACKET))); @@ -906,7 +890,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, /* Get actual MTU if possible. */ priv_get_mtu(priv, &priv->mtu); DEBUG("port %u MTU is %u", priv->port, priv->mtu); - eth_dev = rte_eth_dev_allocate(name); if (eth_dev == NULL) { ERROR("can not allocate rte ethdev"); @@ -929,7 +912,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0)); TAILQ_INIT(&priv->flows); TAILQ_INIT(&priv->ctrl_flows); - /* Hint libmlx5 to use PMD allocator for data plane resources */ struct mlx5dv_ctx_allocators alctr = { .alloc = &mlx5_alloc_verbs_buf, @@ -946,7 +928,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, /* Store device configuration on private structure. */ priv->config = config; continue; - port_error: if (priv) rte_free(priv); @@ -956,20 +937,17 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, claim_zero(mlx5_glue->close_device(ctx)); break; } - /* * XXX if something went wrong in the loop above, there is a resource * leak (ctx, pd, priv, dpdk ethdev) but we can do nothing about it as * long as the dpdk does not provide a way to deallocate a ethdev and a * way to enumerate the registered ethdevs to free the previous ones. */ - /* no port found, complain */ if (!mlx5_dev[idx].ports) { err = ENODEV; goto error; } - error: if (attr_ctx) claim_zero(mlx5_glue->close_device(attr_ctx)); diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 9bbf1eb7d0..5c43755d05 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -403,7 +403,6 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info) char ifname[IF_NAMESIZE]; info->pci_dev = RTE_ETH_DEV_TO_PCI(dev); - priv_lock(priv); /* FIXME: we should ask the device for these values. */ info->min_rx_bufsize = 32; @@ -492,7 +491,6 @@ mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev) int link_speed = 0; /* priv_lock() is not taken to allow concurrent calls. */ - if (priv_ifreq(priv, SIOCGIFFLAGS, &ifr)) { WARN("ioctl(SIOCGIFFLAGS) failed: %s", strerror(errno)); return -1; @@ -838,7 +836,6 @@ mlx5_dev_get_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) strerror(ret)); goto out; } - fc_conf->autoneg = ethpause.autoneg; if (ethpause.rx_pause && ethpause.tx_pause) fc_conf->mode = RTE_FC_FULL; @@ -849,7 +846,6 @@ mlx5_dev_get_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) else fc_conf->mode = RTE_FC_NONE; ret = 0; - out: priv_unlock(priv); assert(ret >= 0); @@ -890,7 +886,6 @@ mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) ethpause.tx_pause = 1; else ethpause.tx_pause = 0; - priv_lock(priv); if (priv_ifreq(priv, SIOCETHTOOL, &ifr)) { ret = errno; @@ -900,7 +895,6 @@ mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) goto out; } ret = 0; - out: priv_unlock(priv); assert(ret >= 0); @@ -1155,7 +1149,6 @@ priv_dev_interrupt_handler_install(struct priv *priv, struct rte_eth_dev *dev) rte_intr_callback_register(&priv->intr_handle, mlx5_dev_interrupt_handler, dev); } - rc = priv_socket_init(priv); if (!rc && priv->primary_socket) { priv->intr_handle_socket.fd = priv->primary_socket; diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c index 8748ddcf5c..6624d0ffa6 100644 --- a/drivers/net/mlx5/mlx5_mr.c +++ b/drivers/net/mlx5/mlx5_mr.c @@ -76,7 +76,6 @@ mlx5_check_mempool(struct rte_mempool *mp, uintptr_t *start, rte_mempool_mem_iter(mp, mlx5_check_mempool_cb, &data); *start = (uintptr_t)data.start; *end = (uintptr_t)data.end; - return data.ret; } diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c index d06b0bee17..8f5c8beff2 100644 --- a/drivers/net/mlx5/mlx5_rss.c +++ b/drivers/net/mlx5/mlx5_rss.c @@ -123,7 +123,6 @@ priv_rss_reta_index_resize(struct priv *priv, unsigned int reta_size) return ENOMEM; priv->reta_idx = mem; priv->reta_idx_n = reta_size; - if (old_size < reta_size) memset(&(*priv->reta_idx)[old_size], 0, (reta_size - old_size) * @@ -191,7 +190,6 @@ priv_dev_rss_reta_update(struct priv *priv, ret = priv_rss_reta_index_resize(priv, reta_size); if (ret) return ret; - for (idx = 0, i = 0; (i != reta_size); ++i) { idx = i / RTE_RETA_GROUP_SIZE; pos = i % RTE_RETA_GROUP_SIZE; diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 6924202cc8..320a12be9f 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1067,7 +1067,6 @@ mlx5_priv_rxq_get(struct priv *priv, uint16_t idx) rxq_ctrl = container_of((*priv->rxqs)[idx], struct mlx5_rxq_ctrl, rxq); - mlx5_priv_rxq_ibv_get(priv, idx); rte_atomic32_inc(&rxq_ctrl->refcnt); DEBUG("%p: Rx queue %p: refcnt %d", (void *)priv, diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c index 75c3456265..85ed546cbd 100644 --- a/drivers/net/mlx5/mlx5_vlan.c +++ b/drivers/net/mlx5/mlx5_vlan.c @@ -120,14 +120,12 @@ priv_vlan_strip_queue_set(struct priv *priv, uint16_t idx, int on) .flags_mask = IBV_WQ_FLAGS_CVLAN_STRIPPING, .flags = vlan_offloads, }; - err = mlx5_glue->modify_wq(rxq_ctrl->ibv->wq, &mod); if (err) { ERROR("%p: failed to modified stripping mode: %s", (void *)priv, strerror(err)); return; } - /* Update related bits in RX queue. */ rxq->vlan_strip = !!on; } @@ -152,13 +150,11 @@ mlx5_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on) ERROR("VLAN stripping is not supported"); return; } - /* Validate queue number */ if (queue >= priv->rxqs_n) { ERROR("VLAN stripping, invalid queue number %d", queue); return; } - priv_lock(priv); priv_vlan_strip_queue_set(priv, queue, on); priv_unlock(priv); @@ -186,13 +182,11 @@ mlx5_vlan_offload_set(struct rte_eth_dev *dev, int mask) ERROR("VLAN stripping is not supported"); return 0; } - /* Run on every RX queue and set/reset VLAN stripping. */ priv_lock(priv); for (i = 0; (i != priv->rxqs_n); i++) priv_vlan_strip_queue_set(priv, i, hw_vlan_strip); priv_unlock(priv); } - return 0; } -- 2.12.0