[Bridge] RSTP in http://git.kernel.org/?p=linux/kernel/git/shemminger/rstp.git; a=summary problems

Stephen Hemminger shemminger at linux-foundation.org
Tue Apr 1 07:40:03 PDT 2008


Joakim Tjernlund wrote:
> On Tue, 2008-04-01 at 15:27 +0530, Srinivas M.A. wrote:
>   
>>>  Curious, why is RSTP in user space? Lots of protocols are in the kernel,
>>>  why not RSTP too?
>>>       
>> For one thing it is easier from a development standpoint. The kernel
>> just needs to provide hooks for allowing userspace programs to send
>> and receive BPDUs and to change port states. The STP logic can then be
>> moved to userspace and it is easier to develop and debug.
>>     
>
> Yes, but this cannot the only reason to move xSTP to user space? I bet
> that is true for lots of stuff currently in kernel, i.e one could move
> ARP to user space too. You can probably get better performance with
> an in kernel xSTP and possible more robust as you don't depend on a
> external process that could get killed by OOM or by user mistake.
>
>   
>>>  Are any known issues with the in kernel STP?
>>>
>>>  I haven't read 802.1D-2004 but I know RSTP is in there, does RSTP
>>>  replace the old STP protocol? If not, is there any reason to prefer STP
>>>  before RSTP in some cases?
>>>       
>> In 802.1D-2004, RSTP replaces the old STP. RSTP provides additional
>> mechanisms to give faster convergence when the network involves only
>> point-to-point links. It is backward compatible with STP, i.e., it
>> will interoperate correctly when there are other STP bridges, though
>> you lose the fast convergence then. So, in general, there is no reason
>> to prefer STP to RSTP. Currently, the main reason would be that the
>> STP implementation has been around much longer and that this RSTP
>> implementation is new.
>>     
>
> Thanks you for the info, much appreciated. I guess the reason why
> in kernel STP hasn't been converted to RSTP is the user space approach? 
>
> Sorry for all the questions/criticism, this is all fairly new to me and
> I wanted share my initial feelings about RSTP and how it works. Once I
> get used to how it all works I generally stop asking myself why/how
> things work and just get on with it.
>
>  Jocke
>
> PS.
>     I really think you need publish the RSTP work somewhere on the bride
>     home page, I had a hard time finding this and I am sure others too
>     have problems finding it. 
>   

There are several motivations for moving it to user space:
  1. As a userspace application it is less vulnerable to being used for 
remote exploits.  Buffer overflows etc
      in kernel are more damaging.
  2. Rstplib is pre-existing code, and can be incorporated easier into 
user application
  3. The real reason is that there are many flavors of STP and and 
configuration and research are more
      easily managed in userspace.

Note: performance is not an issue for STP.

But:
   1. Robustness is harder in userspace
   2. Close coupling of kernel and daemons is maintance pain
   3. Backwards compatibility problems.

Maybe RSTP in userspace is a bad idea, it is possible to go back.
 


More information about the Bridge mailing list