* [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs @ 2022-09-29 12:08 Olivier Matz 2022-09-29 12:09 ` [PATCH 1/2] net/ixgbe: fix bcast packets Rx on VF after promisc removal Olivier Matz ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Olivier Matz @ 2022-09-29 12:08 UTC (permalink / raw) To: dev; +Cc: Qiming Yang, Wenjun Wu, Qi Zhang, Wei Zhao, stable These 2 patches have been submitted and accepted to the kernel (see links in the patches). They also apply smoothly to DPDK, however I didn't have the opportunity to test them with a PF managed by DPDK. Given this is exactly the same code, I think it could be applied anyway. Olivier Matz (2): net/ixgbe: fix bcast packets Rx on VF after promisc removal net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF drivers/net/ixgbe/ixgbe_pf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.30.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] net/ixgbe: fix bcast packets Rx on VF after promisc removal 2022-09-29 12:08 [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs Olivier Matz @ 2022-09-29 12:09 ` Olivier Matz 2022-09-29 12:09 ` [PATCH 2/2] net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF Olivier Matz 2022-10-10 1:36 ` [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs Wu, Wenjun1 2 siblings, 0 replies; 5+ messages in thread From: Olivier Matz @ 2022-09-29 12:09 UTC (permalink / raw) To: dev; +Cc: Qiming Yang, Wenjun Wu, Qi Zhang, Wei Zhao, stable 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_vf_reset_event() on VF reset. A similar patch was accepted in Linux kernel (see link). Fixes: 0355c379b71f ("net/ixgbe: support VF promiscuous by PF driver") Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=803e9895ea2b Signed-off-by: Olivier Matz <olivier.matz@6wind.com> --- drivers/net/ixgbe/ixgbe_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index c73833b7ae..c5ef940533 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -747,9 +747,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) 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 [flat|nested] 5+ messages in thread
* [PATCH 2/2] net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF 2022-09-29 12:08 [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs Olivier Matz 2022-09-29 12:09 ` [PATCH 1/2] net/ixgbe: fix bcast packets Rx on VF after promisc removal Olivier Matz @ 2022-09-29 12:09 ` Olivier Matz 2022-10-10 1:36 ` [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs Wu, Wenjun1 2 siblings, 0 replies; 5+ messages in thread From: Olivier Matz @ 2022-09-29 12:09 UTC (permalink / raw) To: dev; +Cc: Qiming Yang, Wenjun Wu, Qi Zhang, Wei Zhao, stable 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 as 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. A similar patch was accepted in Linux kernel (see link). Fixes: 0355c379b71f ("net/ixgbe: support VF promiscuous by PF driver") Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7bb0fb7c63df Signed-off-by: Olivier Matz <olivier.matz@6wind.com> --- drivers/net/ixgbe/ixgbe_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index c5ef940533..0a0f639e39 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -771,9 +771,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) return -1; } - 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 -1; -- 2.30.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs 2022-09-29 12:08 [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs Olivier Matz 2022-09-29 12:09 ` [PATCH 1/2] net/ixgbe: fix bcast packets Rx on VF after promisc removal Olivier Matz 2022-09-29 12:09 ` [PATCH 2/2] net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF Olivier Matz @ 2022-10-10 1:36 ` Wu, Wenjun1 2022-10-10 1:44 ` Zhang, Qi Z 2 siblings, 1 reply; 5+ messages in thread From: Wu, Wenjun1 @ 2022-10-10 1:36 UTC (permalink / raw) To: Matz, Olivier, dev; +Cc: Yang, Qiming, Zhang, Qi Z, Zhao1, Wei, stable > -----Original Message----- > From: Olivier Matz <olivier.matz@6wind.com> > Sent: Thursday, September 29, 2022 8:09 PM > To: dev@dpdk.org > Cc: Yang, Qiming <qiming.yang@intel.com>; Wu, Wenjun1 > <wenjun1.wu@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei > <wei.zhao1@intel.com>; stable@dpdk.org > Subject: [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs > > These 2 patches have been submitted and accepted to the kernel (see links in > the patches). > > They also apply smoothly to DPDK, however I didn't have the opportunity to > test them with a PF managed by DPDK. > > Given this is exactly the same code, I think it could be applied anyway. > > Olivier Matz (2): > net/ixgbe: fix bcast packets Rx on VF after promisc removal > net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF > > drivers/net/ixgbe/ixgbe_pf.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > -- > 2.30.2 Acked-by: Wenjun Wu <wenjun1.wu@intel.com> Thanks, Wenjun ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs 2022-10-10 1:36 ` [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs Wu, Wenjun1 @ 2022-10-10 1:44 ` Zhang, Qi Z 0 siblings, 0 replies; 5+ messages in thread From: Zhang, Qi Z @ 2022-10-10 1:44 UTC (permalink / raw) To: Wu, Wenjun1, Matz, Olivier, dev; +Cc: Yang, Qiming, Zhao1, Wei, stable > -----Original Message----- > From: Wu, Wenjun1 <wenjun1.wu@intel.com> > Sent: Monday, October 10, 2022 9:37 AM > To: Matz, Olivier <olivier.matz@6wind.com>; dev@dpdk.org > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z > <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>; > stable@dpdk.org > Subject: RE: [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs > > > > > -----Original Message----- > > From: Olivier Matz <olivier.matz@6wind.com> > > Sent: Thursday, September 29, 2022 8:09 PM > > To: dev@dpdk.org > > Cc: Yang, Qiming <qiming.yang@intel.com>; Wu, Wenjun1 > > <wenjun1.wu@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei > > <wei.zhao1@intel.com>; stable@dpdk.org > > Subject: [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in > > VFs > > > > These 2 patches have been submitted and accepted to the kernel (see > > links in the patches). > > > > They also apply smoothly to DPDK, however I didn't have the > > opportunity to test them with a PF managed by DPDK. > > > > Given this is exactly the same code, I think it could be applied anyway. > > > > Olivier Matz (2): > > net/ixgbe: fix bcast packets Rx on VF after promisc removal > > net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF > > > > drivers/net/ixgbe/ixgbe_pf.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > -- > > 2.30.2 > > Acked-by: Wenjun Wu <wenjun1.wu@intel.com> Applied to dpdk-next-net-intel. Thanks Qi > > Thanks, > Wenjun ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-10-10 1:44 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-09-29 12:08 [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs Olivier Matz 2022-09-29 12:09 ` [PATCH 1/2] net/ixgbe: fix bcast packets Rx on VF after promisc removal Olivier Matz 2022-09-29 12:09 ` [PATCH 2/2] net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF Olivier Matz 2022-10-10 1:36 ` [PATCH 0/2] net/ixgbe: fixes related to promiscuous mode in VFs Wu, Wenjun1 2022-10-10 1:44 ` Zhang, Qi Z
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).