Message ID | 1276727961-18719-1-git-send-email-sven.eckelmann@gmx.de (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <sven.eckelmann@gmx.de> Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by open-mesh.net (Postfix) with SMTP id A32D81542A7 for <b.a.t.m.a.n@lists.open-mesh.net>; Thu, 17 Jun 2010 00:39:25 +0200 (CEST) Received: (qmail invoked by alias); 16 Jun 2010 22:39:24 -0000 Received: from i59F6BE66.versanet.de (EHLO sven-desktop.lazhur.ath.cx) [89.246.190.102] by mail.gmx.net (mp049) with SMTP; 17 Jun 2010 00:39:24 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1/Co7JpKyDCYzOfUmSws/M4zF3dP7g5droOPGglHm LhiBkCwkrhIrok From: Sven Eckelmann <sven.eckelmann@gmx.de> To: b.a.t.m.a.n@lists.open-mesh.net Date: Thu, 17 Jun 2010 00:39:21 +0200 Message-Id: <1276727961-18719-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: use rx_handler_data pointer to store net_bridge_port pointer X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> X-List-Received-Date: Wed, 16 Jun 2010 22:39:25 -0000 |
Commit Message
Sven Eckelmann
June 16, 2010, 10:39 p.m. UTC
From: Jiri Pirko <jpirko@redhat.com> Register net_bridge_port pointer as rx_handler data pointer. As br_port is removed from struct net_device, another netdev priv_flag is added to indicate the device serves as a bridge port. Also rcuized pointers are now correctly dereferenced in br_fdb.c and in netfilter parts. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> --- batman-adv-kernelland/hard-interface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Comments
Sven Eckelmann wrote: > From: Jiri Pirko <jpirko@redhat.com> > > Register net_bridge_port pointer as rx_handler data pointer. As br_port is > removed from struct net_device, another netdev priv_flag is added to > indicate the device serves as a bridge port. Also rcuized pointers are now > correctly dereferenced in br_fdb.c and in netfilter parts. > > Signed-off-by: Jiri Pirko <jpirko@redhat.com> > Signed-off-by: David S. Miller <davem@davemloft.net> > Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> > --- This patch was already merged by David S. Miller <davem@davemloft.net> on Tue Jun 15 20:48:58 CEST 2010 (probably for 2.6.36). I have merged it into maint (not into trunk), but somebody has to think about a way to to get it working on older kernels. This patch has to made on top of that patch to get it integrated into the next kernel merge window. Best regards, Sven
On Thursday 17 June 2010 00:42:11 Sven Eckelmann wrote: > I have merged it into maint (not into trunk), but somebody has to think > about a way to to get it working on older kernels. This patch has to made > on top of that patch to get it integrated into the next kernel merge > window. The code in question has not been enabled yet. It is just there as a possibility and could be enabled if it makes sense. I would say the one activating this code has to deal with the backward compatibility when it happens, ok ? :-) Cheers, Marek
Andrew Lunn wrote: > > --- a/batman-adv-kernelland/hard-interface.h > > +++ b/batman-adv-kernelland/hard-interface.h > > @@ -38,3 +38,8 @@ int batman_skb_recv(struct sk_buff *skb, > > > > struct net_device *orig_dev); > > > > int hardif_min_mtu(void); > > void update_min_mtu(void); > > > > + > > +#ifndef netdev_isbridged > > +#define netdev_isbridged(netdev) \ > > + ((net_dev)->priv_flags & IFF_BRIDGE_PORT) > > +#endif > > Maybe this could be pushed upstream? Seems like a useful bit of code > in general? I don't think so. It is only used in ~7 places in the whole kernel. If you want then please feel free to add something like this and submit it to David S. Miller. Best regards, Sven
On Thursday 17 June 2010 01:10:17 Sven Eckelmann wrote: > I have merged it into maint (not in trunk) but somebody has to think about > a way to get it working on olders kernel _when he wants to enable it the > future_. This patch has to made on top of that patch to get it integrated > in _one of the next kernel merge windows_. Ok, I think we are on the same page then. :-) I applied the patch (revision 1699). Thanks, Marek
diff --git a/batman-adv-kernelland/hard-interface.c b/batman-adv-kernelland/hard-interface.c index 70fd314..0773420 100644 --- a/batman-adv-kernelland/hard-interface.c +++ b/batman-adv-kernelland/hard-interface.c @@ -74,7 +74,7 @@ static int is_valid_iface(struct net_device *net_dev) #endif /* Device is being bridged */ - /* if (net_dev->br_port != NULL) + /* if (net_dev->priv_flags & IFF_BRIDGE_PORT) return 0; */ return 1;