All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bridge] Invalid Argument when adding a bond to a bridge
@ 2011-12-21 16:01 Dyweni - Bridge
  2011-12-21 17:15 ` Dyweni - Bridge
  0 siblings, 1 reply; 6+ messages in thread
From: Dyweni - Bridge @ 2011-12-21 16:01 UTC (permalink / raw)
  To: Bridge, Bonding Devel

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

  

Hi All, 

I'm getting an 'Invalid argument' error when trying to
add a bonded interface to a new bridge. Has anyone seen this before?


I'm running Linux 3.2-rc6 

Bonded interface was created like this:


echo "+public-bond" > /sys/class/net/bonding_masters
echo "+eth0" >
/sys/class/net/public-bond/bonding/slaves 

The bridged interface was
created like this: 

brctl addbr pubbridge
brctl addif pubbridge
public-bond 

--  

-- 
Thanks,
Dyweni
  

[-- Attachment #2: Type: text/html, Size: 731 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bridge] Invalid Argument when adding a bond to a bridge
  2011-12-21 16:01 [Bridge] Invalid Argument when adding a bond to a bridge Dyweni - Bridge
@ 2011-12-21 17:15 ` Dyweni - Bridge
  0 siblings, 0 replies; 6+ messages in thread
From: Dyweni - Bridge @ 2011-12-21 17:15 UTC (permalink / raw)
  To: bridge, Bonding Devel

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

  

Hi Again, 

I checked the kernel source (net/bridge/br_ioctl.c)...
The Invalid Argument is being returned by add_del_if after
__dev_get_by_index is under to find the network interface using the
index that was passed to it. 

I checked with GDB and determine that the
index being passed in 8... That corresponds to the public bond interface
index # (/sys/class/net/public-bond/ifindex). 

Where should I be
looking next? 

---
Thanks,
Dyweni

On Wed, 21 Dec 2011 10:01:52 -0600,
Dyweni - Bridge wrote: 

> Hi All, 
> 
> I'm getting an 'Invalid
argument' error when trying to add a bonded interface to a new bridge.
Has anyone seen this before? 
> 
> I'm running Linux 3.2-rc6 
> 
>
Bonded interface was created like this: 
> 
> echo "+public-bond" >
/sys/class/net/bonding_masters
> echo "+eth0" >
/sys/class/net/public-bond/bonding/slaves 
> 
> The bridged interface
was created like this: 
> 
> brctl addbr pubbridge
> brctl addif
pubbridge public-bond 
> 
> -- 
> 
> -- 
> Thanks,
> Dyweni
 

[-- Attachment #2: Type: text/html, Size: 1493 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bridge] Invalid Argument when adding a bond to a bridge
  2011-12-22 14:25 Dyweni - NetDev
  2011-12-22 14:35 ` David Lamparter
@ 2011-12-22 16:45 ` Stephen Hemminger
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2011-12-22 16:45 UTC (permalink / raw)
  To: xmCM8KtKk25K; +Cc: NetDev, Bridge, Bonding Devel

On Thu, 22 Dec 2011 08:25:54 -0600
Dyweni - NetDev <xmCM8KtKk25K@dyweni.com> wrote:

>  Hi All,
> 
>  I need some help figuring this one out... Whenever I try to add a bond 
>  to a
>  bridge, I get back an invalid argument error. I've confirmed this on
>  3.2-rc6, 3.1.5, 3.0.13, and 2.6.39.4 (haven't checked earlier kernels).
> 
>  Here's my setup: 32bit KVM virtual machine with no network cards (... 
>  -net
>  none ... ).
> 
>  I created the bond with: echo "+x" > /sys/class/net/bonding_masters
> 
>  I created the bridge with: brctl addbr b
> 
>  I try to add the bond to the bridge with: brctl addif b x
> 

The bonding device inherits its MAC address from the slave
devices. Therefore until the you add a slave to the bonding device
it's MAC address isn't set (all zeros). Bridging is not allowed
without a valid MAC address.

The solution is to fully configure the bonding device before adding
to the bridge.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bridge] Invalid Argument when adding a bond to a bridge
  2011-12-22 14:25 Dyweni - NetDev
@ 2011-12-22 14:35 ` David Lamparter
  2011-12-22 16:45 ` Stephen Hemminger
  1 sibling, 0 replies; 6+ messages in thread
From: David Lamparter @ 2011-12-22 14:35 UTC (permalink / raw)
  To: Dyweni - NetDev; +Cc: NetDev, Bridge, Bonding Devel

Add an interface to the bond, then add the bond to the bridge.

bond without interface = 00:00:00:00:00:00 MAC = invalid.

On Thu, Dec 22, 2011 at 08:25:54AM -0600, Dyweni - NetDev wrote:
>  I created the bond with: echo "+x" > /sys/class/net/bonding_masters
> 
>  I created the bridge with: brctl addbr b
> 
>  I try to add the bond to the bridge with: brctl addif b x


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bridge] Invalid Argument when adding a bond to a bridge
@ 2011-12-22 14:25 Dyweni - NetDev
  2011-12-22 14:35 ` David Lamparter
  2011-12-22 16:45 ` Stephen Hemminger
  0 siblings, 2 replies; 6+ messages in thread
From: Dyweni - NetDev @ 2011-12-22 14:25 UTC (permalink / raw)
  To: NetDev, Bridge, Bonding Devel

 Hi All,

 I need some help figuring this one out... Whenever I try to add a bond 
 to a
 bridge, I get back an invalid argument error. I've confirmed this on
 3.2-rc6, 3.1.5, 3.0.13, and 2.6.39.4 (haven't checked earlier kernels).

 Here's my setup: 32bit KVM virtual machine with no network cards (... 
 -net
 none ... ).

 I created the bond with: echo "+x" > /sys/class/net/bonding_masters

 I created the bridge with: brctl addbr b

 I try to add the bond to the bridge with: brctl addif b x

-- 
 Thanks,
 Dyweni

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bridge] Invalid Argument when adding a bond to a bridge
@ 2011-12-22 14:08 Dyweni - NetDev
  0 siblings, 0 replies; 6+ messages in thread
From: Dyweni - NetDev @ 2011-12-22 14:08 UTC (permalink / raw)
  To: NetDev, Bridge, Bonding Devel

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

  

Hi All, 

I need some help figuring this one out... Whenever I try
to add a bond to a bridge, I get back an invalid argument error. I've
confirmed this on 3.2-rc6, 3.1.5, 3.0.13, and 2.6.39.4 (haven't checked
earlier kernels). 

Here's my setup: 32bit KVM virtual machine with no
network cards (... -net none ... ). 

I created the bond with: echo "+x"
> /sys/class/net/bonding_masters 

I created the bridge with: brctl
addbr b 

I try to add the bond to the bridge with: brctl addif b x 

--


Thanks,
Dyweni
  

[-- Attachment #2: Type: text/html, Size: 757 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-22 16:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 16:01 [Bridge] Invalid Argument when adding a bond to a bridge Dyweni - Bridge
2011-12-21 17:15 ` Dyweni - Bridge
2011-12-22 14:08 Dyweni - NetDev
2011-12-22 14:25 Dyweni - NetDev
2011-12-22 14:35 ` David Lamparter
2011-12-22 16:45 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.