* [PATCH net-next,v4] bonding: support balance-alb with openvswitch
@ 2023-07-29 17:31 Mat Kowalski
2023-07-30 22:51 ` Jay Vosburgh
0 siblings, 1 reply; 5+ messages in thread
From: Mat Kowalski @ 2023-07-29 17:31 UTC (permalink / raw)
To: netdev@vger.kernel.org
Cc: Jay Vosburgh, Andy Gospodarek, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Commit d5410ac7b0ba ("net:bonding:support balance-alb interface with
vlan to bridge") introduced a support for balance-alb mode for
interfaces connected to the linux bridge by fixing missing matching of
MAC entry in FDB. In our testing we discovered that it still does not
work when the bond is connected to the OVS bridge as show in diagram
below:
eth1(mac:eth1_mac)--bond0(balance-alb,mac:eth0_mac)--eth0(mac:eth0_mac)
|
bond0.150(mac:eth0_mac)
|
ovs_bridge(ip:bridge_ip,mac:eth0_mac)
This patch fixes it by checking not only if the device is a bridge but
also if it is an openvswitch.
Signed-off-by: Mateusz Kowalski <mko@redhat.com>
---
drivers/net/bonding/bond_alb.c | 2 +-
include/linux/netdevice.h | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index b9dbad3a8af8..cc5049eb25f8 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -668,7 +668,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
dev = ip_dev_find(dev_net(bond->dev), arp->ip_src);
if (dev) {
- if (netif_is_bridge_master(dev)) {
+ if (netif_is_any_bridge_master(dev)) {
dev_put(dev);
return NULL;
}
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 84c36a7f873f..27593c0d3c15 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -5103,6 +5103,11 @@ static inline bool netif_is_ovs_port(const struct net_device *dev)
return dev->priv_flags & IFF_OVS_DATAPATH;
}
+static inline bool netif_is_any_bridge_master(const struct net_device *dev)
+{
+ return netif_is_bridge_master(dev) || netif_is_ovs_master(dev);
+}
+
static inline bool netif_is_any_bridge_port(const struct net_device *dev)
{
return netif_is_bridge_port(dev) || netif_is_ovs_port(dev);
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next,v4] bonding: support balance-alb with openvswitch
2023-07-29 17:31 [PATCH net-next,v4] bonding: support balance-alb with openvswitch Mat Kowalski
@ 2023-07-30 22:51 ` Jay Vosburgh
2023-07-31 7:05 ` Mat Kowalski
2023-07-31 20:21 ` Mat Kowalski
0 siblings, 2 replies; 5+ messages in thread
From: Jay Vosburgh @ 2023-07-30 22:51 UTC (permalink / raw)
To: Mat Kowalski
Cc: netdev@vger.kernel.org, Andy Gospodarek, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Mat Kowalski <mko@redhat.com> wrote:
>Commit d5410ac7b0ba ("net:bonding:support balance-alb interface with
>vlan to bridge") introduced a support for balance-alb mode for
>interfaces connected to the linux bridge by fixing missing matching of
>MAC entry in FDB. In our testing we discovered that it still does not
>work when the bond is connected to the OVS bridge as show in diagram
>below:
>
>eth1(mac:eth1_mac)--bond0(balance-alb,mac:eth0_mac)--eth0(mac:eth0_mac)
> |
> bond0.150(mac:eth0_mac)
> |
> ovs_bridge(ip:bridge_ip,mac:eth0_mac)
>
>This patch fixes it by checking not only if the device is a bridge but
>also if it is an openvswitch.
What changed between v3 and v4?
-J
>Signed-off-by: Mateusz Kowalski <mko@redhat.com>
>---
> drivers/net/bonding/bond_alb.c | 2 +-
> include/linux/netdevice.h | 5 +++++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
>index b9dbad3a8af8..cc5049eb25f8 100644
>--- a/drivers/net/bonding/bond_alb.c
>+++ b/drivers/net/bonding/bond_alb.c
>@@ -668,7 +668,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
>
> dev = ip_dev_find(dev_net(bond->dev), arp->ip_src);
> if (dev) {
>- if (netif_is_bridge_master(dev)) {
>+ if (netif_is_any_bridge_master(dev)) {
> dev_put(dev);
> return NULL;
> }
>diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>index 84c36a7f873f..27593c0d3c15 100644
>--- a/include/linux/netdevice.h
>+++ b/include/linux/netdevice.h
>@@ -5103,6 +5103,11 @@ static inline bool netif_is_ovs_port(const struct net_device *dev)
> return dev->priv_flags & IFF_OVS_DATAPATH;
> }
>
>+static inline bool netif_is_any_bridge_master(const struct net_device *dev)
>+{
>+ return netif_is_bridge_master(dev) || netif_is_ovs_master(dev);
>+}
>+
> static inline bool netif_is_any_bridge_port(const struct net_device *dev)
> {
> return netif_is_bridge_port(dev) || netif_is_ovs_port(dev);
>--
>2.41.0
---
-Jay Vosburgh, jay.vosburgh@canonical.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next,v4] bonding: support balance-alb with openvswitch
2023-07-30 22:51 ` Jay Vosburgh
@ 2023-07-31 7:05 ` Mat Kowalski
2023-07-31 20:21 ` Mat Kowalski
1 sibling, 0 replies; 5+ messages in thread
From: Mat Kowalski @ 2023-07-31 7:05 UTC (permalink / raw)
To: Jay Vosburgh
Cc: netdev@vger.kernel.org, Andy Gospodarek, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
On 31/07/2023 00:51, Jay Vosburgh wrote:
> Mat Kowalski <mko@redhat.com> wrote:
>
>> Commit d5410ac7b0ba ("net:bonding:support balance-alb interface with
>> vlan to bridge") introduced a support for balance-alb mode for
>> interfaces connected to the linux bridge by fixing missing matching of
>> MAC entry in FDB. In our testing we discovered that it still does not
>> work when the bond is connected to the OVS bridge as show in diagram
>> below:
>>
>> eth1(mac:eth1_mac)--bond0(balance-alb,mac:eth0_mac)--eth0(mac:eth0_mac)
>> |
>> bond0.150(mac:eth0_mac)
>> |
>> ovs_bridge(ip:bridge_ip,mac:eth0_mac)
>>
>> This patch fixes it by checking not only if the device is a bridge but
>> also if it is an openvswitch.
>
> What changed between v3 and v4?
>
> -J
All the changes were only about whitespaces and formatting of the diff itself. The code itself is the same in v1-v4
>
>> Signed-off-by: Mateusz Kowalski <mko@redhat.com>
>> ---
>> drivers/net/bonding/bond_alb.c | 2 +-
>> include/linux/netdevice.h | 5 +++++
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
>> index b9dbad3a8af8..cc5049eb25f8 100644
>> --- a/drivers/net/bonding/bond_alb.c
>> +++ b/drivers/net/bonding/bond_alb.c
>> @@ -668,7 +668,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
>>
>> dev = ip_dev_find(dev_net(bond->dev), arp->ip_src);
>> if (dev) {
>> - if (netif_is_bridge_master(dev)) {
>> + if (netif_is_any_bridge_master(dev)) {
>> dev_put(dev);
>> return NULL;
>> }
>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>> index 84c36a7f873f..27593c0d3c15 100644
>> --- a/include/linux/netdevice.h
>> +++ b/include/linux/netdevice.h
>> @@ -5103,6 +5103,11 @@ static inline bool netif_is_ovs_port(const struct net_device *dev)
>> return dev->priv_flags & IFF_OVS_DATAPATH;
>> }
>>
>> +static inline bool netif_is_any_bridge_master(const struct net_device *dev)
>> +{
>> + return netif_is_bridge_master(dev) || netif_is_ovs_master(dev);
>> +}
>> +
>> static inline bool netif_is_any_bridge_port(const struct net_device *dev)
>> {
>> return netif_is_bridge_port(dev) || netif_is_ovs_port(dev);
>> --
>> 2.41.0
>
> ---
> -Jay Vosburgh, jay.vosburgh@canonical.com
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next,v4] bonding: support balance-alb with openvswitch
2023-07-30 22:51 ` Jay Vosburgh
2023-07-31 7:05 ` Mat Kowalski
@ 2023-07-31 20:21 ` Mat Kowalski
2023-08-01 9:56 ` Paolo Abeni
1 sibling, 1 reply; 5+ messages in thread
From: Mat Kowalski @ 2023-07-31 20:21 UTC (permalink / raw)
To: netdev@vger.kernel.org
Cc: Andy Gospodarek, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Jay Vosburgh
On 31/07/2023 00:51, Jay Vosburgh wrote:
> Mat Kowalski <mko@redhat.com> wrote:
>
>> Commit d5410ac7b0ba ("net:bonding:support balance-alb interface with
>> vlan to bridge") introduced a support for balance-alb mode for
>> interfaces connected to the linux bridge by fixing missing matching of
>> MAC entry in FDB. In our testing we discovered that it still does not
>> work when the bond is connected to the OVS bridge as show in diagram
>> below:
>>
>> eth1(mac:eth1_mac)--bond0(balance-alb,mac:eth0_mac)--eth0(mac:eth0_mac)
>> |
>> bond0.150(mac:eth0_mac)
>> |
>> ovs_bridge(ip:bridge_ip,mac:eth0_mac)
>>
>> This patch fixes it by checking not only if the device is a bridge but
>> also if it is an openvswitch.
>
> What changed between v3 and v4?
>
> -J
v4 changes:
- Fix additional space at the beginning of the line
v3 changes:
- Fix tab chars converted to spaces
v2 changes:
- Fix line wrapping
>
>> Signed-off-by: Mateusz Kowalski <mko@redhat.com>
>> ---
>> drivers/net/bonding/bond_alb.c | 2 +-
>> include/linux/netdevice.h | 5 +++++
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
>> index b9dbad3a8af8..cc5049eb25f8 100644
>> --- a/drivers/net/bonding/bond_alb.c
>> +++ b/drivers/net/bonding/bond_alb.c
>> @@ -668,7 +668,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
>>
>> dev = ip_dev_find(dev_net(bond->dev), arp->ip_src);
>> if (dev) {
>> - if (netif_is_bridge_master(dev)) {
>> + if (netif_is_any_bridge_master(dev)) {
>> dev_put(dev);
>> return NULL;
>> }
>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>> index 84c36a7f873f..27593c0d3c15 100644
>> --- a/include/linux/netdevice.h
>> +++ b/include/linux/netdevice.h
>> @@ -5103,6 +5103,11 @@ static inline bool netif_is_ovs_port(const struct net_device *dev)
>> return dev->priv_flags & IFF_OVS_DATAPATH;
>> }
>>
>> +static inline bool netif_is_any_bridge_master(const struct net_device *dev)
>> +{
>> + return netif_is_bridge_master(dev) || netif_is_ovs_master(dev);
>> +}
>> +
>> static inline bool netif_is_any_bridge_port(const struct net_device *dev)
>> {
>> return netif_is_bridge_port(dev) || netif_is_ovs_port(dev);
>> --
>> 2.41.0
>
> ---
> -Jay Vosburgh, jay.vosburgh@canonical.com
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next,v4] bonding: support balance-alb with openvswitch
2023-07-31 20:21 ` Mat Kowalski
@ 2023-08-01 9:56 ` Paolo Abeni
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Abeni @ 2023-08-01 9:56 UTC (permalink / raw)
To: Mat Kowalski, netdev@vger.kernel.org
Cc: Andy Gospodarek, David S. Miller, Eric Dumazet, Jakub Kicinski,
Jay Vosburgh
On Mon, 2023-07-31 at 22:21 +0200, Mat Kowalski wrote:
>
> On 31/07/2023 00:51, Jay Vosburgh wrote:
> > Mat Kowalski <mko@redhat.com> wrote:
> >
> > > Commit d5410ac7b0ba ("net:bonding:support balance-alb interface with
> > > vlan to bridge") introduced a support for balance-alb mode for
> > > interfaces connected to the linux bridge by fixing missing matching of
> > > MAC entry in FDB. In our testing we discovered that it still does not
> > > work when the bond is connected to the OVS bridge as show in diagram
> > > below:
> > >
> > > eth1(mac:eth1_mac)--bond0(balance-alb,mac:eth0_mac)--eth0(mac:eth0_mac)
> > > |
> > > bond0.150(mac:eth0_mac)
> > > |
> > > ovs_bridge(ip:bridge_ip,mac:eth0_mac)
> > >
> > > This patch fixes it by checking not only if the device is a bridge but
> > > also if it is an openvswitch.
> >
> > What changed between v3 and v4?
> >
> > -J
>
> v4 changes:
> - Fix additional space at the beginning of the line
>
> v3 changes:
> - Fix tab chars converted to spaces
>
> v2 changes:
> - Fix line wrapping
Note that you should wait at least 24h before submitting a new version:
https://elixir.bootlin.com/linux/v6.5-rc4/source/Documentation/process/maintainer-netdev.rst#L350
3 new revisions in a raw is really not a good thing.
The used email address and the SoB mismatch. You should fix that either
changing the SoB or adding a suitable From: tag.
Please include the changelog in the next revision, after the SoB tag
and a '---' separator.
Cheers,
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-01 9:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-29 17:31 [PATCH net-next,v4] bonding: support balance-alb with openvswitch Mat Kowalski
2023-07-30 22:51 ` Jay Vosburgh
2023-07-31 7:05 ` Mat Kowalski
2023-07-31 20:21 ` Mat Kowalski
2023-08-01 9:56 ` Paolo Abeni
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).