Subject: [tsvwg] ECN capability for user space applications

From: Ingemar Johansson S <[email-masked]>
Date: Thu, 21 Oct 2021 12:12:58 +0000

Hi folks 

A few years ago when ECN capability was specified for QUIC we did a short
survey about the accessibility of the ECN bits in the IP header from user
space

https://github.com/quicwg/base-drafts/wiki/ECN-in-QUIC#ecn-support-in-variou
s-os-stacks

This is relevant for QUIC implementations but also for RTP/UDP streaming

Does anybody know it something more generic has been done in this are and/or
if there are any major issues that block access to the IP header from user
space. 

I know from own experience that it is trivial to access the ECN bits in
Linux OS. 

Are there any concerns regarding the accessibility for other OS (iOS/MAC OS,
Android, Microsoft…)

In addition, are there any open sourced libraries available that simplifies
access to the ECN bits from user space.

Regards

/Ingemar

================================

Ingemar Johansson  M.Sc. 

Master Researcher

Ericsson Research

RESEARCHER

GFTL ER NAP NCM Netw Proto & E2E Perf

Labratoriegränd 11

977 53, Luleå, Sweden

Phone +46-1071 43042

SMS/MMS +46-73 078 3289

[email-masked]

www.ericsson.com <http://www.ericsson.com/> 

A lie can travel half way around the world 

    while the truth is putting on its shoes.

                          Mark Twain

=================================

---

From: Dave Taht <[email-masked]>
Date: Thu, 21 Oct 2021 09:56:59 -0700

On Thu, Oct 21, 2021 at 5:13 AM Ingemar Johansson S
<ingemar.s.johansson=[email-masked]> wrote:
>
> Hi folks
>
>
>
> A few years ago when ECN capability was specified for QUIC we did a short survey about the accessibility of the ECN bits in the IP header from user space
>
> https://github.com/quicwg/base-drafts/wiki/ECN-in-QUIC#ecn-support-in-various-os-stacks
>
> Does anybody know it something more generic has been done in this are and/or if there are any major issues that block access to the IP header from user space.
>
>
>
> I know from own experience that it is trivial to access the ECN bits in Linux OS.

In C.

> Are there any concerns regarding the accessibility for other OS (iOS/MAC OS, Android, Microsoft…)
>
>
 >
> In addition, are there any open sourced libraries available that simplifies access to the ECN bits from user space.

It is extremely difficult to get at these bits from libraries outside
of C. While we found a way to do it in go for ipv6 only
(https://github.com/heistp/irtt/commit/fce21410c23e02692653fb5582f3b117a2f7283d
)
we didn't find means for ipv4. The go udp library should be extended
and unified to have the same behavior on both ip types, and ideally
any cmsgs returned as an extra parameter.

rust (in the quinn quic lib) has a means to get at this layer. haven't
looked over rust quiche all that much. The default rust udp library is
very primitive (lacking send/recvmmsg support among other things), I
was considering
copy/pasting the quinn one and having a go at it.

Most other applications and event libraries tend to abstract the
connection into a file handle and lose all access to the ip headers
behind multiple layers of abstraction. I too had taken a survey years
ago and nothing
allowed easy or sane read/write access to cmsg.

> www.ericsson.com

-- 
Fixing Starlink's Latencies: https://www.youtube.com/watch?v=c9gLo6Xrwgw

Dave Täht CEO, TekLibre, LLC

---

From: Vidhi Goel <[email-masked]>
Date: Fri, 22 Oct 2021 13:46:20 -0700

Hi Ingemar,

> Are there any concerns regarding the accessibility for other OS (iOS/MAC OS, Android, Microsoft…)

In iOS and MacOS, these fields are accessible.
https://developer.apple.com/documentation/network/nwprotocolip/metadata <https://developer.apple.com/documentation/network/nwprotocolip/metadata>
https://developer.apple.com/documentation/network/2976764-nw_ip_metadata_get_ecn_flag <https://developer.apple.com/documentation/network/2976764-nw_ip_metadata_get_ecn_flag>

Thanks,
Vidhi

> On Oct 21, 2021, at 5:12 AM, Ingemar Johansson S <ingemar.s.johansson=[email-masked]> wrote:
> 
> Hi folks 
>  
> https://github.com/quicwg/base-drafts/wiki/ECN-in-QUIC#ecn-support-in-various-os-stacks <https://github.com/quicwg/base-drafts/wiki/ECN-in-QUIC#ecn-support-in-various-os-stacks>
> [email-masked] <mailto:[email-masked]>

---

From: Ingemar Johansson S <[email-masked]>
Date: Thu, 28 Oct 2021 17:32:23 +0000

Hi

Thanks Vihdi (and Dave too) for the response. So if I understand the situation correct, ECN/L4S support appears to be possible via C-code but can be more challenging otherwise.

In any case it is good to see that dedicated APIs are available for setting and reading the ECN bits.

Regards

/Ingemar

From: Vidhi Goel <vidhi_goel=[email-masked]> 
Sent: den 22 oktober 2021 22:46
To: Ingemar Johansson S <[email-masked]>
Cc: [email-masked]
Subject: Re: [tsvwg] ECN capability for user space applications

Hi Ingemar,

https://developer.apple.com/documentation/network/nwprotocolip/metadata

https://developer.apple.com/documentation/network/2976764-nw_ip_metadata_get_ecn_flag

Thanks,

Vidhi

On Oct 21, 2021, at 5:12 AM, Ingemar Johansson S <ingemar.s.johansson=[email-masked] <mailto:ingemar.s.johansson=[email-masked]> > wrote:

Hi folks 

 <https://protect2.fireeye.com/v1/url?k=676f8912-38f4b073-676fc989-86d8a30ca42b-463768b61d789843&q=1&e=1112d106-bee0-42da-8ed2-eedc1b9d91d3&u=https%3A%2F%2Fgithub.com%2Fquicwg%2Fbase-drafts%2Fwiki%2FECN-in-QUIC%23ecn-support-in-various-os-stacks> https://github.com/quicwg/base-drafts/wiki/ECN-in-QUIC#ecn-support-in-various-os-stacks

Regards

/Ingemar

Ingemar Johansson  M.Sc. 

Master Researcher

Ericsson Research

RESEARCHER

Labratoriegränd 11

977 53, Luleå, Sweden

Phone +46-1071 43042

SMS/MMS +46-73 078 3289

 <mailto:[email-masked]> [email-masked]

 <http://www.ericsson.com/> www.ericsson.com

                          Mark Twain

---

From: Vidhi Goel <[email-masked]>
Date: Thu, 28 Oct 2021 12:59:18 -0700

> So if I understand the situation correct, ECN/L4S support appears to be possible via C-code but can be more challenging otherwise.

It is available for both C and Swift.

> On Oct 28, 2021, at 10:32 AM, Ingemar Johansson S <ingemar.s.johansson=[email-masked]> wrote:
> 
> Hi
>  
> On Oct 21, 2021, at 5:12 AM, Ingemar Johansson S <ingemar.s.johansson=[email-masked] <mailto:ingemar.s.johansson=[email-masked]>> wrote:
>  
> Hi folks 
>  
> https://github.com/quicwg/base-drafts/wiki/ECN-in-QUIC#ecn-support-in-various-os-stacks <https://protect2.fireeye.com/v1/url?k=676f8912-38f4b073-676fc989-86d8a30ca42b-463768b61d789843&q=1&e=1112d106-bee0-42da-8ed2-eedc1b9d91d3&u=https%3A%2F%2Fgithub.com%2Fquicwg%2Fbase-drafts%2Fwiki%2FECN-in-QUIC%23ecn-support-in-various-os-stacks>

---

From: Ingemar Johansson S <[email-masked]>
Date: Fri, 29 Oct 2021 13:09:06 +0000

Ok, thanks for the correction

/Ingemar

From: Vidhi Goel <[email-masked]> 
Sent: den 28 oktober 2021 21:59
To: Ingemar Johansson S <ingemar.s.johansson=[email-masked]>
Cc: [email-masked]; Dave Taht <[email-masked]>; Ingemar Johansson S <[email-masked]>
Subject: Re: [tsvwg] ECN capability for user space applications

On Oct 28, 2021, at 10:32 AM, Ingemar Johansson S <ingemar.s.johansson=[email-masked] <mailto:ingemar.s.johansson=[email-masked]> > wrote:

Hi

Regards

/Ingemar

From: Vidhi Goel <vidhi_goel=[email-masked] <mailto:vidhi_goel=[email-masked]> > 
Sent: den 22 oktober 2021 22:46
To: Ingemar Johansson S <[email-masked] <mailto:[email-masked]> >
Cc: [email-masked] <mailto:[email-masked]> 
Subject: Re: [tsvwg] ECN capability for user space applications

Hi Ingemar,

Thanks,

Vidhi

Hi folks 

Regards

/Ingemar

Ingemar Johansson  M.Sc. 

Master Researcher

Ericsson Research

RESEARCHER

Labratoriegränd 11

977 53, Luleå, Sweden

Phone +46-1071 43042

SMS/MMS +46-73 078 3289

                          Mark Twain