* SCTP and IP_TOS
@ 2013-08-12 17:00 Ben Greear
2013-08-12 20:21 ` Vlad Yasevich
0 siblings, 1 reply; 3+ messages in thread
From: Ben Greear @ 2013-08-12 17:00 UTC (permalink / raw)
To: netdev
Hello!
I notice that I read 0x2 as IP_TOS getsockopt on an SCTP socket configured
for streaming mode.
Looks to me like the reason is that SCTP uses a socket type of SCTP_SOCKET_TCP
and the ipv4/ip_sockglue.c code is only masking out ECN for SOCK_STREAM types.
Is this per design, or should the ip_sockglue.c mask out ECN for SCTP_SOCKET_TCP
types as well?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SCTP and IP_TOS
2013-08-12 17:00 SCTP and IP_TOS Ben Greear
@ 2013-08-12 20:21 ` Vlad Yasevich
2013-08-12 20:51 ` Ben Greear
0 siblings, 1 reply; 3+ messages in thread
From: Vlad Yasevich @ 2013-08-12 20:21 UTC (permalink / raw)
To: Ben Greear; +Cc: netdev
On 08/12/2013 01:00 PM, Ben Greear wrote:
> Hello!
>
> I notice that I read 0x2 as IP_TOS getsockopt on an SCTP socket configured
> for streaming mode.
>
> Looks to me like the reason is that SCTP uses a socket type of
> SCTP_SOCKET_TCP
> and the ipv4/ip_sockglue.c code is only masking out ECN for SOCK_STREAM
> types.
>
> Is this per design, or should the ip_sockglue.c mask out ECN for
> SCTP_SOCKET_TCP
> types as well?
>
> Thanks,
> Ben
>
From the ip_glue perspective, you would see either SOCK_STREAM or
SOCK_SEQPACKET.
So you are trying to set tos bits on a SEQPACKET socket, ip_sockglue()
wouldn't try preserver current ECN bits as it does for STREAM sockets.
-vlad
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SCTP and IP_TOS
2013-08-12 20:21 ` Vlad Yasevich
@ 2013-08-12 20:51 ` Ben Greear
0 siblings, 0 replies; 3+ messages in thread
From: Ben Greear @ 2013-08-12 20:51 UTC (permalink / raw)
To: Vlad Yasevich; +Cc: netdev
On 08/12/2013 01:21 PM, Vlad Yasevich wrote:
> On 08/12/2013 01:00 PM, Ben Greear wrote:
>> Hello!
>>
>> I notice that I read 0x2 as IP_TOS getsockopt on an SCTP socket configured
>> for streaming mode.
>>
>> Looks to me like the reason is that SCTP uses a socket type of
>> SCTP_SOCKET_TCP
>> and the ipv4/ip_sockglue.c code is only masking out ECN for SOCK_STREAM
>> types.
>>
>> Is this per design, or should the ip_sockglue.c mask out ECN for
>> SCTP_SOCKET_TCP
>> types as well?
>>
>> Thanks,
>> Ben
>>
>
> From the ip_glue perspective, you would see either SOCK_STREAM or
> SOCK_SEQPACKET.
>
> So you are trying to set tos bits on a SEQPACKET socket, ip_sockglue()
> wouldn't try preserver current ECN bits as it does for STREAM sockets.
Actually, I am just reading the TOS, and should never be setting it
at all in this particular test case. TCP connections return 0x0 in
this case, but SCTP returns 0x2.
It's a small issue, but it screwed up some sub-standard code in
my application, so that is why I noticed it.
It *could* be that my app is somehow to blame. I'll poke around
in the kernel with printk when I get a chance.
Thanks,
Ben
>
> -vlad
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-12 20:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-12 17:00 SCTP and IP_TOS Ben Greear
2013-08-12 20:21 ` Vlad Yasevich
2013-08-12 20:51 ` Ben Greear
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).