* Re: [patch net-next-2.6 6/8] bonding: move processing of recv handlers into handle_frame()
From: Nicolas de Pesloüan @ 2011-03-06 17:37 UTC (permalink / raw)
To: Michał Mirosław
Cc: Jiri Pirko, netdev, davem, shemminger, kaber, fubar, eric.dumazet,
andy
In-Reply-To: <AANLkTi=Gt_ArqOVPJjnrAExO8Fihu8WzUhYSb_O6URQ_@mail.gmail.com>
Le 06/03/2011 17:32, Michał Mirosław a écrit :
[snip]
> Is there a particular reason why this ARP monitoring can't be done in
> userspace (e.g. on AF_PACKET with suitable filter)? Marking slaves
> up/down as their link goes in that direction is easy, but as more and
> more link-state detecting methods/algorithms get added this is
> becoming more of a mess.
Moving as much as possible of bonding into userspace is a long standing target.
I think we currently lack a good way to notify the bonding driver that a given slave is available or
not. Bringing the slave down on link failure is not appropriate, because it would prevent userspace
from receiving the ARP packets that would bring the slave up again upon link return.
The only thing we can do is writing into /sys/class/net/bond0/bonding/active_slave, to force the
active_slave. And this is strictly limited to active-backup mode.
I will let Jay / Andy comment on the general problem.
Nicolas.
^ permalink raw reply
* Re: [PATCH 1/2] Issue NETDEV_CHANGE notification when bridge changes state
From: Stephen Hemminger @ 2011-03-06 17:45 UTC (permalink / raw)
To: Adam Majer
Cc: Stephen Hemminger, David S. Miller, Alexey Kuznetsov,
Pekka Savola (ipv6), James Morris, Hideaki YOSHIFUJI,
Patrick McHardy, bridge, netdev
In-Reply-To: <20110306080328.GA3850@mira.lan.galacticasoftware.com>
On Sun, 6 Mar 2011 02:03:28 -0600
Adam Majer <adamm@zombino.com> wrote:
> On Sat, Mar 05, 2011 at 10:43:03PM -0800, Stephen Hemminger wrote:
> > Why not set forwarding delay to zero? I don't think you are using STP?
> >
> > P.s: removing linux-kernel mailing list, since there is no point
> > in copying the whole world on this thread.
>
> I just sent patches where MAINTAINERS file told me to send it. ;)
>
> No, I'm not relying on STP. I think setting learning->forwarding delay
> to 0 could cause problems with STP like loops until the loop is
> detected.
>
> There may be a better spot where to insert the notification that the
> bridge is forwarding data, though I'm not exactly certain where. The
> patch will cause bridge to issue NETDEV_CHANGE notification for all
> topology changes. This may or may not be useful but shouldn't be
> harmful (I can't imagine these occur very often?) The IPv6 autoconf
> patch will only act on this if it doesn't have IPv6 address configured
> manually or via autoconf.
>
Since this a generic problem, it needs a better solution.
Sending NETDEV_CHANGE impacts lots of other pieces, and even
user space has similar problems.
--
^ permalink raw reply
* Re: [PATCH 1/2] Issue NETDEV_CHANGE notification when bridge changes state
From: Jan Ceuleers @ 2011-03-06 18:01 UTC (permalink / raw)
To: Adam Majer
Cc: Stephen Hemminger, David S. Miller, Alexey Kuznetsov,
Pekka Savola (ipv6), James Morris, Hideaki YOSHIFUJI,
Patrick McHardy, bridge, netdev
In-Reply-To: <20110306080328.GA3850@mira.lan.galacticasoftware.com>
On 06/03/11 09:03, Adam Majer wrote:
> On Sat, Mar 05, 2011 at 10:43:03PM -0800, Stephen Hemminger wrote:
>> Why not set forwarding delay to zero? I don't think you are using STP?
>
> No, I'm not relying on STP. I think setting learning->forwarding delay
> to 0 could cause problems with STP like loops until the loop is
> detected.
I don't think that Stephen is saying that you should hard-code the
forwarding delay as zero (i.e. to remove the delay from the kernel
completely), but rather use brctl to set the forwarding delay to zero on
bridge instances in which you're not using STP.
HTH, Jan
^ permalink raw reply
* Re: [Patch] ariadne: fix possible null dereference
From: Randy Dunlap @ 2011-03-06 19:11 UTC (permalink / raw)
To: j223yang; +Cc: netdev, linux-kernel
In-Reply-To: <20110306070832.GA26188@asset.uwaterloo.ca>
On Sun, 6 Mar 2011 02:08:32 -0500 j223yang@asset.uwaterloo.ca wrote:
> Hi Randy,
> I have tested my patch, and it is ok now.
> Could you please try patching again? Sorry for previous trouble.
> Thank you!
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Thanks.
> Jinqiu
> ------------------------------------------------------
> This patch fixes bugzilla #13853:
> https://bugzilla.kernel.org/show_bug.cgi?id=13853
>
> The patch removes dereference of 'dev' after testing for NULL.
>
> Signed-off-by: Jinqiu Yang<crindy646@gmail.com>
> ---
> ariadne.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c
> --- a/drivers/net/ariadne.c 2011-03-04 11:16:42.332164362 -0500
> +++ b/drivers/net/ariadne.c 2011-03-05 21:11:52.949164759 -0500
> @@ -420,7 +420,7 @@ static inline void ariadne_reset(struct
> static irqreturn_t ariadne_interrupt(int irq, void *data)
> {
> struct net_device *dev = (struct net_device *)data;
> - volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
> + volatile struct Am79C960 *lance;
> struct ariadne_private *priv;
> int csr0, boguscnt;
> int handled = 0;
> @@ -430,6 +430,7 @@ static irqreturn_t ariadne_interrupt(int
> return IRQ_NONE;
> }
>
> + lance = (struct Am79C960 *)dev->base_addr;
> lance->RAP = CSR0; /* PCnet-ISA Controller Status */
>
> if (!(lance->RDP & INTR)) /* Check if any interrupt has been */
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* Re: [PATCH 2/4] slub,rcu: don't assume the size of struct rcu_head
From: Hugh Dickins @ 2011-03-06 19:39 UTC (permalink / raw)
To: Christoph Lameter
Cc: Pekka Enberg, Lai Jiangshan, Ingo Molnar, Paul E. McKenney,
Eric Dumazet, David S. Miller, Matt Mackall, linux-mm,
linux-kernel, netdev
In-Reply-To: <alpine.DEB.2.00.1103020625290.10180@router.home>
On Wed, Mar 2, 2011 at 4:32 AM, Christoph Lameter <cl@linux.com> wrote:
> On Tue, 1 Mar 2011, Hugh Dickins wrote:
>
>> > Struct page may be larger for debugging purposes already because of the
>> > need for extended spinlock data.
>>
>> That was so for a long time, but I stopped it just over a year ago
>> with commit a70caa8ba48f21f46d3b4e71b6b8d14080bbd57a, stop ptlock
>> enlarging struct page.
>
> Strange. I just played around with in in January and the page struct size
> changes when I build kernels with full debugging. I have some
> cmpxchg_double patches here that depend on certain alignment in the page
> struct. Debugging causes all that stuff to get out of whack so that I had
> to do some special patches to make sure fields following the spinlock are
> properly aligned when the sizes change.
That puzzles me, it's not my experience and I don't have an
explanation: do you have time to investigate?
Uh oh, you're going to tell me you're working on an out-of-tree
architecture with a million cpus ;) In that case, yes, I'm afraid
I'll have to update the SPLIT_PTLOCK_CPUS defaulting (for a million -
1 even).
>
>> If a union leads to "random junk" overwriting the page->mapping field
>> when the page is reused, and that junk could resemble the pointer in
>> question, then KSM would mistakenly think it still owned the page.
>> Very remote chance, and maybe it amounts to no more than a leak. But
>> I'd still prefer we keep page->mapping for pointers (sometimes with
>> lower bits set as flags).
>
> DESTROY BY RCU uses the lru field which follows the mapping field in page
> struct. Why would random junk overwrite the mapping field?
Random junk does not overwrite the mapping field with the current
implementation of DESTROY_BY_RCU. But you and Jiangshan were
discussing how to change it, so I was warning of this issue with
page->mapping.
But I would anyway agree with Jiangshan, that it's preferable not to
bloat struct page size just for this DESTROY_BY_RCU issue, even if it
is only an issue when debugging.
Hugh
^ permalink raw reply
* [PATCH v3] tcp: ioctl type SIOCOUTQNSD returns amount of data not sent
From: Steffen Sledz @ 2011-03-06 19:59 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: Alan Cox, David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, Patrick McHardy,
Mario Schuknecht, Steffen Sledz
In-Reply-To: <20110304123950.2c91ebd9@lxorguk.ukuu.org.uk>
From: Mario Schuknecht <m.schuknecht@dresearch.de>
In contrast to SIOCOUTQ which returns the amount of data sent
but not yet acknowledged plus data not yet sent this patch only
returns the data not sent.
For various methods of live streaming bitrate control it may
be helpful to know how much data are in the tcp outqueue are
not sent yet.
Signed-off-by: Mario Schuknecht <m.schuknecht@dresearch.de>
Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
include/linux/sockios.h | 4 +++-
net/ipv4/tcp.c | 9 +++++++++
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/include/linux/sockios.h b/include/linux/sockios.h
index 241f179..7997a50 100644
--- a/include/linux/sockios.h
+++ b/include/linux/sockios.h
@@ -22,7 +22,7 @@
/* Linux-specific socket ioctls */
#define SIOCINQ FIONREAD
-#define SIOCOUTQ TIOCOUTQ
+#define SIOCOUTQ TIOCOUTQ /* output queue size (not sent + not acked) */
/* Routing table calls. */
#define SIOCADDRT 0x890B /* add routing table entry */
@@ -83,6 +83,8 @@
#define SIOCWANDEV 0x894A /* get/set netdev parameters */
+#define SIOCOUTQNSD 0x894B /* output queue size (not sent only) */
+
/* ARP cache control calls. */
/* 0x8950 - 0x8952 * obsolete calls, don't re-use */
#define SIOCDARP 0x8953 /* delete ARP table entry */
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index a17a5a7..b22d450 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -505,6 +505,15 @@ int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
else
answ = tp->write_seq - tp->snd_una;
break;
+ case SIOCOUTQNSD:
+ if (sk->sk_state == TCP_LISTEN)
+ return -EINVAL;
+
+ if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV))
+ answ = 0;
+ else
+ answ = tp->write_seq - tp->snd_nxt;
+ break;
default:
return -ENOIOCTLCMD;
}
--
1.7.1
^ permalink raw reply related
* Re: [Patch] ariadne: fix possible null dereference
From: Geert Uytterhoeven @ 2011-03-06 20:00 UTC (permalink / raw)
To: Randy Dunlap; +Cc: j223yang, netdev, linux-kernel
In-Reply-To: <20110306111141.9cc51306.rdunlap@xenotime.net>
On Sun, Mar 6, 2011 at 20:11, Randy Dunlap <rdunlap@xenotime.net> wrote:
> On Sun, 6 Mar 2011 02:08:32 -0500 j223yang@asset.uwaterloo.ca wrote:
>
>> Hi Randy,
>> I have tested my patch, and it is ok now.
>> Could you please try patching again? Sorry for previous trouble.
>> Thank you!
>
> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> ------------------------------------------------------
>> This patch fixes bugzilla #13853:
>> https://bugzilla.kernel.org/show_bug.cgi?id=13853
>>
>> The patch removes dereference of 'dev' after testing for NULL.
>>
>> Signed-off-by: Jinqiu Yang<crindy646@gmail.com>
>> ---
>> ariadne.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c
>> --- a/drivers/net/ariadne.c 2011-03-04 11:16:42.332164362 -0500
>> +++ b/drivers/net/ariadne.c 2011-03-05 21:11:52.949164759 -0500
>> @@ -420,7 +420,7 @@ static inline void ariadne_reset(struct
>> static irqreturn_t ariadne_interrupt(int irq, void *data)
>> {
>> struct net_device *dev = (struct net_device *)data;
>> - volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
>> + volatile struct Am79C960 *lance;
>> struct ariadne_private *priv;
>> int csr0, boguscnt;
>> int handled = 0;
>> @@ -430,6 +430,7 @@ static irqreturn_t ariadne_interrupt(int
>> return IRQ_NONE;
>> }
>>
>> + lance = (struct Am79C960 *)dev->base_addr;
>> lance->RAP = CSR0; /* PCnet-ISA Controller Status */
>>
>> if (!(lance->RDP & INTR)) /* Check if any interrupt has been */
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* [PATCH net-next-2.6] net: enhance the documentation for rx_handler.
From: Nicolas de Pesloüan @ 2011-03-06 20:00 UTC (permalink / raw)
To: netdev
Cc: davem, shemminger, eric.dumazet, kaber, fubar, andy,
Nicolas de Pesloüan
In-Reply-To: <4D725BD9.6000706@gmail.com>
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
---
This apply on top of Jiri's last patch serie, including the last one that
commented the RX_HANDLER_* values.
include/linux/netdevice.h | 53 ++++++++++++++++++++++++++++++++++++++------
net/core/dev.c | 2 +
2 files changed, 47 insertions(+), 8 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 26e03f9..0c9dc93 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -390,15 +390,52 @@ enum gro_result {
};
typedef enum gro_result gro_result_t;
+/**
+ * enum rx_handler_result - Possible return values for rx_handlers.
+ * @RX_HANDLER_CONSUMED: skb was consumed by rx_handler, do not process it
+ * further.
+ * @RX_HANDLER_ANOTHER: Do another round in receive path. This is indicated in
+ * case skb->dev was changed by rx_handler.
+ * @RX_HANDLER_EXACT: Force exact delivery, no wildcard.
+ * @RX_HANDLER_PASS: Do nothing, passe the skb as if no rx_handler was called.
+ *
+ * rx_handlers are functions called from inside __netif_receive_skb(), to do
+ * special processing of the skb, prior to delivery to protocol handlers.
+ *
+ * Currently, a net_device can only have a single rx_handler registered. Trying
+ * to register a second rx_handler will return -EBUSY.
+ *
+ * To register a rx_handler on a net_device, use netdev_rx_handler_register().
+ * To unregister a rx_handler on a net_device, use
+ * netdev_rx_handler_unregister().
+ *
+ * Upon return, rx_handler is expected to tell __netif_receive_skb() what to
+ * do with the skb.
+ *
+ * If the rx_handler consumed to skb in some way, it should return
+ * RX_HANDLER_CONSUMED. This is appropriate when the rx_handler arranged for
+ * the skb to be delivered in some other ways.
+ *
+ * If the rx_handler changed skb->dev, to divert the skb to another
+ * net_device, it should return RX_HANDLER_ANOTHER. The rx_handler for the
+ * new device will be called if it exists.
+ *
+ * If the rx_handler consider the skb should be ignored, it should return
+ * RX_HANDLER_EXACT. The skb will only be delivered to protocol handlers that
+ * are registred on exact device (ptype->dev == skb->dev).
+ *
+ * If the rx_handler didn't changed skb->dev, but want the skb to be normally
+ * delivered, it should return RX_HANDLER_PASS.
+ *
+ * A device without a registered rx_handler will behave as if rx_handler
+ * returned RX_HANDLER_PASS.
+ */
+
enum rx_handler_result {
- RX_HANDLER_CONSUMED, /* skb was consumed by rx_handler,
- do not process it further. */
- RX_HANDLER_ANOTHER, /* Do another round in receive path.
- This is indicated in case skb->dev
- was changed by rx_handler */
- RX_HANDLER_EXACT, /* Force exact delivery, no wildcard */
- RX_HANDLER_PASS, /* Do nothing, pass the skb as if
- no rx_handler was called */
+ RX_HANDLER_CONSUMED,
+ RX_HANDLER_ANOTHER,
+ RX_HANDLER_EXACT,
+ RX_HANDLER_PASS,
};
typedef enum rx_handler_result rx_handler_result_t;
typedef rx_handler_result_t rx_handler_func_t(struct sk_buff **pskb);
diff --git a/net/core/dev.c b/net/core/dev.c
index a368223..3630722 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3060,6 +3060,8 @@ out:
* on a failure.
*
* The caller must hold the rtnl_mutex.
+ *
+ * For a general description of rx_handler, see enum rx_handler_result.
*/
int netdev_rx_handler_register(struct net_device *dev,
rx_handler_func_t *rx_handler,
--
1.7.2.3
^ permalink raw reply related
* [PATCH net-2.6 2/4] bnx2x: fix link notification
From: Dmitry Kravkov @ 2011-03-06 20:49 UTC (permalink / raw)
To: davem, netdev; +Cc: Eilon Greenstein
Report link to OS and other PFs after HW is fully reconfigured
according to new link parameters. (Affected only Multi Function modes).
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x/bnx2x_main.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 469ca60..aa03233 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -2163,13 +2163,6 @@ static void bnx2x_link_attn(struct bnx2x *bp)
bnx2x_stats_handle(bp, STATS_EVENT_LINK_UP);
}
- /* indicate link status only if link status actually changed */
- if (prev_link_status != bp->link_vars.link_status)
- bnx2x_link_report(bp);
-
- if (IS_MF(bp))
- bnx2x_link_sync_notify(bp);
-
if (bp->link_vars.link_up && bp->link_vars.line_speed) {
int cmng_fns = bnx2x_get_cmng_fns_mode(bp);
@@ -2181,6 +2174,13 @@ static void bnx2x_link_attn(struct bnx2x *bp)
DP(NETIF_MSG_IFUP,
"single function mode without fairness\n");
}
+
+ if (IS_MF(bp))
+ bnx2x_link_sync_notify(bp);
+
+ /* indicate link status only if link status actually changed */
+ if (prev_link_status != bp->link_vars.link_status)
+ bnx2x_link_report(bp);
}
void bnx2x__link_status_update(struct bnx2x *bp)
--
1.7.2.2
^ permalink raw reply related
* [PATCH net-2.6 1/4] bnx2x: fix non-pmf device load flow
From: Dmitry Kravkov @ 2011-03-06 20:49 UTC (permalink / raw)
To: davem, netdev; +Cc: Eilon Greenstein
Remove port MAX BW configuration from non-pmf functions,
which caused reconfigure of HW according to 10G (fake) link.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x/bnx2x_main.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 032ae18..469ca60 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -2092,8 +2092,9 @@ static void bnx2x_cmng_fns_init(struct bnx2x *bp, u8 read_cfg, u8 cmng_type)
bnx2x_calc_vn_weight_sum(bp);
/* calculate and set min-max rate for each vn */
- for (vn = VN_0; vn < E1HVN_MAX; vn++)
- bnx2x_init_vn_minmax(bp, vn);
+ if (bp->port.pmf)
+ for (vn = VN_0; vn < E1HVN_MAX; vn++)
+ bnx2x_init_vn_minmax(bp, vn);
/* always enable rate shaping and fairness */
bp->cmng.flags.cmng_enables |=
--
1.7.2.2
^ permalink raw reply related
* [PATCH net-2.6 3/4] bnx2x: (NPAR) prevent HW access in D3 state
From: Dmitry Kravkov @ 2011-03-06 20:50 UTC (permalink / raw)
To: davem, netdev; +Cc: Eilon Greenstein
Changing speed setting in NPAR requires HW access, this patch
delays the access to D0 state when performed in D3.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x/bnx2x.h | 1 +
drivers/net/bnx2x/bnx2x_cmn.c | 22 ++++++++++++++++++++++
drivers/net/bnx2x/bnx2x_cmn.h | 9 +++++++++
drivers/net/bnx2x/bnx2x_ethtool.c | 18 ++++++++----------
4 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 7897d11..2ac4e3c 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1211,6 +1211,7 @@ struct bnx2x {
/* DCBX Negotation results */
struct dcbx_features dcbx_local_feat;
u32 dcbx_error;
+ u32 pending_max;
};
/**
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 9379812..a71b329 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -996,6 +996,23 @@ void bnx2x_free_skbs(struct bnx2x *bp)
bnx2x_free_rx_skbs(bp);
}
+void bnx2x_update_max_mf_config(struct bnx2x *bp, u32 value)
+{
+ /* load old values */
+ u32 mf_cfg = bp->mf_config[BP_VN(bp)];
+
+ if (value != bnx2x_extract_max_cfg(bp, mf_cfg)) {
+ /* leave all but MAX value */
+ mf_cfg &= ~FUNC_MF_CFG_MAX_BW_MASK;
+
+ /* set new MAX value */
+ mf_cfg |= (value << FUNC_MF_CFG_MAX_BW_SHIFT)
+ & FUNC_MF_CFG_MAX_BW_MASK;
+
+ bnx2x_fw_command(bp, DRV_MSG_CODE_SET_MF_BW, mf_cfg);
+ }
+}
+
static void bnx2x_free_msix_irqs(struct bnx2x *bp)
{
int i, offset = 1;
@@ -1464,6 +1481,11 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
bnx2x_set_eth_mac(bp, 1);
+ if (bp->pending_max) {
+ bnx2x_update_max_mf_config(bp, bp->pending_max);
+ bp->pending_max = 0;
+ }
+
if (bp->port.pmf)
bnx2x_initial_phy_init(bp, load_mode);
diff --git a/drivers/net/bnx2x/bnx2x_cmn.h b/drivers/net/bnx2x/bnx2x_cmn.h
index 326ba44..85ea7f2 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/bnx2x/bnx2x_cmn.h
@@ -341,6 +341,15 @@ void bnx2x_dcbx_init(struct bnx2x *bp);
*/
int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state);
+/**
+ * Updates MAX part of MF configuration in HW
+ * (if required)
+ *
+ * @param bp
+ * @param value
+ */
+void bnx2x_update_max_mf_config(struct bnx2x *bp, u32 value);
+
/* dev_close main block */
int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode);
diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c
index ef29199..7e92f9d 100644
--- a/drivers/net/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/bnx2x/bnx2x_ethtool.c
@@ -238,7 +238,7 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
speed |= (cmd->speed_hi << 16);
if (IS_MF_SI(bp)) {
- u32 param = 0, part;
+ u32 part;
u32 line_speed = bp->link_vars.line_speed;
/* use 10G if no link detected */
@@ -251,24 +251,22 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
REQ_BC_VER_4_SET_MF_BW);
return -EINVAL;
}
+
part = (speed * 100) / line_speed;
+
if (line_speed < speed || !part) {
BNX2X_DEV_INFO("Speed setting should be in a range "
"from 1%% to 100%% "
"of actual line speed\n");
return -EINVAL;
}
- /* load old values */
- param = bp->mf_config[BP_VN(bp)];
- /* leave only MIN value */
- param &= FUNC_MF_CFG_MIN_BW_MASK;
-
- /* set new MAX value */
- param |= (part << FUNC_MF_CFG_MAX_BW_SHIFT)
- & FUNC_MF_CFG_MAX_BW_MASK;
+ if (bp->state != BNX2X_STATE_OPEN)
+ /* store value for following "load" */
+ bp->pending_max = part;
+ else
+ bnx2x_update_max_mf_config(bp, part);
- bnx2x_fw_command(bp, DRV_MSG_CODE_SET_MF_BW, param);
return 0;
}
--
1.7.2.2
^ permalink raw reply related
* [PATCH net-2.6 4/4] bnx2x: fix MaxBW configuration
From: Dmitry Kravkov @ 2011-03-06 20:51 UTC (permalink / raw)
To: davem, netdev; +Cc: Eilon Greenstein
Increase resolution of MaxBW algorithm to suit
Min Bandwidth configuration.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x/bnx2x.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 2ac4e3c..8849699 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1617,8 +1617,8 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms,
/* CMNG constants, as derived from system spec calculations */
/* default MIN rate in case VNIC min rate is configured to zero - 100Mbps */
#define DEF_MIN_RATE 100
-/* resolution of the rate shaping timer - 100 usec */
-#define RS_PERIODIC_TIMEOUT_USEC 100
+/* resolution of the rate shaping timer - 400 usec */
+#define RS_PERIODIC_TIMEOUT_USEC 400
/* number of bytes in single QM arbitration cycle -
* coefficient for calculating the fairness timer */
#define QM_ARB_BYTES 160000
--
1.7.2.2
^ permalink raw reply related
* [PATCH net-2.6 0/4] bnx2x fixes
From: Dmitry Kravkov @ 2011-03-06 20:54 UTC (permalink / raw)
To: davem, netdev; +Cc: Eilon Greenstein
Hello Dave,
Please consider applying these, Multi-function related, fixes to
net-2.6.
Thank you,
Dmitry
^ permalink raw reply
* Re: [PATCH 1/2] Issue NETDEV_CHANGE notification when bridge changes state
From: Adam Majer @ 2011-03-07 0:25 UTC (permalink / raw)
To: Stephen Hemminger
Cc: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, Patrick McHardy, bridge, netdev
In-Reply-To: <20110306094541.53390b55@nehalam>
On Sun, Mar 06, 2011 at 09:45:41AM -0800, Stephen Hemminger wrote:
> Since this a generic problem, it needs a better solution.
> Sending NETDEV_CHANGE impacts lots of other pieces, and even
> user space has similar problems.
It does seem a little broad notification type. I've checked over
all the currently defined NETDEV notifiers, and it seems that
NETDEV_NOTIFY_PEERS may be a better option to use when bridge
has a potential topology change.
Currently it is only used in ipv4/devinet.c: where it is used to issue
a gratuitous ARP.
--
Adam Majer
adamm@zombino.com
^ permalink raw reply
* Re: [PATCH] vhost: copy_from_user -> __copy_from_user
From: David Miller @ 2011-03-07 2:03 UTC (permalink / raw)
To: mst; +Cc: kvm, virtualization, netdev, linux-kernel
In-Reply-To: <20110306113349.GA24333@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Sun, 6 Mar 2011 13:33:49 +0200
> copy_from_user is pretty high on perf top profile,
> replacing it with __copy_from_user helps.
> It's also safe because we do access_ok checks during setup.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Is Rusty going to take this or should I?
^ permalink raw reply
* Re: [Patch] ariadne: fix possible null dereference
From: David Miller @ 2011-03-07 2:07 UTC (permalink / raw)
To: geert; +Cc: rdunlap, j223yang, netdev, linux-kernel
In-Reply-To: <AANLkTiko+HzYMnGEtvb63Fzi2eNge6_iWPmk7EfjFma7@mail.gmail.com>
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Sun, 6 Mar 2011 21:00:13 +0100
> On Sun, Mar 6, 2011 at 20:11, Randy Dunlap <rdunlap@xenotime.net> wrote:
>> On Sun, 6 Mar 2011 02:08:32 -0500 j223yang@asset.uwaterloo.ca wrote:
>>
>>> Hi Randy,
>>> I have tested my patch, and it is ok now.
>>> Could you please try patching again? Sorry for previous trouble.
>>> Thank you!
>>
>> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
>
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
People really don't actually read patches, I think.
Show me how dev can even be NULL here, it simply can't.
So the correct fix is to remove the dev==NULL check altogether.
^ permalink raw reply
* Re: [PATCH net-2.6 0/4] bnx2x fixes
From: David Miller @ 2011-03-07 2:12 UTC (permalink / raw)
To: dmitry; +Cc: netdev, eilong
In-Reply-To: <1299444887.13442.11.camel@lb-tlvb-dmitry>
From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Sun, 6 Mar 2011 22:54:47 +0200
> Please consider applying these, Multi-function related, fixes to
> net-2.6.
All applied, thanks Dmitry.
^ permalink raw reply
* Re: pull request: batman-adv 2011-03-05
From: David Miller @ 2011-03-07 2:14 UTC (permalink / raw)
To: sven; +Cc: netdev, b.a.t.m.a.n
In-Reply-To: <1299328122-21468-1-git-send-email-sven@narfation.org>
Can you like sync with me when you have less than 20+ patches queued
up?
It's too much at once to reasonably review, and makes regressions take
longer to bisect when people hit them.
^ permalink raw reply
* [PATCH] drivers/net: fix build warnings with CONFIG_PM_SLEEP disabled
From: Michel Lespinasse @ 2011-03-07 2:14 UTC (permalink / raw)
To: Stephen Hemminger, David S. Miller, netdev
Cc: Andrew Morton, Linus Torvalds, linux-kernel
This fixes a couple of build warnings when CONFIG_PM is enabled but
CONFIG_PM_SLEEP is disabled. Applies on top of v2.6.38-rc7 - I know it's
late, but it would be great if v2.6.38 could compile without warnings!
Signed-off-by: Michel Lespinasse <walken@google.com>
---
drivers/net/forcedeth.c | 8 ++++++--
drivers/net/sky2.c | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 9c0b1ba..7b92897 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5744,7 +5744,7 @@ static void __devexit nv_remove(struct pci_dev *pci_dev)
pci_set_drvdata(pci_dev, NULL);
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int nv_suspend(struct device *device)
{
struct pci_dev *pdev = to_pci_dev(device);
@@ -5795,6 +5795,11 @@ static int nv_resume(struct device *device)
static SIMPLE_DEV_PM_OPS(nv_pm_ops, nv_suspend, nv_resume);
#define NV_PM_OPS (&nv_pm_ops)
+#else
+#define NV_PM_OPS NULL
+#endif /* CONFIG_PM_SLEEP */
+
+#ifdef CONFIG_PM
static void nv_shutdown(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
@@ -5822,7 +5827,6 @@ static void nv_shutdown(struct pci_dev *pdev)
}
}
#else
-#define NV_PM_OPS NULL
#define nv_shutdown NULL
#endif /* CONFIG_PM */
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 7d85a38..2a91868 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -4983,7 +4983,7 @@ static int sky2_suspend(struct device *dev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int sky2_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
^ permalink raw reply related
* Re: bonding can't change to another slave if you ifdown the active slave
From: Weiping Pan @ 2011-03-07 3:13 UTC (permalink / raw)
To: Nicolas de Pesloüan
Cc: Andy Gospodarek, netdev, bonding-devel, Linda Wang
In-Reply-To: <4D723F83.7080309@gmail.com>
On 03/05/2011 09:49 PM, Nicolas de Pesloüan wrote:
> Le 05/03/2011 03:53, Andy Gospodarek a écrit :
>> On Fri, Mar 04, 2011 at 10:15:17AM +0800, Weiping Pan wrote:
>>> Hi,
>>>
>>> I'm doing some Linux bonding driver test, and I find a problem in
>>> balance-rr mode.
>>> That's it can't change to another slave if you ifdown the active slave.
>>> Any comments are warmly welcomed!
>>>
>>> regards
>>> Weiping Pan
>>>
>>> My host is Fedora 14, and I install VirtualBox (4.0.2), and enable 4
>>> nics for the guest system.
>>
>> Does this mean you are passing 4 NICs from your host to your guest
>> (maybe via direct pci-device assignment to the guest) or are you
>> creating 4 virtual devices on the host that are in a bridge group on the
>> host?
>
> VirtualBox does not allow assignment of pci-device to the guest. The
> network interfaces on the guest are pure virtual one, with several
> modes available. In order to help you trouble shooting this problem,
> we need to know the mode form each of the virtual interfaces. Possible
> modes are NAT, bridged, internal-network, and host-only-network.
>
> Please provide the output of the following command:
>
> VBoxManage showvminfo <your-vm-uuid> | grep ^NIC
>
> To display your vm uuid, use the following command:
>
> VBoxManage list vms
[root@localhost ~]# VBoxManage showvminfo
67b83c47-0ee2-46bc-b0ff-e0eb43edc1c2 |grep ^NIC
NIC 1: MAC: 0800270481A8, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 2: MAC: 08002778F641, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 3: MAC: 080027C408BA, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 4: MAC: 080027DB339A, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
And when guest starts, i find that:
NIC 1: eth7
NIC 2: eth6
NIC 3: eth9
NIC 4: eth8
>
>>
>> [...]
>>> [root@localhost ~]# ifconfig eth7 down
>>
>> This is not a great way to test link failure with bonding. The best way
>> is to actually pull the cable so the interface is truly down.
>
> To virtually plug or unplug the cable from a virtual interface, use
> the following command, replacing the # with the interface number (from
> 1 to 8):
>
> VBoxManage controlvm setlinkstate# on
> VBoxManage controlvm setlinkstate# off
I repeat my test with your guide, but it still doesn't work!
First on my host,
ifconfig eth0:0 192.168.1.100 netmask 255.255.255.0 up
And restart my guest,
[root@localhost ~]# ifconfig
eth6 Link encap:Ethernet HWaddr 08:00:27:78:F6:41
inet addr:10.66.65.128 Bcast:10.66.65.255 Mask:255.255.254.0
inet6 addr: fe80::a00:27ff:fe78:f641/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3608 (3.5 KiB) TX bytes:1152 (1.1 KiB)
eth7 Link encap:Ethernet HWaddr 08:00:27:04:81:A8
inet addr:10.66.65.53 Bcast:10.66.65.255 Mask:255.255.254.0
inet6 addr: fe80::a00:27ff:fe04:81a8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3668 (3.5 KiB) TX bytes:1152 (1.1 KiB)
eth8 Link encap:Ethernet HWaddr 08:00:27:DB:33:9A
inet addr:10.66.65.237 Bcast:10.66.65.255 Mask:255.255.254.0
inet6 addr: fe80::a00:27ff:fedb:339a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:147 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14783 (14.4 KiB) TX bytes:1152 (1.1 KiB)
eth9 Link encap:Ethernet HWaddr 08:00:27:C4:08:BA
inet addr:10.66.65.125 Bcast:10.66.65.255 Mask:255.255.254.0
inet6 addr: fe80::a00:27ff:fec4:8ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:147 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14783 (14.4 KiB) TX bytes:1152 (1.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:880 (880.0 b) TX bytes:880 (880.0 b)
[root@localhost ~]# ifconfig eth6 down
[root@localhost ~]# ifconfig eth7 down
[root@localhost ~]# ifconfig eth8 down
[root@localhost ~]# ifconfig eth9 down
[root@localhost ~]# ip route show
[root@localhost ~]# ip neigh show
[root@localhost ~]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:880 (880.0 b) TX bytes:880 (880.0 b)
[root@localhost ~]# dmesg -c &> /dev/null
[root@localhost ~]# modprobe bonding mode=0 miimon=100
[root@localhost ~]# ifconfig bond0 192.168.1.5 netmask 255.255.255.0 up
[root@localhost ~]# ifenslave bond0 eth6
[root@localhost ~]# ifenslave bond0 eth7
[root@localhost ~]# dmesg
[ 164.865840] bonding: Ethernet Channel Bonding Driver: v3.6.0
(September 26, 2009)
[ 164.865845] bonding: MII link monitoring set to 100 ms
[ 181.186201] ADDRCONF(NETDEV_UP): bond0: link is not ready
[ 191.549252] bonding: bond0: enslaving eth6 as an active interface
with a down link.
[ 191.552653] e1000: eth6 NIC Link is Up 1000 Mbps Full Duplex, Flow
Control: RX
[ 191.586166] bonding: bond0: link status definitely up for interface eth6.
[ 191.586315] ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[ 193.420974] e1000: eth7 NIC Link is Up 1000 Mbps Full Duplex, Flow
Control: RX
[ 193.434907] bonding: bond0: enslaving eth7 as an active interface
with an up link.
[root@localhost ~]# ifconfig
bond0 Link encap:Ethernet HWaddr 08:00:27:78:F6:41
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe78:f641/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:95 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13415 (13.1 KiB) TX bytes:4140 (4.0 KiB)
eth6 Link encap:Ethernet HWaddr 08:00:27:78:F6:41
inet addr:10.66.65.128 Bcast:10.66.65.255 Mask:255.255.254.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7464 (7.2 KiB) TX bytes:1822 (1.7 KiB)
eth7 Link encap:Ethernet HWaddr 08:00:27:78:F6:41
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5951 (5.8 KiB) TX bytes:2318 (2.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:880 (880.0 b) TX bytes:880 (880.0 b)
[root@localhost ~]# ping 192.168.1.100 -c 5
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_req=1 ttl=64 time=1.98 ms
64 bytes from 192.168.1.100: icmp_req=2 ttl=64 time=0.955 ms
64 bytes from 192.168.1.100: icmp_req=3 ttl=64 time=0.209 ms
64 bytes from 192.168.1.100: icmp_req=4 ttl=64 time=0.277 ms
64 bytes from 192.168.1.100: icmp_req=5 ttl=64 time=0.289 ms
--- 192.168.1.100 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4002ms
rtt min/avg/max/mdev = 0.209/0.742/1.984/0.678 ms
[root@localhost ~]# ip route show
192.168.1.0/24 dev bond0 proto kernel scope link src 192.168.1.5
10.66.64.0/23 dev eth6 proto kernel scope link src 10.66.65.128
metric 1
default via 10.66.65.254 dev eth6 proto static
[root@localhost ~]# ip neigh show
192.168.1.100 dev bond0 lladdr 64:31:50:3a:b0:b5 STALE
And on host,
[root@localhost ~]# VBoxManage controlvm
67b83c47-0ee2-46bc-b0ff-e0eb43edc1c2 setlinkstate2 off
Then on guest,
[root@localhost ~]# ethtool eth6
Settings for eth6:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: Unknown!
Duplex: Unknown! (255)
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: umbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: no
[root@localhost ~]# dmesg
[ 164.865840] bonding: Ethernet Channel Bonding Driver: v3.6.0
(September 26, 2009)
[ 164.865845] bonding: MII link monitoring set to 100 ms
[ 181.186201] ADDRCONF(NETDEV_UP): bond0: link is not ready
[ 191.549252] bonding: bond0: enslaving eth6 as an active interface
with a down link.
[ 191.552653] e1000: eth6 NIC Link is Up 1000 Mbps Full Duplex, Flow
Control: RX
[ 191.586166] bonding: bond0: link status definitely up for interface eth6.
[ 191.586315] ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[ 193.420974] e1000: eth7 NIC Link is Up 1000 Mbps Full Duplex, Flow
Control: RX
[ 193.434907] bonding: bond0: enslaving eth7 as an active interface
with an up link.
[ 202.018085] bond0: no IPv6 routers present
[ 238.834001] e1000: eth7 NIC Link is Up 1000 Mbps Full Duplex, Flow
Control: RX
[ 434.010205] e1000: eth6 NIC Link is Down
[ 434.011661] bonding: bond0: link status definitely down for interface
eth6, disabling it
[root@localhost ~]# ping 192.168.1.100 -c 5
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
From 192.168.1.5 icmp_seq=2 Destination Host Unreachable
From 192.168.1.5 icmp_seq=3 Destination Host Unreachable
From 192.168.1.5 icmp_seq=4 Destination Host Unreachable
From 192.168.1.5 icmp_seq=5 Destination Host Unreachable
--- 192.168.1.100 ping statistics ---
5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4001ms
pipe 3
[root@localhost ~]# ip route show
192.168.1.0/24 dev bond0 proto kernel scope link src 192.168.1.5
[root@localhost ~]# ip neigh show
192.168.1.100 dev bond0 FAILED
ping on the guest while tcpdump on the host,
on guest:
[root@localhost ~]# ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
From 192.168.1.5 icmp_seq=2 Destination Host Unreachable
From 192.168.1.5 icmp_seq=3 Destination Host Unreachable
From 192.168.1.5 icmp_seq=4 Destination Host Unreachable
From 192.168.1.5 icmp_seq=6 Destination Host Unreachable
From 192.168.1.5 icmp_seq=7 Destination Host Unreachable
From 192.168.1.5 icmp_seq=8 Destination Host Unreachable
From 192.168.1.5 icmp_seq=10 Destination Host Unreachable
From 192.168.1.5 icmp_seq=11 Destination Host Unreachable
From 192.168.1.5 icmp_seq=12 Destination Host Unreachable
From 192.168.1.5 icmp_seq=14 Destination Host Unreachable
From 192.168.1.5 icmp_seq=15 Destination Host Unreachable
From 192.168.1.5 icmp_seq=16 Destination Host Unreachable
From 192.168.1.5 icmp_seq=18 Destination Host Unreachable
From 192.168.1.5 icmp_seq=19 Destination Host Unreachable
From 192.168.1.5 icmp_seq=20 Destination Host Unreachable
^C
--- 192.168.1.100 ping statistics ---
21 packets transmitted, 0 received, +15 errors, 100% packet loss, time
20005ms
pipe 3
on host:
[root@localhost ~]# tcpdump -i eth0 -p arp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
11:00:50.474242 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:50.474256 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:52.469651 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:52.469661 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:52.632719 ARP, Request who-has dhcp-65-29.nay.redhat.com tell
corerouter.nay.redhat.com, length 46
11:00:53.192150 ARP, Request who-has dhcp-65-14.nay.redhat.com tell
corerouter.nay.redhat.com, length 46
11:00:53.471246 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:53.471257 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:54.474627 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:54.474636 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:56.472050 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:56.472060 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:57.475211 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:57.475220 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:58.476840 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:58.476849 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:00:58.624738 ARP, Request who-has dhcp-65-29.nay.redhat.com tell
corerouter.nay.redhat.com, length 46
11:01:00.477029 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:01:00.477038 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
^C
19 packets captured
19 packets received by filter
0 packets dropped by kernel
[root@localhost ~]# ip neigh show
192.168.1.5 dev eth0 lladdr 08:00:27:78:f6:41 STALE
10.66.65.254 dev eth0 lladdr 00:1d:45:20:d5:ff REACHABLE
regards
Weiping Pan
^ permalink raw reply
* Re: bonding can't change to another slave if you ifdown the active slave
From: Weiping Pan @ 2011-03-07 3:23 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: netdev, bonding-devel, Linda Wang
In-Reply-To: <514.1299285520@death>
On 03/05/2011 08:38 AM, Jay Vosburgh wrote:
> Weiping Pan<panweiping3@gmail.com> wrote:
>
>> I'm doing some Linux bonding driver test, and I find a problem in
>> balance-rr mode.
>> That's it can't change to another slave if you ifdown the active slave.
>> Any comments are warmly welcomed!
> I followed your recipe on a somewhat more recent kernel (2.6.37)
> and using real hardware, and I don't see the problem you describe.
>
> I do have a couple of questions, further down.
>
> [...]
>> My host is Fedora 14, and I install VirtualBox (4.0.2), and enable 4
> I've not ever tried virtualbox, but it may be that its virtual
> switch is misbehaving. One possibility that comes to mind is that the
> virtual switch is confused by seeing the same MAC address on multiple
> ports (which is a problem with a hardware virtual switch I'm familiar
> with).
I use bridge mode in virtualbox.
[root@localhost ~]# VBoxManage showvminfo
67b83c47-0ee2-46bc-b0ff-e0eb43edc1c2 |grep ^NIC
NIC 1: MAC: 0800270481A8, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 2: MAC: 08002778F641, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 3: MAC: 080027C408BA, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 4: MAC: 080027DB339A, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
>> nics for the guest system.
>> My guest is Fedora 14 too.
>> First on my host, I run:
>> [pwp@localhost linux-2.6.35-comment]$ uname -a
>> Linux localhost.localdomain 2.6.35.11-83.fc14.i686 #1 SMP Mon Feb 7
>> 07:04:18 UTC 2011 i686 i686 i386 GNU/Linux
>>
>> [pwp@localhost linux-2.6.35-comment]$ sudo ifconfig eth0:0 192.168.1.100
>> netmask 255.255.255.0 up
>> [pwp@localhost linux-2.6.35-comment]$ sudo ifconfig
>> eth0 Link encap:Ethernet HWaddr 64:31:50:3A:B0:B5
>> inet addr:10.66.65.228 Bcast:10.66.65.255 Mask:255.255.254.0
>> inet6 addr: fe80::6631:50ff:fe3a:b0b5/64 Scope:Link
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:811505 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:777018 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:709681583 (676.8 MiB) TX bytes:71520005 (68.2 MiB)
>> Interrupt:17
>>
>> eth0:0 Link encap:Ethernet HWaddr 64:31:50:3A:B0:B5
>> inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> Interrupt:17
>>
>> Then I enable bonding on my guest, I run:
>> [root@localhost ~]# uname -a
>> Linux localhost.localdomain 2.6.35.11-83.fc14.i686 #1 SMP Mon Feb 7
>> 07:04:18 UTC 2011 i686 i686 i386 GNU/Linux
>>
>> [root@localhost ~]# ifconfig
>> eth6 Link encap:Ethernet HWaddr 08:00:27:3A:4D:BD
>> inet addr:10.66.65.167 Bcast:10.66.65.255 Mask:255.255.254.0
>> inet6 addr: fe80::a00:27ff:fe3a:4dbd/64 Scope:Link
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:65 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:9916 (9.6 KiB) TX bytes:3090 (3.0 KiB)
>>
>> eth7 Link encap:Ethernet HWaddr 08:00:27:26:1B:DB
>> inet addr:10.66.65.154 Bcast:10.66.65.255 Mask:255.255.254.0
>> inet6 addr: fe80::a00:27ff:fe26:1bdb/64 Scope:Link
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:57 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:7358 (7.1 KiB) TX bytes:1152 (1.1 KiB)
>>
>> eth8 Link encap:Ethernet HWaddr 08:00:27:B5:FC:D1
>> inet addr:10.66.65.169 Bcast:10.66.65.255 Mask:255.255.254.0
>> inet6 addr: fe80::a00:27ff:feb5:fcd1/64 Scope:Link
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:57 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:7358 (7.1 KiB) TX bytes:1152 (1.1 KiB)
>>
>> eth9 Link encap:Ethernet HWaddr 08:00:27:C7:7B:FC
>> inet addr:10.66.65.216 Bcast:10.66.65.255 Mask:255.255.254.0
>> inet6 addr: fe80::a00:27ff:fec7:7bfc/64 Scope:Link
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:57 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:7358 (7.1 KiB) TX bytes:1152 (1.1 KiB)
>>
>> lo Link encap:Local Loopback
>> inet addr:127.0.0.1 Mask:255.0.0.0
>> inet6 addr: ::1/128 Scope:Host
>> UP LOOPBACK RUNNING MTU:16436 Metric:1
>> RX packets:123 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:0
>> RX bytes:13036 (12.7 KiB) TX bytes:13036 (12.7 KiB)
>>
>> [root@localhost ~]# ifconfig eth7 down
>> [root@localhost ~]# ifconfig eth8 down
>> [root@localhost ~]# dmesg -c
>> [root@localhost ~]# modprobe bonding mode=0 miimon=100
>> [root@localhost ~]# ifconfig bond0 192.168.1.5 netmask 255.255.255.0 up
>> [root@localhost ~]# ifenslave bond0 eth7
>>
>> [root@localhost ~]# dmesg
>> [ 304.496463] bonding: Ethernet Channel Bonding Driver: v3.6.0
>> (September 26, 2009)
>> [ 304.496468] bonding: MII link monitoring set to 100 ms
>> [ 353.527680] ADDRCONF(NETDEV_UP): bond0: link is not ready
>> [ 355.321626] e1000: eth7 NIC Link is Up 1000 Mbps Full Duplex, Flow
>> Control: RX
>> [ 355.322250] bonding: bond0: enslaving eth7 as an active interface
>> with an up link.
>> [ 355.323503] ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
>> [ 365.394052] bond0: no IPv6 routers present
>>
>> [pwp@localhost ~]$ ping 192.168.1.100 -c 10
> At this point, what is in the routing table ("ip route show")
> and the ARP table ("ip neigh show")?
[root@localhost ~]# ip route show
192.168.1.0/24 dev bond0 proto kernel scope link src 192.168.1.5
10.66.64.0/23 dev eth7 proto kernel scope link src 10.66.65.53 metric 1
10.66.64.0/23 dev eth6 proto kernel scope link src 10.66.65.128
metric 1
default via 10.66.65.254 dev eth7 proto static
[root@localhost ~]# ip neigh show
192.168.1.100 dev bond0 lladdr 64:31:50:3a:b0:b5 REACHABLE
>> PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
>> 64 bytes from 192.168.1.100: icmp_req=1 ttl=64 time=0.196 ms
>> 64 bytes from 192.168.1.100: icmp_req=2 ttl=64 time=0.365 ms
>> 64 bytes from 192.168.1.100: icmp_req=3 ttl=64 time=0.259 ms
>> 64 bytes from 192.168.1.100: icmp_req=4 ttl=64 time=0.135 ms
>> 64 bytes from 192.168.1.100: icmp_req=5 ttl=64 time=0.194 ms
>> 64 bytes from 192.168.1.100: icmp_req=6 ttl=64 time=0.225 ms
>> 64 bytes from 192.168.1.100: icmp_req=7 ttl=64 time=0.189 ms
>> 64 bytes from 192.168.1.100: icmp_req=8 ttl=64 time=0.274 ms
>> 64 bytes from 192.168.1.100: icmp_req=9 ttl=64 time=1.07 ms
>> 64 bytes from 192.168.1.100: icmp_req=10 ttl=64 time=0.274 ms
>>
>> --- 192.168.1.100 ping statistics ---
>> 10 packets transmitted, 10 received, 0% packet loss, time 9002ms
>> rtt min/avg/max/mdev = 0.135/0.319/1.079/0.260 ms
>>
>> [root@localhost ~]# ifenslave bond0 eth8
>> [root@localhost ~]# dmesg
>> [ 304.496463] bonding: Ethernet Channel Bonding Driver: v3.6.0
>> (September 26, 2009)
>> [ 304.496468] bonding: MII link monitoring set to 100 ms
>> [ 353.527680] ADDRCONF(NETDEV_UP): bond0: link is not ready
>> [ 355.321626] e1000: eth7 NIC Link is Up 1000 Mbps Full Duplex, Flow
>> Control: RX
>> [ 355.322250] bonding: bond0: enslaving eth7 as an active interface
>> with an up link.
>> [ 355.323503] ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
>> [ 365.394052] bond0: no IPv6 routers present
>> [ 510.913797] e1000: eth8 NIC Link is Up 1000 Mbps Full Duplex, Flow
>> Control: RX
>> [ 510.917312] bonding: bond0: enslaving eth8 as an active interface
>> with an up link.
>>
>> [pwp@localhost ~]$ ping 192.168.1.100 -c 10
>> PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
>> 64 bytes from 192.168.1.100: icmp_req=1 ttl=64 time=0.182 ms
>> 64 bytes from 192.168.1.100: icmp_req=2 ttl=64 time=0.211 ms
>> 64 bytes from 192.168.1.100: icmp_req=3 ttl=64 time=0.270 ms
>> 64 bytes from 192.168.1.100: icmp_req=4 ttl=64 time=0.248 ms
>> 64 bytes from 192.168.1.100: icmp_req=5 ttl=64 time=0.132 ms
>> 64 bytes from 192.168.1.100: icmp_req=6 ttl=64 time=0.291 ms
>> 64 bytes from 192.168.1.100: icmp_req=7 ttl=64 time=0.246 ms
>> 64 bytes from 192.168.1.100: icmp_req=8 ttl=64 time=0.272 ms
>> 64 bytes from 192.168.1.100: icmp_req=9 ttl=64 time=0.293 ms
>> 64 bytes from 192.168.1.100: icmp_req=10 ttl=64 time=0.133 ms
>>
>> --- 192.168.1.100 ping statistics ---
>> 10 packets transmitted, 10 received, 0% packet loss, time 9000ms
>> rtt min/avg/max/mdev = 0.132/0.227/0.293/0.060 ms
>>
>> [root@localhost ~]# ifconfig
>> bond0 Link encap:Ethernet HWaddr 08:00:27:26:1B:DB
>> inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
>> inet6 addr: fe80::a00:27ff:fe26:1bdb/64 Scope:Link
>> UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
>> RX packets:311 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:0
>> RX bytes:38075 (37.1 KiB) TX bytes:8698 (8.4 KiB)
>>
>> eth7 Link encap:Ethernet HWaddr 08:00:27:26:1B:DB
>> inet addr:10.66.65.154 Bcast:10.66.65.255 Mask:255.255.254.0
>> UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
>> RX packets:181 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:22297 (21.7 KiB) TX bytes:4578 (4.4 KiB)
>>
>> eth8 Link encap:Ethernet HWaddr 08:00:27:26:1B:DB
>> inet addr:192.168.1.15 Bcast:192.168.1.255 Mask:255.255.255.0
>> UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
>> RX packets:130 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:15778 (15.4 KiB) TX bytes:4120 (4.0 KiB)
>>
>> [root@localhost ~]# ifconfig eth7 down
> Next question: just after setting eth7 down, what do the routing
> and ARP tables look like?
[root@localhost ~]# ifconfig eth7 down
[root@localhost ~]# ip route show
192.168.1.0/24 dev bond0 proto kernel scope link src 192.168.1.5
10.66.64.0/23 dev eth6 proto kernel scope link src 10.66.65.128
metric 1
default via 10.66.65.254 dev eth6 proto static
[root@localhost ~]# ip neigh show
192.168.1.100 dev bond0 lladdr 64:31:50:3a:b0:b5 REACHABLE
>> [root@localhost ~]# dmesg
>> [ 304.496463] bonding: Ethernet Channel Bonding Driver: v3.6.0
>> (September 26, 2009)
>> [ 304.496468] bonding: MII link monitoring set to 100 ms
>> [ 353.527680] ADDRCONF(NETDEV_UP): bond0: link is not ready
>> [ 355.321626] e1000: eth7 NIC Link is Up 1000 Mbps Full Duplex, Flow
>> Control: RX
>> [ 355.322250] bonding: bond0: enslaving eth7 as an active interface
>> with an up link.
>> [ 355.323503] ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
>> [ 365.394052] bond0: no IPv6 routers present
>> [ 510.913797] e1000: eth8 NIC Link is Up 1000 Mbps Full Duplex, Flow
>> Control: RX
>> [ 510.917312] bonding: bond0: enslaving eth8 as an active interface
>> with an up link.
>> [ 592.208534] bonding: bond0: link status definitely down for interface
>> eth7, disabling it
>>
>> Now, if bonding driver works well, eth8 will be the active slave, and
>> the network connection is ok.
>> __But__ ...
>>
>> [pwp@localhost ~]$ ping 192.168.1.100 -c 10
>> PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
> > From 192.168.1.5 icmp_seq=10 Destination Host Unreachable
>> --- 192.168.1.100 ping statistics ---
>> 10 packets transmitted, 0 received, +1 errors, 100% packet loss, time 8999ms
>>
>> How strange!
>>
>> [root@localhost ~]# ifconfig
>> bond0 Link encap:Ethernet HWaddr 08:00:27:26:1B:DB
>> inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
>> inet6 addr: fe80::a00:27ff:fe26:1bdb/64 Scope:Link
>> UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
>> RX packets:357 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:0
>> RX bytes:42971 (41.9 KiB) TX bytes:9832 (9.6 KiB)
>>
>> eth8 Link encap:Ethernet HWaddr 08:00:27:26:1B:DB
>> inet addr:192.168.1.15 Bcast:192.168.1.255 Mask:255.255.255.0
>> UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
>> RX packets:163 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:19073 (18.6 KiB) TX bytes:5254 (5.1 KiB)
>>
>> [root@localhost ~]# arp
>> Address HWtype HWaddress Flags
>> Mask Iface
>> corerouter.nay.redhat.c ether 00:1d:45:20:d5:ff
>> C eth6
>> 192.168.1.100
>> (incomplete) bond0
>>
>> I think maybe there is something wrong about arp.
>> So I run ping and tcpdump synchronously.
>>
>> [pwp@localhost ~]$ ping 192.168.1.100 -c 10
>> PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
> > From 192.168.1.5 icmp_seq=2 Destination Host Unreachable
> > From 192.168.1.5 icmp_seq=3 Destination Host Unreachable
> > From 192.168.1.5 icmp_seq=4 Destination Host Unreachable
> > From 192.168.1.5 icmp_seq=6 Destination Host Unreachable
> > From 192.168.1.5 icmp_seq=7 Destination Host Unreachable
> > From 192.168.1.5 icmp_seq=8 Destination Host Unreachable
> > From 192.168.1.5 icmp_seq=9 Destination Host Unreachable
> > From 192.168.1.5 icmp_seq=10 Destination Host Unreachable
>> --- 192.168.1.100 ping statistics ---
>> 10 packets transmitted, 0 received, +8 errors, 100% packet loss, time 9002ms
>> pipe 3
>>
>> And meanwhile,
>> [root@localhost ~]# tcpdump -i bond0 -p arp
>> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
>> listening on bond0, link-type EN10MB (Ethernet), capture size 65535 bytes
>> 02:46:56.983092 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
> [...]
>
> At this point, does tcpdump on the host system see the incoming
> ARP requests?
Yes. On host,
[root@localhost ~]# tcpdump -i eth0 -p arp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
11:21:01.721704 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:21:01.721714 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:21:02.723536 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:21:02.723548 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:21:03.019325 ARP, Request who-has 10.66.4.107 tell 10.66.4.108, length 46
11:21:04.018956 ARP, Request who-has 10.66.4.107 tell 10.66.4.108, length 46
11:21:04.720847 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:21:04.720856 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:21:05.018627 ARP, Request who-has 10.66.4.107 tell 10.66.4.108, length 46
11:21:05.722297 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:21:05.722308 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:21:06.724211 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
11:21:06.724220 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
^C
13 packets captured
13 packets received by filter
0 packets dropped by kernel
Maybe host doesn't reply ? I'm not sure.
regards
Weiping pan
^ permalink raw reply
* Re: [PATCH] net: mac80211: fix compilation warning
From: Jovi Zhang @ 2011-03-07 4:15 UTC (permalink / raw)
To: Larry Finger
Cc: Ben Hutchings, John W. Linville, Johannes Berg, David S. Miller,
open list:NETWORKING [WIREL..., open list:NETWORKING [GENERAL],
open list
In-Reply-To: <4D72650D.8070503-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
On Sun, Mar 6, 2011 at 12:30 AM, Larry Finger <Larry.Finger-tQ5ms3gMjBKDGRHsOpWV0g@public.gmane.orgt> wrote:
> On 03/05/2011 07:52 AM, Jovi Zhang wrote:
>>
>> On Sat, Mar 5, 2011 at 8:31 PM, Ben Hutchings<bhutchings@solarflare.com>
>> wrote:
>>>
>>> On Wed, 2011-03-02 at 18:32 -0500, bookjovi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
>>>>
>>>> From: Jovi Zhang<bookjovi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>>
>>>> this commit fix compilation warning as following:
>>>> net/mac80211/tx.c:1753: warning: unused variable mppath
>>>
>>> [...]
>>>
>>> You clearly didn't try building this with CONFIG_MAC80211_MESH enabled.
>>>
>> Sorry, indeed, maybe should be like this:
>>
>> +#ifdef CONFIG_MAC80211_MESH
>> struct mesh_path *mppath = NULL;
>> +#endif
>
> Linville likes "struct mesh_path *mppath __maybe_unused = NULL;" over the
> ifdef form.
That's better, Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: bonding can't change to another slave if you ifdown the active slave
From: Weiping Pan @ 2011-03-07 4:20 UTC (permalink / raw)
To: Andy Gospodarek; +Cc: netdev, bonding-devel, Linda Wang
In-Reply-To: <20110305025332.GR11864@gospo.rdu.redhat.com>
On 03/05/2011 10:53 AM, Andy Gospodarek wrote:
> On Fri, Mar 04, 2011 at 10:15:17AM +0800, Weiping Pan wrote:
>> Hi,
>>
>> I'm doing some Linux bonding driver test, and I find a problem in
>> balance-rr mode.
>> That's it can't change to another slave if you ifdown the active slave.
>> Any comments are warmly welcomed!
>>
>> regards
>> Weiping Pan
>>
>> My host is Fedora 14, and I install VirtualBox (4.0.2), and enable 4
>> nics for the guest system.
> Does this mean you are passing 4 NICs from your host to your guest
> (maybe via direct pci-device assignment to the guest) or are you
> creating 4 virtual devices on the host that are in a bridge group on the
> host?
>
> [...]
I use bridge mode in virtualbox.
[root@localhost ~]# VBoxManage showvminfo
67b83c47-0ee2-46bc-b0ff-e0eb43edc1c2 |grep ^NIC
NIC 1: MAC: 0800270481A8, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 2: MAC: 08002778F641, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 3: MAC: 080027C408BA, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 4: MAC: 080027DB339A, Attachment: Bridged Interface
'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM,
Reported speed: 0 Mbps, Boot priority: 0
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
>> [root@localhost ~]# ifconfig eth7 down
> This is not a great way to test link failure with bonding. The best way
> is to actually pull the cable so the interface is truly down.
Ok.
But I think bonding should work in such condition.
>> [root@localhost ~]# dmesg
>> [ 304.496463] bonding: Ethernet Channel Bonding Driver: v3.6.0
>> (September 26, 2009)
>> [ 304.496468] bonding: MII link monitoring set to 100 ms
>> [ 353.527680] ADDRCONF(NETDEV_UP): bond0: link is not ready
>> [ 355.321626] e1000: eth7 NIC Link is Up 1000 Mbps Full Duplex, Flow
>> Control: RX
>> [ 355.322250] bonding: bond0: enslaving eth7 as an active interface
>> with an up link.
>> [ 355.323503] ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
>> [ 365.394052] bond0: no IPv6 routers present
>> [ 510.913797] e1000: eth8 NIC Link is Up 1000 Mbps Full Duplex, Flow
>> Control: RX
>> [ 510.917312] bonding: bond0: enslaving eth8 as an active interface
>> with an up link.
>> [ 592.208534] bonding: bond0: link status definitely down for interface
>> eth7, disabling it
> I suspect I know, but what does /proc/net/bonding/bond0 look like?
[root@localhost ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth7
MII Status: down
Link Failure Count: 1
Permanent HW addr: 08:00:27:04:81:a8
Slave Interface: eth8
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:db:33:9a
> [...]
>> And meanwhile,
>> [root@localhost ~]# tcpdump -i bond0 -p arp
>> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
>> listening on bond0, link-type EN10MB (Ethernet), capture size 65535 bytes
>> 02:46:56.983092 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
>> 02:46:57.984040 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
>> 02:46:58.988442 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
>> 02:47:00.987340 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
>> 02:47:01.988136 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
>> 02:47:02.990033 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
>> 02:47:04.985086 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
>> 02:47:05.992368 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
>> 02:47:06.996727 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
>> length 28
>> 02:47:17.231106 ARP, Request who-has dhcp-65-32.nay.redhat.com tell
>> dhcp-65-180.nay.redhat.com, length 46
>> ^C
>> 10 packets captured
>> 10 packets received by filter
>> 0 packets dropped by kernel
>>
>>
> What does a tcpdump on eth0 look like? I'm curious if these arp
> requests make it there or if the responses are the frames being dropped
> (possibly by the connected bridge/switch).
on host,
[root@localhost ~]# tcpdump -i eth0 -p arp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
12:18:24.885306 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:24.885320 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:26.880019 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:26.880030 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:27.881584 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:27.881593 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:28.883657 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:28.883671 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:30.881699 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:30.881709 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:31.885003 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:31.885012 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:31.942278 ARP, Request who-has dhcp-65-14.nay.redhat.com tell
corerouter.nay.redhat.com, length 46
12:18:32.721861 ARP, Request who-has dhcp-65-29.nay.redhat.com tell
corerouter.nay.redhat.com, length 46
12:18:32.888740 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
12:18:32.888748 ARP, Request who-has 192.168.1.100 tell 192.168.1.5,
length 28
[root@localhost ~]# ip route show
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100
10.66.64.0/23 dev eth0 proto kernel scope link src 10.66.65.228
metric 1
default via 10.66.65.254 dev eth0 proto static
[root@localhost ~]# ip neigh show
192.168.1.5 dev eth0 lladdr 08:00:27:04:81:a8 STALE
10.66.65.254 dev eth0 lladdr 00:1d:45:20:d5:ff REACHABLE
regards
Weiping Pan
^ permalink raw reply
* Re: [PATCH] vhost: copy_from_user -> __copy_from_user
From: Michael S. Tsirkin @ 2011-03-07 6:30 UTC (permalink / raw)
To: David Miller; +Cc: kvm, virtualization, netdev, linux-kernel
In-Reply-To: <20110306.180339.193718218.davem@davemloft.net>
On Sun, Mar 06, 2011 at 06:03:39PM -0800, David Miller wrote:
> From: "Michael S. Tsirkin" <mst@redhat.com>
> Date: Sun, 6 Mar 2011 13:33:49 +0200
>
> > copy_from_user is pretty high on perf top profile,
> > replacing it with __copy_from_user helps.
> > It's also safe because we do access_ok checks during setup.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> Is Rusty going to take this or should I?
Sorry about not making this clear. I'll give it a day or two for review
then put it on the vhost tree myself.
Thanks!
^ permalink raw reply
* Re: [PATCH 1/2] Issue NETDEV_CHANGE notification when bridge changes state
From: Stephen Hemminger @ 2011-03-07 6:41 UTC (permalink / raw)
To: Adam Majer
Cc: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, Patrick McHardy, bridge, netdev
In-Reply-To: <20110307002543.GA4242@mira.lan.galacticasoftware.com>
> On Sun, Mar 06, 2011 at 09:45:41AM -0800, Stephen Hemminger wrote:
> > Since this a generic problem, it needs a better solution.
> > Sending NETDEV_CHANGE impacts lots of other pieces, and even
> > user space has similar problems.
>
> It does seem a little broad notification type. I've checked over
> all the currently defined NETDEV notifiers, and it seems that
> NETDEV_NOTIFY_PEERS may be a better option to use when bridge
> has a potential topology change.
>
> Currently it is only used in ipv4/devinet.c: where it is used to issue
> a gratuitous ARP.
I was thinking of fixing bridge to not actually bring the link
up until in forwarding mode. Other applications (DHCP, etc)
see the link up and really don't like being in half duplex
during that period.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox