All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bridge] rstpd & 2.4
@ 2010-07-02 13:56 Rodolfo Giometti
  2010-07-02 16:21 ` Stephen Hemminger
  0 siblings, 1 reply; 7+ messages in thread
From: Rodolfo Giometti @ 2010-07-02 13:56 UTC (permalink / raw)
  To: bridge

Hello,

project rstpd at
http://git.kernel.org/?p=linux/kernel/git/shemminger/rstp.git can work
if default kernel stp is disabled by calling userspace program
/sbin/bridge-stp and checking the return code.

On 2.4.27 such mechanism is not implemented so should I backport some
kernel code or I can just disable the STP by using the
BRCTL_SET_BRIDGE_STP_STATE ioctl command? There are any drawbacks in
doing so?

Thanks in advance,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it

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

* Re: [Bridge] rstpd & 2.4
  2010-07-02 13:56 [Bridge] rstpd & 2.4 Rodolfo Giometti
@ 2010-07-02 16:21 ` Stephen Hemminger
  2010-07-02 19:22   ` Rodolfo Giometti
  2010-07-27  9:26   ` Rodolfo Giometti
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Hemminger @ 2010-07-02 16:21 UTC (permalink / raw)
  To: Rodolfo Giometti; +Cc: bridge

On Fri, 2 Jul 2010 15:56:41 +0200
Rodolfo Giometti <giometti@enneenne.com> wrote:

> Hello,
> 
> project rstpd at
> http://git.kernel.org/?p=linux/kernel/git/shemminger/rstp.git can work
> if default kernel stp is disabled by calling userspace program
> /sbin/bridge-stp and checking the return code.
> 
> On 2.4.27 such mechanism is not implemented so should I backport some
> kernel code or I can just disable the STP by using the
> BRCTL_SET_BRIDGE_STP_STATE ioctl command? There are any drawbacks in
> doing so?


The 2.4 kernel is missing all the hooks to provide user level STP.
The startup is not the big issue, the real problem is that the
kernel doesn't have hooks to control port state from user space,
and the spanning tree packets may not be visible to user space
application either.

Sigh, 2.4 is at least 5 years old by now.

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

* Re: [Bridge] rstpd & 2.4
  2010-07-02 16:21 ` Stephen Hemminger
@ 2010-07-02 19:22   ` Rodolfo Giometti
  2010-07-27  9:26   ` Rodolfo Giometti
  1 sibling, 0 replies; 7+ messages in thread
From: Rodolfo Giometti @ 2010-07-02 19:22 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: bridge

On Fri, Jul 02, 2010 at 09:21:48AM -0700, Stephen Hemminger wrote:
> On Fri, 2 Jul 2010 15:56:41 +0200
> Rodolfo Giometti <giometti@enneenne.com> wrote:
> 
> > Hello,
> > 
> > project rstpd at
> > http://git.kernel.org/?p=linux/kernel/git/shemminger/rstp.git can work
> > if default kernel stp is disabled by calling userspace program
> > /sbin/bridge-stp and checking the return code.
> > 
> > On 2.4.27 such mechanism is not implemented so should I backport some
> > kernel code or I can just disable the STP by using the
> > BRCTL_SET_BRIDGE_STP_STATE ioctl command? There are any drawbacks in
> > doing so?
> 
> 
> The 2.4 kernel is missing all the hooks to provide user level STP.
> The startup is not the big issue, the real problem is that the
> kernel doesn't have hooks to control port state from user space,

These could be added...

> and the spanning tree packets may not be visible to user space
> application either.

Neither using a packet sniffer?

> Sigh, 2.4 is at least 5 years old by now.

I see but I need to update an old product... what do you suggest to
me? It could be easier to add missing code to kernel 2.4 or just
trying to port rstp in kernel-land? In the latter case, have you some
URLs to suggest to me? :)

Thanks in advance,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it

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

* Re: [Bridge] rstpd & 2.4
  2010-07-02 16:21 ` Stephen Hemminger
  2010-07-02 19:22   ` Rodolfo Giometti
@ 2010-07-27  9:26   ` Rodolfo Giometti
  2010-07-27 15:38     ` Stephen Hemminger
  2010-07-29 15:39     ` Rodolfo Giometti
  1 sibling, 2 replies; 7+ messages in thread
From: Rodolfo Giometti @ 2010-07-27  9:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: bridge

On Fri, Jul 02, 2010 at 09:21:48AM -0700, Stephen Hemminger wrote:

> The 2.4 kernel is missing all the hooks to provide user level STP.
> The startup is not the big issue, the real problem is that the
> kernel doesn't have hooks to control port state from user space,
> and the spanning tree packets may not be visible to user space
> application either.
> 
> Sigh, 2.4 is at least 5 years old by now.

Hello, I'm going to start backport of rstpd to kernel 2.4 series and
I'd like having some advices from you.

Regarding the bridge controls I can add to the current sysfs interface
the old ioctl interface as the old bridge-utils did. Do you think I
can contribute to the rstpd code in order to support such interface or
you have no interest in doing it?

The problem of controlling the port state from user space can be
resolved by adding the missing netlink commands into the kernel code.

In the end, spanning tree packets may be captured as tcpdump do, is
that right?

Thanks in advance,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it

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

* Re: [Bridge] rstpd & 2.4
  2010-07-27  9:26   ` Rodolfo Giometti
@ 2010-07-27 15:38     ` Stephen Hemminger
  2010-07-27 17:20       ` Rodolfo Giometti
  2010-07-29 15:39     ` Rodolfo Giometti
  1 sibling, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2010-07-27 15:38 UTC (permalink / raw)
  To: Rodolfo Giometti; +Cc: bridge

On Tue, 27 Jul 2010 11:26:55 +0200
Rodolfo Giometti <giometti@enneenne.com> wrote:

> On Fri, Jul 02, 2010 at 09:21:48AM -0700, Stephen Hemminger wrote:
> 
> > The 2.4 kernel is missing all the hooks to provide user level STP.
> > The startup is not the big issue, the real problem is that the
> > kernel doesn't have hooks to control port state from user space,
> > and the spanning tree packets may not be visible to user space
> > application either.
> > 
> > Sigh, 2.4 is at least 5 years old by now.
> 
> Hello, I'm going to start backport of rstpd to kernel 2.4 series and
> I'd like having some advices from you.
> 
> Regarding the bridge controls I can add to the current sysfs interface
> the old ioctl interface as the old bridge-utils did. Do you think I
> can contribute to the rstpd code in order to support such interface or
> you have no interest in doing it?

I won't put in 2.6 code.  If you wan to put in 2.4, contact
the 2.4 kernel maintainer.

> The problem of controlling the port state from user space can be
> resolved by adding the missing netlink commands into the kernel code.
> 
> In the end, spanning tree packets may be captured as tcpdump do, is
> that right?

That is how I did it since RSTP needs to see ethernet headers.

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

* Re: [Bridge] rstpd & 2.4
  2010-07-27 15:38     ` Stephen Hemminger
@ 2010-07-27 17:20       ` Rodolfo Giometti
  0 siblings, 0 replies; 7+ messages in thread
From: Rodolfo Giometti @ 2010-07-27 17:20 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: bridge

On Tue, Jul 27, 2010 at 08:38:15AM -0700, Stephen Hemminger wrote:
> On Tue, 27 Jul 2010 11:26:55 +0200
> Rodolfo Giometti <giometti@enneenne.com> wrote:
> 
> > On Fri, Jul 02, 2010 at 09:21:48AM -0700, Stephen Hemminger wrote:
> > 
> > > The 2.4 kernel is missing all the hooks to provide user level STP.
> > > The startup is not the big issue, the real problem is that the
> > > kernel doesn't have hooks to control port state from user space,
> > > and the spanning tree packets may not be visible to user space
> > > application either.
> > > 
> > > Sigh, 2.4 is at least 5 years old by now.
> > 
> > Hello, I'm going to start backport of rstpd to kernel 2.4 series and
> > I'd like having some advices from you.
> > 
> > Regarding the bridge controls I can add to the current sysfs interface
> > the old ioctl interface as the old bridge-utils did. Do you think I
> > can contribute to the rstpd code in order to support such interface or
> > you have no interest in doing it?
> 
> I won't put in 2.6 code.  If you wan to put in 2.4, contact
> the 2.4 kernel maintainer.

Regarding my modifications I just refer to the rstpd code, I'm going
to store kernel patches on my site only, so no kernel patches at
all. :)

> > The problem of controlling the port state from user space can be
> > resolved by adding the missing netlink commands into the kernel code.
> > 
> > In the end, spanning tree packets may be captured as tcpdump do, is
> > that right?
> 
> That is how I did it since RSTP needs to see ethernet headers.

Ok, thanks.

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it

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

* Re: [Bridge] rstpd & 2.4
  2010-07-27  9:26   ` Rodolfo Giometti
  2010-07-27 15:38     ` Stephen Hemminger
@ 2010-07-29 15:39     ` Rodolfo Giometti
  1 sibling, 0 replies; 7+ messages in thread
From: Rodolfo Giometti @ 2010-07-29 15:39 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: bridge

On Tue, Jul 27, 2010 at 11:26:55AM +0200, Rodolfo Giometti wrote:

> Regarding the bridge controls I can add to the current sysfs interface
> the old ioctl interface as the old bridge-utils did.

Hello, I ported almost everything but I'm stuck on function
STP_OUT_flush_lt (file bridge_track.c).

In file rstplib/topoch.c I read:

/*
 * In many kinds of hardware the function
 * STP_OUT_flush_lt is a) is very hard and b) cannot
 * delete learning emtries per port. The alternate
 * method may be used: we don't care operEdge flag here,
 * but clean learning table once for TopologyChange
 * for all ports, except the received port. I am ready to discuss :(
 * See below word STRONGLY_SPEC_802_1W
 */

So I suppose this function is currently disabled. Is that true?

If not, can you please give me advice in order to backport the above
function to the old ioctl() interface? It is not so clear to me what
exactly that function does... :(

Thanks in advance,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it

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

end of thread, other threads:[~2010-07-29 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-02 13:56 [Bridge] rstpd & 2.4 Rodolfo Giometti
2010-07-02 16:21 ` Stephen Hemminger
2010-07-02 19:22   ` Rodolfo Giometti
2010-07-27  9:26   ` Rodolfo Giometti
2010-07-27 15:38     ` Stephen Hemminger
2010-07-27 17:20       ` Rodolfo Giometti
2010-07-29 15:39     ` Rodolfo Giometti

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.