From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id DA2C74C9D for ; Tue, 14 Aug 2018 13:09:48 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fpXAf-0000wO-64; Tue, 14 Aug 2018 11:07:29 +0000 From: Christian Ehrhardt To: Yongseok Koh Cc: dpdk stable Date: Tue, 14 Aug 2018 13:06:39 +0200 Message-Id: <20180814110651.25277-36-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180814110651.25277-1-christian.ehrhardt@canonical.com> References: <20180814110651.25277-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'net/mlx5: preserve allmulticast flag for flow isolation mode' has been queued to stable release 18.05.1 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: Tue, 14 Aug 2018 11:09:49 -0000 Hi, FYI, your patch has been queued to stable release 18.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/16/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From f79da6b446da14335581a094bf98b9509884f62d Mon Sep 17 00:00:00 2001 From: Yongseok Koh Date: Thu, 2 Aug 2018 14:06:32 -0700 Subject: [PATCH] net/mlx5: preserve allmulticast flag for flow isolation mode [ upstream commit 2547ee74580d376a680729567dae8bc757fba438 ] mlx5_dev_ops_isolate doesn't have APIs for enabling/disabling allmulti mode as it can't be enabled in flow isolation mode. If the function pointers are null, librte APIs such as rte_eth_allmulticast_enable/disable() fail to set the flag (dev->data->all_multicast). The flag is used when starting traffic by mlx5_traffic_enable(). When switching out of flow isolation mode, allmulti mode will not be set even though it has been enabled. Fixes: 0887aa7f27f3 ("net/mlx5: add new operations for isolated mode") Signed-off-by: Yongseok Koh --- drivers/net/mlx5/mlx5.c | 2 ++ drivers/net/mlx5/mlx5_rxmode.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 187a01463..72fe9fcee 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -372,6 +372,8 @@ const struct eth_dev_ops mlx5_dev_ops_isolate = { .dev_close = mlx5_dev_close, .promiscuous_enable = mlx5_promiscuous_enable, .promiscuous_disable = mlx5_promiscuous_disable, + .allmulticast_enable = mlx5_allmulticast_enable, + .allmulticast_disable = mlx5_allmulticast_disable, .link_update = mlx5_link_update, .stats_get = mlx5_stats_get, .stats_reset = mlx5_stats_reset, diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c index 3c0373bb4..e74fdef8b 100644 --- a/drivers/net/mlx5/mlx5_rxmode.c +++ b/drivers/net/mlx5/mlx5_rxmode.c @@ -81,10 +81,18 @@ mlx5_promiscuous_disable(struct rte_eth_dev *dev) void mlx5_allmulticast_enable(struct rte_eth_dev *dev) { + struct priv *priv = dev->data->dev_private; int ret; dev->data->all_multicast = 1; - if (((struct priv *)dev->data->dev_private)->config.vf) + if (priv->isolated) { + DRV_LOG(WARNING, + "port %u cannot enable allmulticast mode" + " in flow isolation mode", + dev->data->port_id); + return; + } + if (priv->config.vf) mlx5_nl_allmulti(dev, 1); ret = mlx5_traffic_restart(dev); if (ret) @@ -101,10 +109,11 @@ mlx5_allmulticast_enable(struct rte_eth_dev *dev) void mlx5_allmulticast_disable(struct rte_eth_dev *dev) { + struct priv *priv = dev->data->dev_private; int ret; dev->data->all_multicast = 0; - if (((struct priv *)dev->data->dev_private)->config.vf) + if (priv->config.vf) mlx5_nl_allmulti(dev, 0); ret = mlx5_traffic_restart(dev); if (ret) -- 2.17.1