Subject: Re: [Taps] User-Space Networking in iOS 11

From: Zhen Cao <[email-masked]>
Date: Tue, 4 Jul 2017 07:30:45 +0800

Hello Tommy,

Thank you for sharing this.  Going through the slides of WWDC17, I
have some clarification questions: a) the slides only plot WiFi when
talking about the 'user-space', does that also apply to the cellular
link?  I ask this because the user-space packet io needs a different
driver for different links as far as i know.  b) does the user space
networking always performs better than the kernel counterpart?

Many thanks
Zhen

On Fri, Jun 9, 2017 at 3:50 AM, Tommy Pauly <[email-masked]> wrote:
> Hello,
>
> I wanted to point the TAPS group to some of the work that we announced this
> week at WWDC that relates to the Post-Sockets API effort. You can see a
> video of the session here (relevant section at ~13:50), along with the
> slides:
>
> https://developer.apple.com/videos/play/wwdc2017/707
>
> In the current betas of iOS 11, we have introduced “User-Space Networking”
> beneath our networking APIs. The transport and IP protocols are now being
> co-located with the security and application protocols in the process,
> meaning that we are no longer using sockets within the implementation of
> these APIs. This shift allows us to reduce the context switches between
> protocol layers, and could potentially open opportunities for the kind of
> stack flexibility and customization that the TAPS group is looking at. We’re
> excited to be making some first steps into a truly “Post-Sockets” world!
>
> Thanks,
> Tommy
>
> _______________________________________________
> Taps mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/taps
>

---

From: Tommy Pauly <[email-masked]>
Date: Thu, 06 Jul 2017 08:11:42 -0700

Hello Zhen,

Wi-Fi was just the example interface in the slides. We are using the user-space networking stack on Wi-Fi, Cellular, and some VPN interfaces. You’re correct that there are different driver requirements for these, but they look the same to user-space, which is only forming IP datagrams (not down to link layer headers).

With regards to performance, some of the main benefits are seen around batching of packets through the interface to a process, and in being able to process those batches through the entire stack at once. That means that certain traffic patterns do benefit more than others. In terms of user effect, this can translate into improved throughput for CPU-bound loads, or CPU usage reduction for network-bound loads. Of course, we will continue to tune and optimize this technology going forward, so stay tuned in the future.

Thanks,
Tommy

> On Jul 3, 2017, at 4:30 PM, Zhen Cao <[email-masked]> wrote:
> 
> Hello Tommy,
>