All of lore.kernel.org
 help / color / mirror / Atom feed
* Inconsistency in spinfo_state between Linux and FreeBSD sctp
@ 2011-01-19 22:27 Schoch Christian
  2011-01-20  4:41 ` Kacheong Poon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Schoch Christian @ 2011-01-19 22:27 UTC (permalink / raw)
  To: linux-sctp

I could figure a problem with spinfo_state between Linux and FreeBSD  
sctp stack.

While in linux stack the return value of spinfo_state is defined as  
enum with four items, FreeBSD defines a lot more states. The problem  
is that these values do not match with each other. For example if  
FreeBSD means INACTIVE this value in linux results in UNCONFIRMED.

In sctp socket api these states are namely defined but not assoziated  
with any value.

Is there any possibility to standardize these values ??

Regards,
Schoch Christian

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

* Re: Inconsistency in spinfo_state between Linux and FreeBSD sctp
  2011-01-19 22:27 Inconsistency in spinfo_state between Linux and FreeBSD sctp Schoch Christian
@ 2011-01-20  4:41 ` Kacheong Poon
  2011-01-20  7:53 ` Randy Stewart
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Kacheong Poon @ 2011-01-20  4:41 UTC (permalink / raw)
  To: linux-sctp

On 01/20/11 06:27 AM, Schoch Christian wrote:
> I could figure a problem with spinfo_state between Linux and FreeBSD
> sctp stack.
>
> While in linux stack the return value of spinfo_state is defined as enum
> with four items, FreeBSD defines a lot more states. The problem is that
> these values do not match with each other. For example if FreeBSD means
> INACTIVE this value in linux results in UNCONFIRMED.
>
> In sctp socket api these states are namely defined but not assoziated
> with any value.
>
> Is there any possibility to standardize these values ??


In version 25 of the draft, there are 3 defined values for
spinfo_state, which are

       SCTP_UNCONFIRMED:  The initial state of a peer address.

       SCTP_ACTIVE:  The state is entered the first time after path
          verification.  It can also be entered if the state is
          SCTP_INACTIVE and the path supervision detects that the peer
          address is reachable again.

       SCTP_INACTIVE:  This state is entered whenever a path failure is
          detected.

The above values should be used.  App should not use actual integer
value in the code.

What is your reason that actual integer values are needed?


-- 

					K. Poon.
					ka-cheong.poon@oracle.com

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

* Re: Inconsistency in spinfo_state between Linux and FreeBSD sctp
  2011-01-19 22:27 Inconsistency in spinfo_state between Linux and FreeBSD sctp Schoch Christian
  2011-01-20  4:41 ` Kacheong Poon
@ 2011-01-20  7:53 ` Randy Stewart
  2011-01-20  7:57 ` Michael Tuexen
  2011-01-20  8:01 ` Randy Stewart
  3 siblings, 0 replies; 5+ messages in thread
From: Randy Stewart @ 2011-01-20  7:53 UTC (permalink / raw)
  To: linux-sctp

What FreeBSD currently gives (since we have not reved it to the
latest socket code and will NOT do so until Last Call is completed
on the draft) is the following...

1) SCTP_ADDR_REACHABLE
2) SCTP_ADDR_NOT_REACHABLE

and any of these two states can have the suffix
3) SCTP_ADDR_UNCONFIRMED

So you end up with two additional values 

3a) SCTP_ADDR_REACHABLE & SCTP_ADDR_UNCONFIRMED
or
3b) SCTP_ADDR_NOT_REACHABLE & SCTP_ADDR_UNCONFIRMED


These will all be changed when we move to a draft that has been
through last call... The SCTP_ADDR_REACHABLE will become SCTP_ACTIVE
the SCTP_ADDR_NOT_REACHABLE will become SCTP_INACTIVE
And we will show neither ACTIVE or INACTIVE if the UNCONFIRMED flag
shows up... you will only see SCTP_UNCONFIRMED

Don't expect these to be an enumerated type in FreeBSD though.. they will
be 

#define SCTP_ACTIVE      0x1
#define SCTP_INACTIVE    0x2
#define SCTP_UNCONFIRMED 0x200

Which is completely fine... and will meet the spec... you should not
(as Kacheong mentioned) depend on a numerical value but use the name.

R

On Jan 19, 2011, at 11:41 PM, Kacheong Poon wrote:

> On 01/20/11 06:27 AM, Schoch Christian wrote:
>> I could figure a problem with spinfo_state between Linux and FreeBSD
>> sctp stack.
>> 
>> While in linux stack the return value of spinfo_state is defined as enum
>> with four items, FreeBSD defines a lot more states. The problem is that
>> these values do not match with each other. For example if FreeBSD means
>> INACTIVE this value in linux results in UNCONFIRMED.
>> 
>> In sctp socket api these states are namely defined but not assoziated
>> with any value.
>> 
>> Is there any possibility to standardize these values ??
> 
> 
> In version 25 of the draft, there are 3 defined values for
> spinfo_state, which are
> 
>      SCTP_UNCONFIRMED:  The initial state of a peer address.
> 
>      SCTP_ACTIVE:  The state is entered the first time after path
>         verification.  It can also be entered if the state is
>         SCTP_INACTIVE and the path supervision detects that the peer
>         address is reachable again.
> 
>      SCTP_INACTIVE:  This state is entered whenever a path failure is
>         detected.
> 
> The above values should be used.  App should not use actual integer
> value in the code.
> 
> What is your reason that actual integer values are needed?
> 
> 
> -- 
> 
> 					K. Poon.
> 					ka-cheong.poon@oracle.com
> 

-----
Randall Stewart
randall@lakerest.net





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

* Re: Inconsistency in spinfo_state between Linux and FreeBSD sctp
  2011-01-19 22:27 Inconsistency in spinfo_state between Linux and FreeBSD sctp Schoch Christian
  2011-01-20  4:41 ` Kacheong Poon
  2011-01-20  7:53 ` Randy Stewart
@ 2011-01-20  7:57 ` Michael Tuexen
  2011-01-20  8:01 ` Randy Stewart
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Tuexen @ 2011-01-20  7:57 UTC (permalink / raw)
  To: linux-sctp

On Jan 20, 2011, at 5:41 AM, Kacheong Poon wrote:
> On 01/20/11 06:27 AM, Schoch Christian wrote:
>> I could figure a problem with spinfo_state between Linux and FreeBSD
>> sctp stack.
>> 
>> While in linux stack the return value of spinfo_state is defined as enum
>> with four items, FreeBSD defines a lot more states. The problem is that
>> these values do not match with each other. For example if FreeBSD means
>> INACTIVE this value in linux results in UNCONFIRMED.
>> 
>> In sctp socket api these states are namely defined but not assoziated
>> with any value.
>> 
>> Is there any possibility to standardize these values ??
> 
> 
> In version 25 of the draft, there are 3 defined values for
> spinfo_state, which are
> 
>      SCTP_UNCONFIRMED:  The initial state of a peer address.
> 
>      SCTP_ACTIVE:  The state is entered the first time after path
>         verification.  It can also be entered if the state is
>         SCTP_INACTIVE and the path supervision detects that the peer
>         address is reachable again.
> 
>      SCTP_INACTIVE:  This state is entered whenever a path failure is
>         detected.
> 
> The above values should be used.  App should not use actual integer
> value in the code.
I agree with you here completely.
Please note that FreeBSD does not implement the path state handling
according to rev 25 of the ID yet.
> 
> What is your reason that actual integer values are needed?
> 
> 
> -- 
> 
> 					K. Poon.
> 					ka-cheong.poon@oracle.com
> 


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

* Re: Inconsistency in spinfo_state between Linux and FreeBSD sctp
  2011-01-19 22:27 Inconsistency in spinfo_state between Linux and FreeBSD sctp Schoch Christian
                   ` (2 preceding siblings ...)
  2011-01-20  7:57 ` Michael Tuexen
@ 2011-01-20  8:01 ` Randy Stewart
  3 siblings, 0 replies; 5+ messages in thread
From: Randy Stewart @ 2011-01-20  8:01 UTC (permalink / raw)
  To: linux-sctp


On Jan 20, 2011, at 2:57 AM, Michael Tuexen wrote:

> On Jan 20, 2011, at 5:41 AM, Kacheong Poon wrote:
>> On 01/20/11 06:27 AM, Schoch Christian wrote:
>>> I could figure a problem with spinfo_state between Linux and FreeBSD
>>> sctp stack.
>>> 
>>> While in linux stack the return value of spinfo_state is defined as enum
>>> with four items, FreeBSD defines a lot more states. The problem is that
>>> these values do not match with each other. For example if FreeBSD means
>>> INACTIVE this value in linux results in UNCONFIRMED.
>>> 
>>> In sctp socket api these states are namely defined but not assoziated
>>> with any value.
>>> 
>>> Is there any possibility to standardize these values ??
>> 
>> 
>> In version 25 of the draft, there are 3 defined values for
>> spinfo_state, which are
>> 
>>     SCTP_UNCONFIRMED:  The initial state of a peer address.
>> 
>>     SCTP_ACTIVE:  The state is entered the first time after path
>>        verification.  It can also be entered if the state is
>>        SCTP_INACTIVE and the path supervision detects that the peer
>>        address is reachable again.
>> 
>>     SCTP_INACTIVE:  This state is entered whenever a path failure is
>>        detected.
>> 
>> The above values should be used.  App should not use actual integer
>> value in the code.
> I agree with you here completely.
> Please note that FreeBSD does not implement the path state handling
> according to rev 25 of the ID yet.

We only implement parts of ID 25 that we had already done... and we
may do a bit more.. but I really don't expect a major rev to the
API until we get through last call.. since thing do tend to change ;-)

R

>> 
>> What is your reason that actual integer values are needed?
>> 
>> 
>> -- 
>> 
>> 					K. Poon.
>> 					ka-cheong.poon@oracle.com
>> 
> 

-----
Randall Stewart
randall@lakerest.net





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

end of thread, other threads:[~2011-01-20  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19 22:27 Inconsistency in spinfo_state between Linux and FreeBSD sctp Schoch Christian
2011-01-20  4:41 ` Kacheong Poon
2011-01-20  7:53 ` Randy Stewart
2011-01-20  7:57 ` Michael Tuexen
2011-01-20  8:01 ` Randy Stewart

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.