netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-06-07
@ 2022-06-07 18:15 Tony Nguyen
  2022-06-07 18:15 ` [PATCH net 1/2] ixgbe: fix bcast packets Rx on VF after promisc removal Tony Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tony Nguyen @ 2022-06-07 18:15 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet; +Cc: Tony Nguyen, netdev

This series contains updates to ixgbe driver only.

Olivier Matz resolves an issue so that broadcast packets can still be
received when VF removes promiscuous settings and removes setting of
VLAN promiscuous, in promiscuous mode, to prevent a loop when VFs are
bridged.

The following are changes since commit cf67838c4422eab826679b076dad99f96152b4de:
  selftests net: fix bpf build error
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 10GbE

Olivier Matz (2):
  ixgbe: fix bcast packets Rx on VF after promisc removal
  ixgbe: fix unexpected VLAN Rx in promisc mode on VF

 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net 1/2] ixgbe: fix bcast packets Rx on VF after promisc removal
  2022-06-07 18:15 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-06-07 Tony Nguyen
@ 2022-06-07 18:15 ` Tony Nguyen
  2022-06-07 18:15 ` [PATCH net 2/2] ixgbe: fix unexpected VLAN Rx in promisc mode on VF Tony Nguyen
  2022-06-09  4:10 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-06-07 patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Tony Nguyen @ 2022-06-07 18:15 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet
  Cc: Olivier Matz, netdev, anthony.l.nguyen, stable, Nicolas Dichtel,
	Konrad Jankowski

From: Olivier Matz <olivier.matz@6wind.com>

After a VF requested to remove the promiscuous flag on an interface, the
broadcast packets are not received anymore. This breaks some protocols
like ARP.

In ixgbe_update_vf_xcast_mode(), we should keep the IXGBE_VMOLR_BAM
bit (Broadcast Accept) on promiscuous removal.

This flag is already set by default in ixgbe_set_vmolr() on VF reset.

Fixes: 8443c1a4b192 ("ixgbe, ixgbevf: Add new mbox API xcast mode")
Cc: stable@vger.kernel.org
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 7f11c0a8e7a9..8d108a78941b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -1184,9 +1184,9 @@ static int ixgbe_update_vf_xcast_mode(struct ixgbe_adapter *adapter,
 
 	switch (xcast_mode) {
 	case IXGBEVF_XCAST_MODE_NONE:
-		disable = IXGBE_VMOLR_BAM | IXGBE_VMOLR_ROMPE |
+		disable = IXGBE_VMOLR_ROMPE |
 			  IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE | IXGBE_VMOLR_VPE;
-		enable = 0;
+		enable = IXGBE_VMOLR_BAM;
 		break;
 	case IXGBEVF_XCAST_MODE_MULTI:
 		disable = IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE | IXGBE_VMOLR_VPE;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 2/2] ixgbe: fix unexpected VLAN Rx in promisc mode on VF
  2022-06-07 18:15 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-06-07 Tony Nguyen
  2022-06-07 18:15 ` [PATCH net 1/2] ixgbe: fix bcast packets Rx on VF after promisc removal Tony Nguyen
@ 2022-06-07 18:15 ` Tony Nguyen
  2022-06-09  4:10 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-06-07 patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Tony Nguyen @ 2022-06-07 18:15 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet
  Cc: Olivier Matz, netdev, anthony.l.nguyen, stable, Nicolas Dichtel,
	Konrad Jankowski

From: Olivier Matz <olivier.matz@6wind.com>

When the promiscuous mode is enabled on a VF, the IXGBE_VMOLR_VPE
bit (VLAN Promiscuous Enable) is set. This means that the VF will
receive packets whose VLAN is not the same than the VLAN of the VF.

For instance, in this situation:

┌────────┐    ┌────────┐    ┌────────┐
│        │    │        │    │        │
│        │    │        │    │        │
│     VF0├────┤VF1  VF2├────┤VF3     │
│        │    │        │    │        │
└────────┘    └────────┘    └────────┘
   VM1           VM2           VM3

vf 0:  vlan 1000
vf 1:  vlan 1000
vf 2:  vlan 1001
vf 3:  vlan 1001

If we tcpdump on VF3, we see all the packets, even those transmitted
on vlan 1000.

This behavior prevents to bridge VF1 and VF2 in VM2, because it will
create a loop: packets transmitted on VF1 will be received by VF2 and
vice-versa, and bridged again through the software bridge.

This patch remove the activation of VLAN Promiscuous when a VF enables
the promiscuous mode. However, the IXGBE_VMOLR_UPE bit (Unicast
Promiscuous) is kept, so that a VF receives all packets that has the
same VLAN, whatever the destination MAC address.

Fixes: 8443c1a4b192 ("ixgbe, ixgbevf: Add new mbox API xcast mode")
Cc: stable@vger.kernel.org
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 8d108a78941b..d4e63f0644c3 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -1208,9 +1208,9 @@ static int ixgbe_update_vf_xcast_mode(struct ixgbe_adapter *adapter,
 			return -EPERM;
 		}
 
-		disable = 0;
+		disable = IXGBE_VMOLR_VPE;
 		enable = IXGBE_VMOLR_BAM | IXGBE_VMOLR_ROMPE |
-			 IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE | IXGBE_VMOLR_VPE;
+			 IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE;
 		break;
 	default:
 		return -EOPNOTSUPP;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-06-07
  2022-06-07 18:15 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-06-07 Tony Nguyen
  2022-06-07 18:15 ` [PATCH net 1/2] ixgbe: fix bcast packets Rx on VF after promisc removal Tony Nguyen
  2022-06-07 18:15 ` [PATCH net 2/2] ixgbe: fix unexpected VLAN Rx in promisc mode on VF Tony Nguyen
@ 2022-06-09  4:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-09  4:10 UTC (permalink / raw)
  To: Tony Nguyen; +Cc: davem, kuba, pabeni, edumazet, netdev

Hello:

This series was applied to netdev/net.git (master)
by Tony Nguyen <anthony.l.nguyen@intel.com>:

On Tue,  7 Jun 2022 11:15:36 -0700 you wrote:
> This series contains updates to ixgbe driver only.
> 
> Olivier Matz resolves an issue so that broadcast packets can still be
> received when VF removes promiscuous settings and removes setting of
> VLAN promiscuous, in promiscuous mode, to prevent a loop when VFs are
> bridged.
> 
> [...]

Here is the summary with links:
  - [net,1/2] ixgbe: fix bcast packets Rx on VF after promisc removal
    https://git.kernel.org/netdev/net/c/803e9895ea2b
  - [net,2/2] ixgbe: fix unexpected VLAN Rx in promisc mode on VF
    https://git.kernel.org/netdev/net/c/7bb0fb7c63df

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net 1/2] ixgbe: fix bcast packets Rx on VF after promisc removal
  2022-03-25 14:02 [PATCH net 0/2] ixgbe: fix promiscuous mode on VF Olivier Matz
@ 2022-03-25 14:02 ` Olivier Matz
  0 siblings, 0 replies; 5+ messages in thread
From: Olivier Matz @ 2022-03-25 14:02 UTC (permalink / raw)
  To: netdev
  Cc: Jesse Brandeburg, Tony Nguyen, David S . Miller, Jakub Kicinski,
	Paolo Abeni, stable, Hiroshi Shimamoto, Nicolas Dichtel

After a VF requested to remove the promiscuous flag on an interface, the
broadcast packets are not received anymore. This breaks some protocols
like ARP.

In ixgbe_update_vf_xcast_mode(), we should keep the IXGBE_VMOLR_BAM
bit (Broadcast Accept) on promiscuous removal.

This flag is already set by default in ixgbe_set_vmolr() on VF reset.

Fixes: 8443c1a4b192 ("ixgbe, ixgbevf: Add new mbox API xcast mode")
Cc: stable@vger.kernel.org
Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 7f11c0a8e7a9..8d108a78941b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -1184,9 +1184,9 @@ static int ixgbe_update_vf_xcast_mode(struct ixgbe_adapter *adapter,
 
 	switch (xcast_mode) {
 	case IXGBEVF_XCAST_MODE_NONE:
-		disable = IXGBE_VMOLR_BAM | IXGBE_VMOLR_ROMPE |
+		disable = IXGBE_VMOLR_ROMPE |
 			  IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE | IXGBE_VMOLR_VPE;
-		enable = 0;
+		enable = IXGBE_VMOLR_BAM;
 		break;
 	case IXGBEVF_XCAST_MODE_MULTI:
 		disable = IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE | IXGBE_VMOLR_VPE;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-09  4:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 18:15 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-06-07 Tony Nguyen
2022-06-07 18:15 ` [PATCH net 1/2] ixgbe: fix bcast packets Rx on VF after promisc removal Tony Nguyen
2022-06-07 18:15 ` [PATCH net 2/2] ixgbe: fix unexpected VLAN Rx in promisc mode on VF Tony Nguyen
2022-06-09  4:10 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-06-07 patchwork-bot+netdevbpf
  -- strict thread matches above, loose matches on Subject: below --
2022-03-25 14:02 [PATCH net 0/2] ixgbe: fix promiscuous mode on VF Olivier Matz
2022-03-25 14:02 ` [PATCH net 1/2] ixgbe: fix bcast packets Rx on VF after promisc removal Olivier Matz

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).