* [bpf-next PATCH] net: br_vlan build error
@ 2018-03-27 15:38 John Fastabend
2018-03-27 15:49 ` Nikolay Aleksandrov
2018-03-27 15:57 ` John Fastabend
0 siblings, 2 replies; 4+ messages in thread
From: John Fastabend @ 2018-03-27 15:38 UTC (permalink / raw)
To: stephen, 3chas3; +Cc: netdev, davem
Fix build error in br_if.c
net/bridge/br_if.c: In function ‘br_mtu’:
net/bridge/br_if.c:458:8: error: ‘const struct net_bridge’ has no member named ‘vlan_enabled’
if (br->vlan_enabled)
^
net/bridge/br_if.c:462:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Fixes: 419d14af9e07f ("bridge: Allow max MTU when multiple VLANs present")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
---
net/bridge/br_if.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 48dc4d2..2262424 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -424,16 +424,6 @@ int br_del_bridge(struct net *net, const char *name)
return ret;
}
-static bool min_mtu(int a, int b)
-{
- return a < b ? 1 : 0;
-}
-
-static bool max_mtu(int a, int b)
-{
- return a > b ? 1 : 0;
-}
-
/* MTU of the bridge pseudo-device: ETH_DATA_LEN or the minimum of the ports */
static int __br_mtu(const struct net_bridge *br, bool (compare_fn)(int, int))
{
@@ -453,6 +443,17 @@ static int __br_mtu(const struct net_bridge *br, bool (compare_fn)(int, int))
return mtu;
}
+static bool min_mtu(int a, int b)
+{
+ return a < b ? 1 : 0;
+}
+
+#ifdef CONFIG_BRIDGE_VLAN_FILTERING
+static bool max_mtu(int a, int b)
+{
+ return a > b ? 1 : 0;
+}
+
int br_mtu(const struct net_bridge *br)
{
if (br->vlan_enabled)
@@ -460,6 +461,12 @@ int br_mtu(const struct net_bridge *br)
else
return __br_mtu(br, min_mtu);
}
+#else
+int br_mtu(const struct net_bridge *br)
+{
+ return __br_mtu(br, min_mtu);
+}
+#endif
static void br_set_gso_limits(struct net_bridge *br)
{
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [bpf-next PATCH] net: br_vlan build error
2018-03-27 15:38 [bpf-next PATCH] net: br_vlan build error John Fastabend
@ 2018-03-27 15:49 ` Nikolay Aleksandrov
2018-03-27 15:58 ` John Fastabend
2018-03-27 15:57 ` John Fastabend
1 sibling, 1 reply; 4+ messages in thread
From: Nikolay Aleksandrov @ 2018-03-27 15:49 UTC (permalink / raw)
To: John Fastabend, stephen, 3chas3; +Cc: netdev, davem
On 27/03/18 18:38, John Fastabend wrote:
> Fix build error in br_if.c
>
> net/bridge/br_if.c: In function ‘br_mtu’:
> net/bridge/br_if.c:458:8: error: ‘const struct net_bridge’ has no member named ‘vlan_enabled’
> if (br->vlan_enabled)
> ^
> net/bridge/br_if.c:462:1: warning: control reaches end of non-void function [-Wreturn-type]
> }
> ^
> Fixes: 419d14af9e07f ("bridge: Allow max MTU when multiple VLANs present")
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>
> ---
> net/bridge/br_if.c | 27 +++++++++++++++++----------
> 1 file changed, 17 insertions(+), 10 deletions(-)
>
I'm not sure what the rules about merging are, but just in case I
already fixed this in net-next couple of days ago.
commit 82792a070b16
Author: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Date: Fri Mar 23 18:27:06 2018 +0200
net: bridge: fix direct access to bridge vlan_enabled and use helper
https://patchwork.ozlabs.org/patch/890043/
Cheers,
Nik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bpf-next PATCH] net: br_vlan build error
2018-03-27 15:38 [bpf-next PATCH] net: br_vlan build error John Fastabend
2018-03-27 15:49 ` Nikolay Aleksandrov
@ 2018-03-27 15:57 ` John Fastabend
1 sibling, 0 replies; 4+ messages in thread
From: John Fastabend @ 2018-03-27 15:57 UTC (permalink / raw)
To: stephen, 3chas3; +Cc: netdev, davem
On 03/27/2018 08:38 AM, John Fastabend wrote:
> Fix build error in br_if.c
>
> net/bridge/br_if.c: In function ‘br_mtu’:
> net/bridge/br_if.c:458:8: error: ‘const struct net_bridge’ has no member named ‘vlan_enabled’
> if (br->vlan_enabled)
> ^
> net/bridge/br_if.c:462:1: warning: control reaches end of non-void function [-Wreturn-type]
> }
> ^
> Fixes: 419d14af9e07f ("bridge: Allow max MTU when multiple VLANs present")
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>
> ---
This is against net-next sorry for any confusion. Let me know
if you need me to respin.
@Chas, also I only build tested this to get my kernels building
again. You should probably verify I implemented what you expect
in the case without vlan filtering. It seems correct to me but
I'm not the expert here.
Thanks,
John
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bpf-next PATCH] net: br_vlan build error
2018-03-27 15:49 ` Nikolay Aleksandrov
@ 2018-03-27 15:58 ` John Fastabend
0 siblings, 0 replies; 4+ messages in thread
From: John Fastabend @ 2018-03-27 15:58 UTC (permalink / raw)
To: Nikolay Aleksandrov, stephen, 3chas3; +Cc: netdev, davem
On 03/27/2018 08:49 AM, Nikolay Aleksandrov wrote:
> On 27/03/18 18:38, John Fastabend wrote:
>> Fix build error in br_if.c
>>
>> net/bridge/br_if.c: In function ‘br_mtu’:
>> net/bridge/br_if.c:458:8: error: ‘const struct net_bridge’ has no member named ‘vlan_enabled’
>> if (br->vlan_enabled)
>> ^
>> net/bridge/br_if.c:462:1: warning: control reaches end of non-void function [-Wreturn-type]
>> }
>> ^
>> Fixes: 419d14af9e07f ("bridge: Allow max MTU when multiple VLANs present")
>> Signed-off-by: John Fastabend <john.fastabend@gmail.com>
>> ---
>> net/bridge/br_if.c | 27 +++++++++++++++++----------
>> 1 file changed, 17 insertions(+), 10 deletions(-)
>>
>
> I'm not sure what the rules about merging are, but just in case I
> already fixed this in net-next couple of days ago.
>
> commit 82792a070b16
> Author: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> Date: Fri Mar 23 18:27:06 2018 +0200
>
> net: bridge: fix direct access to bridge vlan_enabled and use helper
>
> https://patchwork.ozlabs.org/patch/890043/
>
>
> Cheers,
> Nik
>
Ah dang sorry about the noise then drop my patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-27 15:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-27 15:38 [bpf-next PATCH] net: br_vlan build error John Fastabend
2018-03-27 15:49 ` Nikolay Aleksandrov
2018-03-27 15:58 ` John Fastabend
2018-03-27 15:57 ` John Fastabend
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).