28
VPP Host Stack Transport and Session Layers Florin Coras, Dave Barach, Keith Burns, Dave Wallace

VPP Host Stack - FD.io

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: VPP Host Stack - FD.io

VPPHostStackTransportandSessionLayers

FlorinCoras,DaveBarach,KeithBurns,DaveWallace

Page 2: VPP Host Stack - FD.io

EFFICIENCY

PERFORMANCE

SOFTWARE DEFINED NETWORKING

CLOUD NETWORK SERVICES

LINUX FOUNDATION

VPP - AUniversalTerabitNetworkPlatformForNativeCloudNetworkServices

Superior Performance

Most Efficient on the Planet

Flexible and Extensible

Open Source

Cloud Native

Breaking the Barrier of Software Defined Network Services1 Terabit Services on a Single Intel® Xeon® Server !

Page 3: VPP Host Stack - FD.io

Motivation:Containernetworking

FD.ioMini-SummitatKubeCon2017

FIFO

TCP

IP(routing)

device

send()

FIFO

TCP

IP(routing)

device

recv()

kernel

glibc

PID1234 PID4321

Page 4: VPP Host Stack - FD.io

Motivation:Containernetworking

FIFO

PID1234

TCP

IP(routing)

device

send()

FIFO

PID4321

TCP

IP(routing)

device

recv()

FIFO

device

FIFO

device

VPP

af_packet

etc etc etcACL,SR,VXLAN,LISP

IP4/6MPLS

Ethernet

dpdk

dpdk

device

af_packet

FD.ioMini-SummitatKubeCon2017

Page 5: VPP Host Stack - FD.io

Whynotthis?

PID1234 PID4321

recv()

FIFOFIFO

TCP

IP

DPDK

send()

Session

FD.ioMini-SummitatKubeCon2017

VPP

Page 6: VPP Host Stack - FD.io

VPPHostStack

FD.ioMini-SummitatKubeCon2017

Session

App

BinaryAPI

TCP

IP,DPDK

VPP

shmsegmentrx tx

Page 7: VPP Host Stack - FD.io

VPPHostStack:SessionLayer

FD.ioMini-SummitatKubeCon2017

Session

App

BinaryAPI

TCP

IP,DPDK

VPP

§ Maintainsperappstateandconveysto/fromsessionevents

§ Allocatesandmanagessessions/segments/fifos§ Isolatesnetworkresourcesvianamespacing§ Sessionlookuptables(5-tuple)andlocal/global

sessionruletables(filters)§ Supportforpluggabletransportprotocols§ Binary/nativeCAPIforexternal/builtin

applications

shmsegmentrx tx

Page 8: VPP Host Stack - FD.io

VPPHostStack:SVMFIFOs

FD.ioMini-SummitatKubeCon2017

Session

App

BinaryAPI

TCP

IP,DPDK

VPP

§ Allocatedwithinsharedmemorysegments§ Fixedpositionandsize§ Lockfreeenqueue/dequeue butatomicsize

increment§ Optiontodequeue/peekdata§ Supportforout-of-orderdataenqueues

shmsegmentrx tx

Page 9: VPP Host Stack - FD.io

VPPHostStack:TCP

FD.ioMini-SummitatKubeCon2017

Session

App

BinaryAPI

TCP

IP,DPDK

VPP

shmsegmentrx tx

§ Clean-slateimplementation§ “Complete”statemachineimplementation§ Connectionmanagementandflowcontrol

(windowmanagement)§ Timersandretransmission,fastretransmit,SACK§ NewReno congestioncontrol,SACKbasedfast

recovery§ Checksumoffloading§ LinuxcompatibilitytestedwithIWLTCPprotocol

tester

Page 10: VPP Host Stack - FD.io

VPPHostStack:Comms Library(VCL)

FD.ioMini-SummitatKubeCon2017

Session

App

BinaryAPI

TCP

IP,DPDK

VPP

§ Comms library(VCL)appscanlinkagainst§ LD_PRELOADlibraryforlegacyapps§ epoll

shmsegmentrx tx

Page 11: VPP Host Stack - FD.io

ApplicationAttachment

FD.ioMini-SummitatKubeCon2017

Session

App

TCP

IP,DPDK

VPP

attachbind(server)connect(client)

BinaryAPI

shmsegment

Page 12: VPP Host Stack - FD.io

SessionEstablishment

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Session

Server

TCP

IP,DPDK

VPP

BinaryAPI BinaryAPI

attachbind

listen

Page 13: VPP Host Stack - FD.io

SessionEstablishment

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Session

Server

TCP

IP,DPDK

VPP

BinaryAPI

attachconnect

open

BinaryAPI

attachbind

listen

Page 14: VPP Host Stack - FD.io

SessionEstablishment

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Session

Server

TCP

IP,DPDK

VPP

BinaryAPI

handshake

BinaryAPI

Page 15: VPP Host Stack - FD.io

SessionEstablishment

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Session

Server

TCP

IP,DPDK

VPP

BinaryAPI

handshake

BinaryAPI

newclientconnectsucceeded

Page 16: VPP Host Stack - FD.io

SessionEstablishment

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Session

Server

TCP

IP,DPDK

VPP

BinaryAPI

connectreply

BinaryAPI

acceptnotifyshm

segmentshm

segmentrx tx rx tx

Page 17: VPP Host Stack - FD.io

DataTransfer

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Session

Server

TCP

IP,DPDK

VPP

read

copytobuffer copytofifo

rx tx rx tx

write

CongestioncontrolReliabletransport

BinaryAPI

tx writeevt

BinaryAPI

rx writeevt

Page 18: VPP Host Stack - FD.io

DataTransfer

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Session

Server

TCP

IP,DPDK

VPP

read

copytobuffer copytofifo

rx tx rx tx

write

CongestioncontrolReliabletransport

BinaryAPI

tx writeevt

BinaryAPI

rx writeevt

NotyetpartofCSITbutsomeroughnumbersonaE2690:~200kCPSand~12Gbps/core!

Page 19: VPP Host Stack - FD.io

RedirectedConnections(Cut-through)

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Server

bindBinaryAPI

Page 20: VPP Host Stack - FD.io

RedirectedConnections(Cut-through)

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Server

redirectBinaryAPI

connect

Page 21: VPP Host Stack - FD.io

RedirectedConnections(Cut-through)

FD.ioMini-SummitatKubeCon2017

Session

Client

TCP

IP,DPDK

VPP

Server

redirectBinaryAPI

connect

Throughputismemorybandwidthconstrained:~120Gbps!

Page 22: VPP Host Stack - FD.io

Multi-threading

FD.ioMini-SummitatKubeCon2017

Session

App1

BinaryAPI

Session

DPDK

rx tx rx tx

TCP

IP

TCP

IP

Core0 Core1

§ Connections/sessions’pinned’toathread

§ Per-threaddatastructures/state

Page 23: VPP Host Stack - FD.io

Features:Namespaces

FD.ioMini-SummitatKubeCon2017

Session

App

BinaryAPI

TCP

VPP

Session

TCP

Session

TCP

IP IP IP

ns1 ns2 ns3

fib1 fib2

Requestaccesstovpp ns+secret

Namespacesareconfiguredindependentlyandassociateapplicationstonetworklayerresourceslikeinterfacesandfibtables

Page 24: VPP Host Stack - FD.io

Features:SessionTables

FD.ioMini-SummitatKubeCon2017

NSLocalSessionTable

BinaryAPI

TCP

NSLocalSessionTable

TCP

ns1 ns2

fib1

GlobalSessionTable

App1

Requestaccesstoglobaland/orlocalscope

Page 25: VPP Host Stack - FD.io

Features:SessionTables

FD.ioMini-SummitatKubeCon2017

NSLocalSessionTable

BinaryAPI

TCP

NSLocalSessionTable

TCP

ns1 ns2

fib1

GlobalSessionTable

§ Bothtablehave“rulestable”thatcanbeusedforfiltering

§ Localtablesarenamespacespecificandcanbeusedforegressfiltering

§ Globaltablesarefibtablespecificandcanbeusedforingressfiltering

App1

Page 26: VPP Host Stack - FD.io

Ongoingwork

• Overallintegrationwithk8s• Istio/Envoy

• TCP• Rxpolicer/tx pacer• TSO• Newcongestioncontrolalgorithms• PMTUdiscovery• Optimization/hardening/testing

• VCL/LD_PRELOAD• Iperf,nginx,wget,curl

FD.ioMini-SummitatKubeCon2017

Page 27: VPP Host Stack - FD.io

• GettheCode,BuildtheCode,RuntheCode• Sessionlayer:src/vnet/session• TCP:src/vnet/tcp• SVM:src/svm• VCL:src/vcl

• Read/WatchtheTutorials

• Read/WatchVPPTutorials• JointheMailingLists

FD.ioMini-SummitatKubeCon2017

Nextsteps– Getinvolved

Page 28: VPP Host Stack - FD.io

Thankyou!

FD.ioMini-SummitatKubeCon2017

? FlorinCorasemail:([email protected])irc:florinc