fundamental technologies to work on for cloud-native networking - - PowerPoint PPT Presentation

fundamental technologies to work
SMART_READER_LITE
LIVE PREVIEW

fundamental technologies to work on for cloud-native networking - - PowerPoint PPT Presentation

fundamental technologies to work on for cloud-native networking Magnus Karlsson, Intel Cloud-Native Network Functions My View Many small network functions App App App App Runs in containers / processes Routing / Switching


slide-1
SLIDE 1

fundamental technologies to work

  • n for cloud-native networking

Magnus Karlsson, Intel

slide-2
SLIDE 2

Network Platforms Group

Cloud-Native Network Functions – My View

  • Many small network functions
  • Runs in containers / processes
  • High availability
  • Automatic scalability
  • Secure
  • Deployable at scale
  • Really simple
  • Load-balancing
  • Routing and/or switching
  • Best performance NOT a main

driver

2

App Server Routing / Switching App App App Server Server Server Load Balancer Packets Cloud-Native systems using the Linux stack is NOT a focus of this presentation

slide-3
SLIDE 3

Network Platforms Group

Properties Needed

  • HW agnostic – Linux APIs only
  • Fault isolation
  • Restartability
  • Multiple SW versions
  • Upgradeable during run-time
  • Many processes per core
  • Power save
  • All security features working
  • Debuggable & observeable
  • Routing/switching in kernel
  • Binary compatibility
  • Works on any standard Linux

3

  • Many small network functions
  • Runs in containers / processes
  • High availability
  • Automatic scalability
  • Secure
  • Deployable at scale
  • Really simple
  • Load-balancing
  • Routing and/or switching
  • Good enough performance

Requirements Properties

slide-4
SLIDE 4

Network Platforms Group

App App App

Desired System

4

App Core 1 Linux with Routing / Switching Core 2 Core 3 Core 4 App App App App App App App App App App App App User App Packet Access Library App = Raw Packets All drivers in the Linux kernel the key to solving the problem

slide-5
SLIDE 5

Network Platforms Group

Goal for Cloud-Native Dataplane

  • Dead-simple, out-of-the-box cloud-native

networking for network functions

  • With the properties outlines previously
  • Supported by all major distributions
  • Binary backward and forward compatibilty
  • With good enough performance

5

App NIC Linux with XDP App App App

slide-6
SLIDE 6

Network Platforms Group

Features We Cannot Use

  • SR-IOV
  • User-space drivers
  • Pinned cores & memory
  • Busy-polling
  • Huge pages
  • Shared memory
  • 1-to-1 virtual to physical mappings
  • >1 crossing user/kernel-space
  • Monolithic SW
  • Custom kernel modules
  • Complete kernel bypass
  • Hard-coded platform

6

  • HW agnostic – Linux APIs only
  • Fault isolation
  • Restartability
  • Multiple SW versions
  • Upgradeable during run-time
  • Many processes per core
  • Power save
  • All security features working
  • Debuggable & observeable
  • Routing/Switching in kernel
  • Binary compatibility
  • Works on any standard Linux

DESIRED NOT AN OPTION

slide-7
SLIDE 7

Network Platforms Group

Linux NIC features << Features of HW NIC

In Linux we need to develop:

  • Metadata and offloadning support for XDP & AF_XDP
  • Supporting accelerators
  • Making it easy to orchestrate and control
  • Managing both the fast path and the slow path (Linux networking stack) using the

Linux stack control plane

  • Slicing up a netdev with real HW queues
  • Preallocating AF_XDP memory for the containers using Kubernetes
  • Queue management
  • For deployment at scale
  • Packet access library designed for cloud-native and Linux

7

slide-8
SLIDE 8

Network Platforms Group

Metadata and Offloading

  • No mbuf or skbuf needed. Access metadata directly
  • Only pay for the metadata you use
  • XDP has a JIT, so can be done in run-time
  • AF_XDP needs to dynamically link at bind() time or use an offset table
  • Accelerators probably will use io_uring. How to support metadata there?

8

struct metadata { u64 rx_timestamp; u16 ipv4_hdr; u16 ipv6_hdr; bool udp_chk_sum; }; struct metadata { u64 rx_timestamp; u16 ipv4_hdr; };

SW HW

struct metadata { u16 ipv4_hdr; u8 pad[32]; u64 rx_timestamp; };

BTF

Binary: movq $0x2061,(%rsi) mov 0x24(%rdi),%eax movl $0x50035,0x8(%rsi) movq $0x100f,0x20(%rsi)

Compiler

slide-9
SLIDE 9

Network Platforms Group

Controlling the Fast Path from Linux

  • Linux control path sets up actions in HW and/or XDP
  • XDP when HW does not support the action
  • All packets pass XDP
  • Use helpers in XDP
  • Reads kernel state or metadata from NIC
  • But not many of these exists today

9

Slow Path NIC Linux

Stack XDP

Fast Path

xdp_action xdp_program() { ip_src = extract_ipv4_src_addr(); ip_dst = extract_ipv4_dst_addr(); : bpf_route_lookup(ip_src, ip_dst,...); route_to_dst(); };

slide-10
SLIDE 10

Network Platforms Group

Linux

Facilitating Kubernetes Orchestration

  • AF_XDP needs a netdev with real HW queues
  • How to create one of those?
  • Use Macvlan with add_station support?
  • Pod needs to have all AF_XDP memory areas preallocated
  • Launch a ”pre-process” that then forks off a child that becomes the pod

10

netdev netdev netdev netdev

Pod

netdev

slide-11
SLIDE 11

Network Platforms Group

Queue Management: The Focus

11

Two problems: Splitting up queues between PFs and VFs in a device Allocating and freeing queues within a netdev

Queues VFs PFs PF VF VF 64 Q 16 Q 16 Q PF 48 Q VF 16 Q PF 48 Q netdev 48 Q netdev Linux stack XDP app AF_XDP app

slide-12
SLIDE 12

Network Platforms Group

Queue Management: The Focus

12

Two problems: Splitting up queues between PFs and VFs in a device Allocating and freeing queues within a netdev

Queues VFs PFs PF VF VF 64 Q 16 Q 16 Q PF 48 Q VF 16 Q PF 48 Q netdev 48 Q netdev Linux stack XDP app AF_XDP app

slide-13
SLIDE 13

Network Platforms Group

Kernel Design Overview

13

  • New alloc and free ndo:s in driver needed
  • Tie into existing interfaces, e.g. netif_set_real_num_rx_queues()
  • Qids can be decided by driver
  • For backwards compatibility and encoding queue types
  • When used in conjunction with netdev slicing => custom netdevs

Queue Manager Device Drivers Linux Stack XDP AF_XDP / Libbpf / Ethtool NETLINK

slide-14
SLIDE 14

Network Platforms Group

Cloud-Native Packet Access Library

Important properties:

  • All drivers in kernel space
  • Set of small shared libraries
  • No HW exposed to user space
  • Does not force a platform on the users
  • No config, launch, or run-time environment in libraries
  • Works in both processes and threads in any configuration
  • No mbuf or the likes exposed to the application
  • Applications cannot crash each other
  • Debugability, observability and testability from day one
  • First optimized for ease-of-use and the right functionality, then optimize for

performance

14

App NIC + Accelerators Linux

AF_XDP Io_uring Virtio-net mempool pkt access crypto

slide-15
SLIDE 15

Network Platforms Group

Conclusions

  • Cloud-native ≠ appliance or virtual machine
  • Most of the challenges solved by having all drivers in the kernel
  • But Linux is not ready for this:
  • Metadata and offloading
  • Controlling the data plane from the Linux stack
  • Orchestration support: splitting up netdevs
  • Queue management
  • New requirements on packet access libraries
  • Do we evolve DPDK or do we need a new packet library?

15

slide-16
SLIDE 16