Message ID | 20180327153859.28865.74511.stgit@john-Precision-Tower-5810 |
---|---|
State | Not Applicable, archived |
Delegated to: | BPF Maintainers |
Headers | show |
Series | [bpf-next] net: br_vlan build error | expand |
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
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
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.
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) {
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(-)