* bridge netpoll support: mismatch between net core and bridge headers
@ 2010-11-13 23:26 Mike Frysinger
2010-12-01 19:42 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2010-11-13 23:26 UTC (permalink / raw)
To: Herbert Xu; +Cc: netdev
commit 91d2c34a4eed32876ca333b0ca44f3bc56645805 added this bit of code
to net/bridge/br_private.h:
struct net_bridge_port {
....
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ struct netpoll *np;
+#endif
};
....
#ifdef CONFIG_NET_POLL_CONTROLLER
+static inline struct netpoll_info *br_netpoll_info(struct net_bridge *br)
+{
+ return br->dev->npinfo;
+}
....
unfortunately, this is not the define protection that is used in the
core net code (include/linux/netdevice.h):
#ifdef CONFIG_NETPOLL
struct netpoll_info *npinfo;
#endif
so in my randconfig builds, i'm now seeing frequent failures along the lines of:
In file included from net/bridge/br.c:24:
net/bridge/br_private.h: In function ‘br_netpoll_info’:
net/bridge/br_private.h:293: error: ‘struct net_device’ has no member
named ‘npinfo’
make[2]: *** [net/bridge/br.o] Error 1
In file included from net/bridge/br_device.c:24:
net/bridge/br_private.h: In function ‘br_netpoll_info’:
net/bridge/br_private.h:293: error: ‘struct net_device’ has no member
named ‘npinfo’
In file included from net/bridge/br_fdb.c:27:
net/bridge/br_private.h: In function ‘br_netpoll_info’:
net/bridge/br_private.h:293: error: ‘struct net_device’ has no member
named ‘npinfo’
make[2]: *** [net/bridge/br_fdb.o] Error 1
make[2]: *** [net/bridge/br_device.o] Error 1
In file included from net/bridge/br_forward.c:23:
net/bridge/br_private.h: In function ‘br_netpoll_info’:
net/bridge/br_private.h:293: error: ‘struct net_device’ has no member
named ‘npinfo’
make[2]: *** [net/bridge/br_forward.o] Error 1
seems to be a regression introduced during the 2.6.36 cycle
-mike
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bridge netpoll support: mismatch between net core and bridge headers
2010-11-13 23:26 bridge netpoll support: mismatch between net core and bridge headers Mike Frysinger
@ 2010-12-01 19:42 ` David Miller
2010-12-01 21:53 ` Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2010-12-01 19:42 UTC (permalink / raw)
To: vapier.adi; +Cc: herbert, netdev
From: Mike Frysinger <vapier.adi@gmail.com>
Date: Sat, 13 Nov 2010 18:26:27 -0500
> so in my randconfig builds, i'm now seeing frequent failures along the lines of:
Mike, I cooked up a patch to "fix" this but I can't reproduce it
in the current tree.
No matter what I do, I can't get CONFIG_NETPOLL and
CONFIG_NET_POLL_CONTROLLER to have different values.
If I try to force it in my ".config" the subsequent "make oldconfig"
forces them to be equal.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bridge netpoll support: mismatch between net core and bridge headers
2010-12-01 19:42 ` David Miller
@ 2010-12-01 21:53 ` Mike Frysinger
2010-12-02 0:33 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2010-12-01 21:53 UTC (permalink / raw)
To: David Miller; +Cc: herbert, netdev
On Wed, Dec 1, 2010 at 14:42, David Miller wrote:
> Mike Frysinger:
>> so in my randconfig builds, i'm now seeing frequent failures along the lines of:
>
> Mike, I cooked up a patch to "fix" this but I can't reproduce it
> in the current tree.
>
> No matter what I do, I can't get CONFIG_NETPOLL and
> CONFIG_NET_POLL_CONTROLLER to have different values.
>
> If I try to force it in my ".config" the subsequent "make oldconfig"
> forces them to be equal.
can you post a patch i can try in my randconfig tree ?
-mike
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bridge netpoll support: mismatch between net core and bridge headers
2010-12-01 21:53 ` Mike Frysinger
@ 2010-12-02 0:33 ` David Miller
2010-12-02 8:29 ` Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2010-12-02 0:33 UTC (permalink / raw)
To: vapier.adi; +Cc: herbert, netdev
From: Mike Frysinger <vapier.adi@gmail.com>
Date: Wed, 1 Dec 2010 16:53:31 -0500
> can you post a patch i can try in my randconfig tree ?
Attached. Also please provide one of the failing ".config" files,
and please test if simply going "make oldconfig" unbreaks things.
It may be that randconfig allows configurations that the config
system normally does not allow.
>From 2212481a102ab53f485ddf76cb1be21e4ace5b7e Mon Sep 17 00:00:00 2001
From: David S. Miller <davem@davemloft.net>
Date: Wed, 1 Dec 2010 11:28:48 -0800
Subject: [PATCH] bridge: Fix randconfig builds.
Currently it is possible to turn on NET_POLL_CONTROLLER
without NETPOLL.
The bridging netpoll support code doesn't make any real
sense unless both options are enabled because the netdev's
->npinfo has to be present for the code to operate properly.
So for now just require that both config options are enabled.
Longer term it's probably a good idea to just get rid of
NET_POLL_CONTROLLER and have everything hinge upon just the
NETPOLL option.
Reported-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/bridge/br_device.c | 4 ++--
net/bridge/br_private.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 17cb0b6..96ecb02 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -217,7 +217,7 @@ static int br_set_flags(struct net_device *netdev, u32 data)
return ethtool_op_set_flags(netdev, data, ETH_FLAG_TXVLAN);
}
-#ifdef CONFIG_NET_POLL_CONTROLLER
+#if defined(CONFIG_NETPOLL) && defined(CONFIG_NET_POLL_CONTROLLER)
static void br_poll_controller(struct net_device *br_dev)
{
}
@@ -321,7 +321,7 @@ static const struct net_device_ops br_netdev_ops = {
.ndo_set_multicast_list = br_dev_set_multicast_list,
.ndo_change_mtu = br_change_mtu,
.ndo_do_ioctl = br_dev_ioctl,
-#ifdef CONFIG_NET_POLL_CONTROLLER
+#if defined(CONFIG_NETPOLL) && defined(CONFIG_NET_POLL_CONTROLLER)
.ndo_netpoll_setup = br_netpoll_setup,
.ndo_netpoll_cleanup = br_netpoll_cleanup,
.ndo_poll_controller = br_poll_controller,
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 75c90ed..ad1bec6 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -146,7 +146,7 @@ struct net_bridge_port
char sysfs_name[IFNAMSIZ];
#endif
-#ifdef CONFIG_NET_POLL_CONTROLLER
+#if defined(CONFIG_NETPOLL) && defined(CONFIG_NET_POLL_CONTROLLER)
struct netpoll *np;
#endif
};
@@ -287,7 +287,7 @@ static inline int br_is_root_bridge(const struct net_bridge *br)
extern void br_dev_setup(struct net_device *dev);
extern netdev_tx_t br_dev_xmit(struct sk_buff *skb,
struct net_device *dev);
-#ifdef CONFIG_NET_POLL_CONTROLLER
+#if defined(CONFIG_NETPOLL) && defined(CONFIG_NET_POLL_CONTROLLER)
static inline struct netpoll_info *br_netpoll_info(struct net_bridge *br)
{
return br->dev->npinfo;
--
1.7.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: bridge netpoll support: mismatch between net core and bridge headers
2010-12-02 0:33 ` David Miller
@ 2010-12-02 8:29 ` Mike Frysinger
2010-12-02 17:51 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2010-12-02 8:29 UTC (permalink / raw)
To: David Miller; +Cc: herbert, netdev
On Wed, Dec 1, 2010 at 19:33, David Miller wrote:
> Attached. Also please provide one of the failing ".config" files,
> and please test if simply going "make oldconfig" unbreaks things.
> It may be that randconfig allows configurations that the config
> system normally does not allow.
hrm, so your patch does fix things. the downside is that it might be
caused by kgdboe (which isnt in mainline yet). that's the only
randconfig i can find so far to cause the issue.
-mike
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bridge netpoll support: mismatch between net core and bridge headers
2010-12-02 8:29 ` Mike Frysinger
@ 2010-12-02 17:51 ` David Miller
2010-12-02 21:57 ` Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2010-12-02 17:51 UTC (permalink / raw)
To: vapier.adi; +Cc: herbert, netdev
From: Mike Frysinger <vapier.adi@gmail.com>
Date: Thu, 2 Dec 2010 03:29:17 -0500
> On Wed, Dec 1, 2010 at 19:33, David Miller wrote:
>> Attached. Also please provide one of the failing ".config" files,
>> and please test if simply going "make oldconfig" unbreaks things.
>> It may be that randconfig allows configurations that the config
>> system normally does not allow.
>
> hrm, so your patch does fix things. the downside is that it might be
> caused by kgdboe (which isnt in mainline yet). that's the only
> randconfig i can find so far to cause the issue.
If that's the case you just need to check and make sure that kgdboe
handles dependencies properly in it's Kconfig changes.
I suspect that simply adding kgdboe as a new "or" case to the
"def_bool" statement of NETPOLL in driver/net/Kconfig will fix the
problem.
If kgdboe is using "select" to handle these dependencies, that's the
bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bridge netpoll support: mismatch between net core and bridge headers
2010-12-02 17:51 ` David Miller
@ 2010-12-02 21:57 ` Mike Frysinger
0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2010-12-02 21:57 UTC (permalink / raw)
To: David Miller; +Cc: herbert, netdev
On Thu, Dec 2, 2010 at 12:51, David Miller wrote:
> From: Mike Frysinger <vapier.adi@gmail.com>
>> On Wed, Dec 1, 2010 at 19:33, David Miller wrote:
>>> Attached. Also please provide one of the failing ".config" files,
>>> and please test if simply going "make oldconfig" unbreaks things.
>>> It may be that randconfig allows configurations that the config
>>> system normally does not allow.
>>
>> hrm, so your patch does fix things. the downside is that it might be
>> caused by kgdboe (which isnt in mainline yet). that's the only
>> randconfig i can find so far to cause the issue.
>
> If that's the case you just need to check and make sure that kgdboe
> handles dependencies properly in it's Kconfig changes.
>
> I suspect that simply adding kgdboe as a new "or" case to the
> "def_bool" statement of NETPOLL in driver/net/Kconfig will fix the
> problem.
>
> If kgdboe is using "select" to handle these dependencies, that's the
> bug.
it is using select to enable reverse depends. i'll look at sending a
fix as you suggest to the kgdb devs. thanks !
-mike
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-12-02 21:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-13 23:26 bridge netpoll support: mismatch between net core and bridge headers Mike Frysinger
2010-12-01 19:42 ` David Miller
2010-12-01 21:53 ` Mike Frysinger
2010-12-02 0:33 ` David Miller
2010-12-02 8:29 ` Mike Frysinger
2010-12-02 17:51 ` David Miller
2010-12-02 21:57 ` Mike Frysinger
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).