netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Regarding group_forward_mask in bridge in 3.4 kernel
@ 2012-09-17 14:43 Ajith Adapa
  2012-09-17 15:24 ` John Fastabend
  0 siblings, 1 reply; 3+ messages in thread
From: Ajith Adapa @ 2012-09-17 14:43 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger

Hi,

I am trying to enable group_fwd_mask in bridge by giving the below
command so that it can forward provider bpdu's whose destination
address is 01-80-C2-00-00-08.

echo 8 > /sys/class/net/vpc1_br/bridge/group_fwd_mask

But still the provider BPDU's are dropped by the bridge. After some
debugging I have found that logic in br_input.c has some issue

                switch (dest[5]) {
                case 0x00:      /* Bridge Group Address */
                        /* If STP is turned off,
                           then must forward to keep loop detection */
                        if (p->br->stp_enabled == BR_NO_STP)
                                goto forward;
                        break;

                case 0x01:      /* IEEE MAC (Pause) */
                        goto drop;

                default:
                        /* Allow selective forwarding for most other
protocols */
                        if (p->br->group_fwd_mask & (1u << dest[5]))
                                goto forward;
                }

In my case dest[5] is 8 and p->br->group_fwd_mask is 8. The default
case is triggered but the expression in if condition
is always ZERO as a result BPDU is not forwarded.

Am I giving wrong value for group_fwd_mask ?? I tried other values but
seems only 8 and 0 is accepted.

Regards,
Ajith

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

* Re: Regarding group_forward_mask in bridge in 3.4 kernel
  2012-09-17 14:43 Regarding group_forward_mask in bridge in 3.4 kernel Ajith Adapa
@ 2012-09-17 15:24 ` John Fastabend
  2012-09-18  8:30   ` Ajith Adapa
  0 siblings, 1 reply; 3+ messages in thread
From: John Fastabend @ 2012-09-17 15:24 UTC (permalink / raw)
  To: Ajith Adapa; +Cc: netdev, Stephen Hemminger

On 9/17/2012 7:43 AM, Ajith Adapa wrote:
> Hi,
>
> I am trying to enable group_fwd_mask in bridge by giving the below
> command so that it can forward provider bpdu's whose destination
> address is 01-80-C2-00-00-08.
>
> echo 8 > /sys/class/net/vpc1_br/bridge/group_fwd_mask
>

wrong value see the logic you quoted use 1 << 8

echo 256 > /sys/class/net/...

Your example fwds non-TPMR addresses 01-80-c2-00-00-03.

[...]

> Am I giving wrong value for group_fwd_mask ??

Yep wrong value.

> I tried other values but seems only 8 and 0 is accepted.

The logic makes an attempt to restrict forwarding by masking 0x4007u,
catching many known control protocols.

See commit for details,

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=515853ccecc6987dfb8ed809dd8bf8900286f29e

.John

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

* Re: Regarding group_forward_mask in bridge in 3.4 kernel
  2012-09-17 15:24 ` John Fastabend
@ 2012-09-18  8:30   ` Ajith Adapa
  0 siblings, 0 replies; 3+ messages in thread
From: Ajith Adapa @ 2012-09-18  8:30 UTC (permalink / raw)
  To: John Fastabend; +Cc: netdev, Stephen Hemminger

Thanks for the reply John.

Then in the case of Link Aggregation whose mac-address is
01-80-c2-00-00-02 I should do

echo 4 >> /sys/class/net/...

But value 4 is not getting accepted. why ?

Regards,
Ajith
--------------------------------------------
codingfreak.in


On Mon, Sep 17, 2012 at 8:54 PM, John Fastabend
<john.r.fastabend@intel.com> wrote:
> wrong value see the logic you quoted use 1 << 8
>
> echo 256 > /sys/class/net/...
>
> Your example fwds non-TPMR addresses 01-80-c2-00-00-03.

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

end of thread, other threads:[~2012-09-18  8:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17 14:43 Regarding group_forward_mask in bridge in 3.4 kernel Ajith Adapa
2012-09-17 15:24 ` John Fastabend
2012-09-18  8:30   ` Ajith Adapa

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).