patches for DPDK stable branches
 help / color / mirror / Atom feed
From: christian.ehrhardt@canonical.com
To: Olivier Matz <olivier.matz@6wind.com>
Cc: Wenjun Wu <wenjun1.wu@intel.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'net/ixgbevf: fix promiscuous and allmulti' has been queued to stable release 19.11.14
Date: Thu, 24 Nov 2022 15:00:32 +0100	[thread overview]
Message-ID: <20221124140034.770192-9-christian.ehrhardt@canonical.com> (raw)
In-Reply-To: <20221124140034.770192-1-christian.ehrhardt@canonical.com>

Hi,

FYI, your patch has been queued to stable release 19.11.14

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/acb3bb3600b226617f5e1d31626dc8f316faa69f

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From acb3bb3600b226617f5e1d31626dc8f316faa69f Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 29 Sep 2022 14:21:55 +0200
Subject: [PATCH] net/ixgbevf: fix promiscuous and allmulti

[ upstream commit 21e471abb548f91190479c75da0c28ebc25dec36 ]

The configuration of allmulti and promiscuous modes conflicts
together. For instance, if we enable promiscuous mode, then enable and
disable allmulti, then the promiscuous mode is wrongly disabled.

Fix this behavior by:
- doing nothing when we set/unset allmulti if promiscuous mode is on
- restorting the proper mode (none or allmulti) when we disable
  promiscuous mode

Fixes: 1f4564ed7696 ("net/ixgbevf: enable promiscuous mode")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Wenjun Wu <wenjun1.wu@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 65d81c6cec..9a196fb9a6 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -8718,9 +8718,13 @@ static int
 ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev)
 {
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int mode = IXGBEVF_XCAST_MODE_NONE;
 	int ret;
 
-	switch (hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_NONE)) {
+	if (dev->data->all_multicast)
+		mode = IXGBEVF_XCAST_MODE_ALLMULTI;
+
+	switch (hw->mac.ops.update_xcast_mode(hw, mode)) {
 	case IXGBE_SUCCESS:
 		ret = 0;
 		break;
@@ -8742,6 +8746,9 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
 	int ret;
 	int mode = IXGBEVF_XCAST_MODE_ALLMULTI;
 
+	if (dev->data->promiscuous)
+		return 0;
+
 	switch (hw->mac.ops.update_xcast_mode(hw, mode)) {
 	case IXGBE_SUCCESS:
 		ret = 0;
@@ -8763,6 +8770,9 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	int ret;
 
+	if (dev->data->promiscuous)
+		return 0;
+
 	switch (hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_MULTI)) {
 	case IXGBE_SUCCESS:
 		ret = 0;
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-24 14:58:14.355601214 +0100
+++ 0009-net-ixgbevf-fix-promiscuous-and-allmulti.patch	2022-11-24 14:58:11.841189674 +0100
@@ -1 +1 @@
-From 21e471abb548f91190479c75da0c28ebc25dec36 Mon Sep 17 00:00:00 2001
+From acb3bb3600b226617f5e1d31626dc8f316faa69f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 21e471abb548f91190479c75da0c28ebc25dec36 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index fd06ddbe35..ae9f65b334 100644
+index 65d81c6cec..9a196fb9a6 100644
@@ -28 +29 @@
-@@ -7787,9 +7787,13 @@ static int
+@@ -8718,9 +8718,13 @@ static int
@@ -43 +44 @@
-@@ -7811,6 +7815,9 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
+@@ -8742,6 +8746,9 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
@@ -53 +54 @@
-@@ -7832,6 +7839,9 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
+@@ -8763,6 +8770,9 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)

  parent reply	other threads:[~2022-11-24 14:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24 14:00 patch 'vdpa/ifc: handle data path update failure' " christian.ehrhardt
2022-11-24 14:00 ` patch 'service: fix build with clang 15' " christian.ehrhardt
2022-11-24 14:00 ` patch 'bus/dpaa: " christian.ehrhardt
2022-11-24 14:00 ` patch 'net/atlantic: " christian.ehrhardt
2022-11-24 14:00 ` patch 'app/testpmd: " christian.ehrhardt
2022-11-24 14:00 ` patch 'test/efd: " christian.ehrhardt
2022-11-24 14:00 ` patch 'test/member: " christian.ehrhardt
2022-11-24 14:00 ` patch 'test/event: " christian.ehrhardt
2022-11-24 14:00 ` christian.ehrhardt [this message]
2022-11-24 14:00 ` patch 'doc: add LRO size limitation in mlx5 guide' " christian.ehrhardt
2022-11-24 14:00 ` patch 'doc: fix maximum packet size of virtio driver' " christian.ehrhardt
2022-11-24 14:04 ` patch 'vdpa/ifc: handle data path update failure' " Christian Ehrhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221124140034.770192-9-christian.ehrhardt@canonical.com \
    --to=christian.ehrhardt@canonical.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    --cc=wenjun1.wu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).