Skip to contentSkip to conversation

rstpd & 2.4

Bridge Rodolfo Giometti 2 participants 7 messages Jul 2, 2010 – Jul 29, 2010 Ethernet bridge

lore
Share & tools
lore
#0 lore raw

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

Signature · 5 lines
GNU/Linux Solutions                  e-mail: [email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
#1 lore raw
Quoted 11 lines · On Fri, 2 Jul 2010 15:56:41 +0200 Rodolfo Giometti <[email protected]>…

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.

#2 lore raw
Quoted 16 lines · Stephen Hemminger
Quoted 11 lines · On Fri, 2 Jul 2010 15:56:41 +0200 Rodolfo Giometti <[email protected]>…

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?

Quoted 3 lines

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

Quoted 2 lines

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

Neither using a packet sniffer?

Quoted 1 line

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

Signature · 5 lines
GNU/Linux Solutions                  e-mail: [email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
#3 lore raw
In reply to Stephen Hemminger
Quoted 7 lines · Stephen Hemminger

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

Signature · 5 lines
GNU/Linux Solutions                  e-mail: [email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
#4 lore raw
Quoted 10 lines · On Tue, 27 Jul 2010 11:26:55 +0200 Rodolfo Giometti <[email protected]>…
Quoted 7 lines · Stephen Hemminger

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.

Quoted 7 lines

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.

Quoted 5 lines

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.

#5 lore raw
Quoted 16 lines · Stephen Hemminger
Quoted 13 lines · On Tue, 27 Jul 2010 11:26:55 +0200 Rodolfo Giometti <[email protected]>…
Quoted 7 lines · Stephen Hemminger

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.

Quoted 7 lines
Quoted 4 lines

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

Quoted 7 lines
Quoted 5 lines

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

Signature · 5 lines
GNU/Linux Solutions                  e-mail: [email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
#6 lore raw
In reply to Rodolfo Giometti
Quoted 2 lines · Rodolfo Giometti

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

Signature · 5 lines
GNU/Linux Solutions                  e-mail: [email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it