SlideShare a Scribd company logo
Sabyasachi	Sengupta,	Nokia	
[sabyasachi.sengupta@nuagenetworks.net]	
	
DPDK	Summit	-	San	Jose	–	2017	
Linux	FoundaIon	
DPDK with KNI – Pushing the
Performance of an SDWAN gateway to
Highway Limits
#DPDKSummit
2#DPDKSummit
Agenda
u  IntroducIon	–	2	mins	
u  Understanding	a	typical	SDWAN	Ecosystem,	SDWAN	gateway,	Key	Performance	Requirements,	Why	
DPDK?	
u  SoluIon	Overview	–	3	mins	
u  Dedicated	DPDK	apvs	OVS-DPDK,	KNI	
u  SoluIon	Design	with	DPDK	–	5	mins	
u  SoYware	Architecture,	High-level	design,	Component	Design	&	Threading	Model,	ConfiguraIon	
Management	
u  The	Big	Picture	–	3	mins	
u  Addressing	SDWAN	gateway	requirements	
u  Conclusion	–	2	mins	
u  Current	status,	Future	Work,	Credits,	Further	Reading	&	Q/A
3#DPDKSummit
u  IntroducIon	–	2	mins	
u  Understanding	a	typical	SDWAN	Ecosystem,	SDWAN	gateway,	Key	Performance	
Requirements,	Why	DPDK?	
u  SoluIon	Overview	
u  SoluIon	Design	with	DPDK	
u  The	Big	Picture	
u  Conclusion
4
Understanding the SDWAN Ecosystem
u  SoYware	Defined	WAN	is	centered	around	a	gateway	(usually	a	COTS	hardware)	through	which	a	branch	
connects	with	other	branches	and	its	Enterprise	Data	center	through	IPSEC	enabled	broadband.	
u  SDWAN	gateway	is	centrally	managed	by	Zero	Touch	Provisioning	(ZTP)	and	oYen	needs	to	provide	high	
speed	throughput.	
u  The	gateway	hardware	comprises	of:	
u  One	or	two	ports	face	the	WAN	side	(aka	uplink),	can	support	high	speed	Internet	(each	port	can	be	10Gbps	Full	Duplex)	
u  Remaining	ports	face	the	LAN	side	(aka	access	link),	usually	can	be	Gigabit	Ethernet	–	connects	directly	to	hosts	or	other	
switches/routers	depending	on	the	size	of	the	branch	
u  The	gateway	soYware	usually:	
u  Runs	Linux	base	OS	(customized	Redhat,	Centos	or	Ubuntu)	
u  VirtualizaIon	soYware	for	supporIng	VNFs	
u  Virtual	Switch	(viz.	Open	vSwitch)	–	for	switching	packets	to	other	overlay	and	underlay	desInaIons	(local	and/or	
remote	to	the	branch)
5
The SDWAN Ecosystem
A Simplified Illustration
Hardware Switch
Branch #N
Machine
Machine
Machine
Machine
Machine
Machine
Access Links
SDWAN Gateway
Hardware Switch
Branch #1
Machine
Machine
Machine
Machine
Machine
Machine
Access Links
SDWAN Gateway
Data Center
(private cloud)
Data Center
(public cloud)
CMS
(openstack/
neutron plugin)
Openflow Controller
Border
Gateway
Border
Gateway
Access Links(Wired/Wireless) - LAN
Uplinks (Broadband IPSEC enabled) – WAN – data traffic
Legend
WAN – control traffic (openflow, JSON)
LAN side ports (usually 1GbE)
WAN side ports (can be upto 10GbE)
ovs-vswitchd
openvswitch.ko & kernel network stack
SDWAN gateway CoTS hardware (x86)
6
Some SDWAN Datapath Considerations
u  For	an	Enterprise	Branch,	the	SDWAN	gateway	must	be	capable	of	high	
speed	data	transfer.	For	cheaper	capacity,	Enterprises	are	adding	
Broadband	links	to	MPLS.	OYen	a	hybrid	approach.	This	means:	
u  Consistency	of	Performance	–	provide	QoS	(rate	limiIng	and	policing)	
u  According	to	IDC,	“Today	40-60%	of	Enterprise	data	is	migraIng	between	WAN	to	
the	Internet”	
u  Example:	Voice	and	Video	Streaming	capability	across	the	WAN	between	hosts	in	
different	branches	and	main	office	
u  As	data	is	transferred	across	broadband,	security	is	the	key	
u  Typically	done	through	Group	Key	Exchange	–	each	gateway	acts	as	an	IPSEC	end	
point.
7
Why DPDK?
Limita&ons	of	Kernel	based	forwarding	
u  Using	Linux	Kernel	for	high	speed	data	path	
typically	has	some	inherent	issues:	
u  Linux	Kernel	default	pagesize:	4K	
u  This	means	for	every	three	packets	(1500	MTU)	there	
could	be	a	page	fault.	During	large	number	of	packets	
processed,	this	could	introduce	lot	of	delay.	
u  No	dedicated	resources	for	packet	processing	
u  CPU	and	memory	(pages)	shared	with	rest	of	system	
u  All	ports	are	kernel	managed	
u  Packets	arrive	in	kernel’s	network	stack	and	passes	
through	several	layers	of	kernel	before	reaching	virtual	
switch	(Open	vSwitch).	This	can	introduce	boqlenecks.	
u  First	packet	given	to	OVS	user	space	for	openflow	rules	
table	consultaIon	leading	to	more	boqlenecks.	
u  Result:	even	though	SDWAN	gateway	has	20G	
uplink,	it	cannot	meet	the	performance	
requirements!
8
Why DPDK?
Limita&ons	of	Kernel	based	forwarding	
u  Using	Linux	Kernel	for	high	speed	data	path	
typically	has	some	inherent	issues:	
u  Linux	Kernel	default	pagesize:	4K	
u  This	means	for	every	three	packets	(1500	MTU)	there	
could	be	a	page	fault.	During	large	number	of	packets	
processed,	this	could	introduce	lot	of	delay.	
u  No	dedicated	resources	for	packet	processing	
u  CPU	and	memory	(pages)	shared	with	rest	of	system	
u  All	ports	are	kernel	managed	
u  Packets	arrive	in	kernel’s	network	stack	and	passes	
through	several	layers	of	kernel	before	reaching	virtual	
switch	(Open	vSwitch).	This	can	introduce	boqlenecks.	
u  First	packet	given	to	OVS	user	space	for	openflow	rules	
table	consultaIon	leading	to	more	boqlenecks.	
u  Result:	even	though	SDWAN	gateway	has	20G	
uplink,	it	cannot	meet	the	performance	
requirements!	
Advantages	of	DPDK	
u  DPDK	supports	larger	pagesize:	
u  2M	or	1G	hugepages	
u  DPDK	allows	dedicated	resources	
aqached	to	network	ports	(PMD).	Also	
memory	can	set	aside	for	packet	
processing.	
u  DPDK	allows	packets	to	be	received	
directly	in	the	user	space	using	PMD	
u  What	is	specifically	needed	for	SDWAN?	
u  Add	IPSEC	capability	
u  Add	QoS	capability
9#DPDKSummit
u  IntroducIon	
u  SoluIon	Overview	–	3	mins	
u  Dedicated	DPDK	app	vs	OVS-DPDK,	KNI	
u  SoluIon	Design	with	DPDK	
u  The	Big	Picture	
u  Future	Work	&	Conclusion
10
The Need for a Dedicated DPDK app
Current State of Art Analysis
u  Open	vSwitch	has	integrated	DPDK	(ovs-dpdk)	as	an	Userspace	Datapath	
u  The	main	bridge	is	configured	with	datapath_type=netdev,	which	indicates	packets	are	processed	in	
user	space	instead	of	Linux	kernel	
u  Devices	can	be	added	to	ovsdb	with	Interface	type=dpdk	and	subsequently	a	PMD	thread	is	spawned	
for	polling	packets	
u  In	SDWAN	environment,	this	means	a	single	virtual	switch	applicaIon	(ovs-vswitchd)	will	have	all	
capabiliIes	of	slow	path	(first	packet	processing	for	virtual	switch	features)	as	well	as	fast	path	
(subsequent	packets).	What	if?	
u  Virtual	Switch	app	that	gets	periodically	refreshed	by	SDWAN	vendors	for	new	soYware	features	have	a	
soYware	glitch	and	crashes?	Can	we	afford	to	be	disconnected	from	the	gateway?	What	are	our	opIons?	
u  What	about	featureset	like	IP-tables	(firewalling),	connecIon	tracking	etc?	Currently	these	are	
implemented	by	kernel.	
u  Boqom-line:	can	we	have	best	of	both	worlds?
11
KNI as The Missing Link!
u  Kernel	Network	Interface	is	a	programming	technique	provided	by	DPDK	
u  KNI	queues	allow	draining	of	packets	between	DPDK	app	(vrs-dpdk-datapath)	to/from	
kernel	
u  A	set	of	KNI	queues	(slave	network	devices)	that	are	aqached	to	a	DPDK	port	
u  Associate	them	with	same	MAC	addresses	
u  Abstracted	by	dpdk_bondX	device,	where	X	=	DPDK	managed	port	ID	
u  Upsides:	
u  Leverage	OVS	for	all	slow-path	and	basic	virtual	switching	funcIonaliIes	as	packets	arriving	
from	WAN	can	be	fed	into	kernel	resident	openvswitch	flow	tables	
u  Leverage	kernel	for	all	IPtables	and	conntrack	funcIonaliIes	
u  Downsides:	
u  SIll	introduces	a	copy	between	kernel	and	DPDK	app	–	cannot	be	avoided	
u  Agreed,	but	experimental	data	shows	KNIs	are	rather	fast!!
12#DPDKSummit
u  IntroducIon	
u  SoluIon	Overview	
u  SoluIon	Design	with	DPDK	–	5	mins	
u  SoYware	Architecture,	High-level	design,	Component	Design	&	Threading	Model,	
ConfiguraIon	Management	
u  The	Big	Picture	
u  Conclusion
13
High Level Architecture
alubr0
(ovs-vswitchd)
openvswitch.ko
Kernel TCP/IP rte_kni.ko
DPDK Library
7
6
2
3
1
2
3
4
A
KNI
1
2
3
4 5
6
8
7
7
vrs-dpdk-datapath
(DPDK application)
4
User Space
Kernel Space
A
Main Thread
Receive Processing
Transmit Processing
NW to Access Traffic Path
Access to NW Traffic Path
Classifier/Flow Table
QAT (ingress)
NW/A Pipeline
A/NW Pipeline
Access vLAN VPORT
Uplink VPORT (tunnel)
Physical Port (Access/Uplink)
1 QAT (egress)
2 UDP/Mac Encap
3 QoS
4 Fragmentation
LEGEND
N NW/A Packet Hop
N A/NW Packet HopControl Path (netlink)
libopenvswitch (ovs-2.5+)
libvrs-dpdk 5
81
Kernel Flow Table for switching
14
Software Architecture
libdpdk.a
libopenvswitch-netdev
libopenvswitch-netdev-dpdk
vrs-dpdk-datapath-device
libopenvswitch-dpif-netdev
libopenvswitch-flow
vrs-dpdk-datapath-flow
libopenvswitch-netlink
vrs-dpdk-datapath-cfg-mgr
libopenvswitch-unixctl
vrs-dpdk-datapath-unixctl
vrs-dpdk-datapath-main
rte_kni.ko
User Space
Kernel Space
vrs-dpdk-datapath component – DPDK application code (Nokia developed)
DPDK SDK (upgraded to support DPDK-17.02 – DPDK LTS)
Open vSwitch library code
LEGEND
vrs-dpdk-datapath-qos
vrs-dpdk-datapath-qat
vrs-dpdk-datapath
(DPDK app)
igb_uio.ko
15
Component Design & Threading Model
vrs-dpdk-datapath
Plugin Manager vrs-dpdk-datapath
Device Manager
(PMD & KNI)
vrs-dpdk-datapath
Configuration Manager
Plugins
(IPSec, Arp Snooper, QoS)
vrs-dpdk-datapath
Unixctl Manager
vrs-dpdk-datapath
Flow Manager
Flow
Table
PMD Thread (RX/TX)
KNI Thread (RX/TX)
Main Thread (RX/TX) Physical Port Queue
KNI Kernel Queues
LEGEND
Kernel RX/TX
(rte_kni.ko)
Netlink
messaging
(with ovs-
vswitchd)
Flow
Table
vrs-dpdk-datapath (DPDK app)
Port1 (dpdk0)
dpdk_bond0
16
Security Configuration Management
ovs-vswitchd
IPSEC Key Server
XFRM modules
(xfrm4_tunnel, xfrm_ipcomp)
vrs-dpdk-datapath
Flow Tables
(IPSEC_POLICY_TABLE,
IPSEC_KEYS_TABLE)
XFRM_MSG_NEWPOLICY
XFRM_MSG_NEWSA
XFRM_MSG_DELPOLICY
XFRM_MSG_DELSA
XFRM_MSG_GETPOLICY
XFRM_MSG_GETSA
XFRM_MSG_GETPOLICY
XFRM_MSG_GETSA
XFRM_MSG_NEWPOLICY
XFRM_MSG_NEWSA
XFRM_MSG_DELPOLICY
XFRM_MSG_DELSA
VSD UI (IPSec Policy Configuration)
User Space
Kernel
Controller (VSC)
nuage-rpc
nuage-nsg-ipsec-cfg
ALUFF_FLOW_ECMP_ROUTE
OFPTYPE_IPSEC_POLICY_MOD
JSON
OFPTYPE_IPSEC_SEED_UPDATE
Netlink with Kernel Datapath
Netlink with DPDK Datapath
Legend
17#DPDKSummit
u  IntroducIon	
u  SoluIon	Overview	
u  SoluIon	Design	with	DPDK	
u  The	Big	Picture	–	3	mins	
u  Addressing	SDWAN	gateway	requirements	
u  Conclusion
18
Meeting SDWAN gateway specific
requirements
u  Enabling/Disabling	DPDK	on	WAN	ports	in	the	gateway	
u  Could	be	dynamically	done	through	SDN	UI	by	Icking	off	Network	Accelera@on	
u  DPDK	app	starts,	sets	up	hugeTLB	pages,	scans	PCI	bus	and	configures	DPDK	ports	from	list	of	whitelisted	devices	
u  Note:	SDWAN	gateways	should	NOT	have	downImes,	meaning	“no	reboots”	or	traffic	loss	while	enabling/disabling	
DPDK	
u  SDWAN	gateway	underlay	networking	configuraIon	
u  DPDK	enabled	WAN	ports	get	their	IP	addresses	automaIcally	from	DHCP	server	
u  DHCP	server	works	seamlessly:	modificaIon	in	KNI	infra	to	ensure	rte_kni_alloc	accepts	and	assigns	DPDK	physical	
port’s	mac	address	
u  Network	Manager	hooks	added	to	setup	underlay	IP	tables	and	routes	
u  Tuning	gateway	for	best	results	
u  Need	to	judiciously	balance	IRQs	so	as	to	ensure	KNIs	get	enough	cores	and	PMD	threads	get	full	CPU	cycles	
u  Other	interesIng	configuraIons	in	KNI	devices:	Packet	Steering	Parameters	(rps_cpus/xps_cpus)	in	/proc,	txqlen,	
ring	parameters
19
DPDK Profiles – Monetization opportunity!
Profile #
PMD /
uplink
# KNI /
uplink
Usage
Normal (Small) 1 1 Regular (day-to-day) processing
Accelerated (Medium) 1 3 Encrypt/decrypt happens in same PMD thread.
Three KNIs drain packets from PMD. Useful for
higher workload than regular profile.
Performance (Large) 2 4 One dedicated CPU (core) each for encrypt
and decrypt of packets, four KNIs associated
with each uplink. Excellent throughput (upto
7Gbps HD) – useful for high performance WAN
traffic (voice/video).
•  Customers can enable Profiles dynamically at Cloud Director UI and add / remove CPU allocation
•  Switching from one profile to another often works seamlessly without gateway reboots!
•  Just a restart of the DPDK application.
20
Branch–Cloud–Branch: DPDK everywhere!!
Branch-F
Branch-A
Branch-B
Branch-C
Branch-D
Branch-E
vrs-dpdk-datapath
Cloud
(Enterprise Datacenter)
SDWAN border GW w/ 10G ports
Branch Hosts
Internet Router (Juniper MX,
ALU SR7550 etc)
1G FD link (LAN)
10G FD IPSEC Broadband
LEGEND
1G FD IPSEC Broadband
SDWAN branch GW
Stitching together disjoint
underlays (terminates and
reistarts IPSEC across WANs)
21#DPDKSummit
u  IntroducIon	
u  SoluIon	Overview	
u  SoluIon	Design	with	DPDK	
u  The	Big	Picture	
u  Conclusion	–	2	mins	
u  Current	status,	Future	Work,	Credits,	Further	Reading	&	Q/A
22
Current State & Future Work
u  Current	status	
u  Upto	7Gbps	Half	Duplex	with	IPSEC	on	10Gbps	WAN	link	
u  Highway:	55mph,	Freeway:	65+	mph	
u  That	copy	between	user	space	and	kernel	space!	
u  Kernel	IRQ	processing	becomes	the	boqleneck	aYer	that	rate	
u  SIll	way	way	beqer	than	original:	~2Gbps	H/D	with	IPSEC	on	10Gbps	WAN	link	
u  SoluIon:	
u  Move	all	LAN	side	ports	to	DPDK.	
u  vrs-dpdk-datapath	app	acts	as	fastpath	app	and	sends	first	packet	to	the	slow	path	ovs-vswitchd	app	
u  Implement	flow	cache	inside	vrs-dpdk-datapath	along	with	the	pipeline.
23
Credits
u  Engineering	
u  Sabyasachi	Sengupta	– sabyasachi.sengupta@nokia.com	-	SDWAN	ecosystem	&	DPDK/OVS	Infrastructure	
u  Paul	Hong	– paul.hong@nokia.com	-	DPDK	Plugin	Management	Infrastructure	
u  Limin	Wang	– limin.wang@nokia-bell-labs.com	-	IPSEC	plugin,	FragmentaIon	
u  Ravilochan	Shamanna	– ravilochan.samanna@nokia.com	-	IPSEC	plugin	
u  John	Shirron	– john.shirron@nokia.com	-	QoS	plugin	
u  Rohit	PaIl	Bagli	– rohit.paIl-bagli@nokia.com	-	FuncIonal	test	
u  Priyanka	Kumar	– priyanka.kumar@nokia.com	-	FuncIonal	test	
u  Ankush	Singh	– ankush.singh@nokia.com	-	Performance	test	
u  Product	Management	
u  Prasad	Nellipudi	– prasad.nellipudi@nokia.com	
u  Program	Management	
u  Raymond	Zhang	– raymond.zhang@nokia.com
24
References
u  Nuage	Networks	SDWAN	Brochure	
u  hqp://www.nuagenetworks.net/wp-content/uploads/2015/04/
PR1503009766_NN_VNS_Extensible_Wide_Area-Networking_Brochure.pdf

More Related Content

PDF
LF_DPDK17_Integrating and using DPDK with Open vSwitch
PDF
LF_DPDK17_Serverless DPDK - How SmartNIC resident DPDK Accelerates Packet Pro...
PDF
LF_DPDK17_Accelerating NFV with VMware's Enhanced Network Stack (ENS) and Int...
PDF
LF_DPDK17_Power Aware Packet Processing
PDF
LF_DPDK17_OpenNetVM: A high-performance NFV platforms to meet future communic...
PDF
LF_DPDK17_SafetyOrange - a tiny server class multi-purpose box with DPDK
PDF
LF_DPDK_DPDK as microservices in ZTE Paas
PDF
LF_DPDK17_DPDK support for new hardware offloads
LF_DPDK17_Integrating and using DPDK with Open vSwitch
LF_DPDK17_Serverless DPDK - How SmartNIC resident DPDK Accelerates Packet Pro...
LF_DPDK17_Accelerating NFV with VMware's Enhanced Network Stack (ENS) and Int...
LF_DPDK17_Power Aware Packet Processing
LF_DPDK17_OpenNetVM: A high-performance NFV platforms to meet future communic...
LF_DPDK17_SafetyOrange - a tiny server class multi-purpose box with DPDK
LF_DPDK_DPDK as microservices in ZTE Paas
LF_DPDK17_DPDK support for new hardware offloads

What's hot (20)

PDF
LF_DPDK17_Accelerating P4-based Dataplane with DPDK
PDF
LF_DPDK17_Event Adapters - Connecting Devices to Eventdev
PDF
LF_DPDK_Mellanox bifurcated driver model
PDF
LF_DPDK17_Abstract APIs for DPDK and ODP
PDF
LF_DPDK17_GRO/GSO Libraries: Bring Significant Performance Gains to DPDK-base...
PDF
LF_DPDK17_ OpenVswitch hardware offload over DPDK
PDF
DPDK Summit 2015 - Sprint - Arun Rajagopal
PPTX
Software Stacks to enable SDN and NFV
PPTX
Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...
PDF
Accelerate Service Function Chaining Vertical Solution with DPDK
PPTX
6WIND - SPEED MATTERS: The Challenge 2014 Contest Winners
PDF
OVS and DPDK - T.F. Herbert, K. Traynor, M. Gray
PDF
DPDK Summit - 08 Sept 2014 - 6WIND - High Perf Networking Leveraging the DPDK...
PDF
LF_DPDK17_Community Survey Feedback
PDF
Performance challenges in software networking
PDF
Scaling the Container Dataplane
PDF
DPACC Acceleration Progress and Demonstration
PPTX
6WINDGate™ - Powering the New-Generation of IPsec Gateways
PPTX
High Performance Networking Leveraging the DPDK and Growing Community
PPSX
FD.io Vector Packet Processing (VPP)
LF_DPDK17_Accelerating P4-based Dataplane with DPDK
LF_DPDK17_Event Adapters - Connecting Devices to Eventdev
LF_DPDK_Mellanox bifurcated driver model
LF_DPDK17_Abstract APIs for DPDK and ODP
LF_DPDK17_GRO/GSO Libraries: Bring Significant Performance Gains to DPDK-base...
LF_DPDK17_ OpenVswitch hardware offload over DPDK
DPDK Summit 2015 - Sprint - Arun Rajagopal
Software Stacks to enable SDN and NFV
Using SmartNICs to Provide Better Data Center Security - Jack Matheson - 44CO...
Accelerate Service Function Chaining Vertical Solution with DPDK
6WIND - SPEED MATTERS: The Challenge 2014 Contest Winners
OVS and DPDK - T.F. Herbert, K. Traynor, M. Gray
DPDK Summit - 08 Sept 2014 - 6WIND - High Perf Networking Leveraging the DPDK...
LF_DPDK17_Community Survey Feedback
Performance challenges in software networking
Scaling the Container Dataplane
DPACC Acceleration Progress and Demonstration
6WINDGate™ - Powering the New-Generation of IPsec Gateways
High Performance Networking Leveraging the DPDK and Growing Community
FD.io Vector Packet Processing (VPP)
Ad

Similar to LF_DPDK17_DPDK with KNI – Pushing the Performance of an SDWAN Gateway to Highway Limits! (20)

PPTX
DPDK KNI interface
PPTX
High performace network of Cloud Native Taiwan User Group
PDF
DPDK In Depth
PPTX
G rpc talk with intel (3)
PPTX
Introduction to DPDK
PDF
Building the SD-Branch using uCPE
PPT
Open Networking through Programmability
PDF
Introduction to OpenNetwork and SDN
PDF
How to Speak Intel DPDK KNI for Web Services.
PDF
Data Plane Development Kit A Guide To The User Spacebased Fast Network Applic...
PDF
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
PDF
DPDK: Multi Architecture High Performance Packet Processing
PDF
7 hands on
PDF
Introduction to Software Defined WANs
PDF
Network Programming: Data Plane Development Kit (DPDK)
PDF
Linux Kernel vs DPDK: HTTP Performance Showdown
PPTX
Week_3.pptxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
PDF
PDF
mSwitch: A Highly-Scalable, Modular Software Switch
PDF
Platforms for Accelerating the Software Defined and Virtual Infrastructure
DPDK KNI interface
High performace network of Cloud Native Taiwan User Group
DPDK In Depth
G rpc talk with intel (3)
Introduction to DPDK
Building the SD-Branch using uCPE
Open Networking through Programmability
Introduction to OpenNetwork and SDN
How to Speak Intel DPDK KNI for Web Services.
Data Plane Development Kit A Guide To The User Spacebased Fast Network Applic...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK: Multi Architecture High Performance Packet Processing
7 hands on
Introduction to Software Defined WANs
Network Programming: Data Plane Development Kit (DPDK)
Linux Kernel vs DPDK: HTTP Performance Showdown
Week_3.pptxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
mSwitch: A Highly-Scalable, Modular Software Switch
Platforms for Accelerating the Software Defined and Virtual Infrastructure
Ad

More from LF_DPDK (19)

PDF
LF_DPDK17_DPDK's best kept secret – Micro-benchmark performance tests
PDF
LF_DPDK17_Lagopus Router
PDF
LF_DPDK17_DPDK Membership Library
PDF
LF_DPDK17_testpmd: swissknife for NFV
PDF
LF_DPDK17_Make DPDK's software traffic manager a deployable solution for vBNG
PDF
LF_DPDK17_DPDK on Microsoft Azure
PDF
LF_DPDK17_VPP Host Stack
PDF
LF_DPDK17_Accelerating Packet Processing with FPGA NICs
PDF
LF_DPDK17_rte_security: enhancing IPSEC offload
PDF
LF_DPDK17_Enabling hardware acceleration in DPDK data plane applications
PDF
LF_DPDK17_Flexible and Extensible support for new protocol processing with DP...
PDF
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...
PDF
LF_DPDK17_Technical Roadmap
PDF
LF_DPDK17_mediated devices: better userland IO
PDF
LF_DPDK17_Enhanced Memory Management
PDF
LF_DPDK17_Reflections on Mirroring With DPDK
PDF
LF_DPDK17_Implementation and Testing of Soft Patch Panel
PDF
LF_DPDK_Accelerate storage service via SPDK
PDF
LF_DPDK17_The Path to Data Plane Microservices
LF_DPDK17_DPDK's best kept secret – Micro-benchmark performance tests
LF_DPDK17_Lagopus Router
LF_DPDK17_DPDK Membership Library
LF_DPDK17_testpmd: swissknife for NFV
LF_DPDK17_Make DPDK's software traffic manager a deployable solution for vBNG
LF_DPDK17_DPDK on Microsoft Azure
LF_DPDK17_VPP Host Stack
LF_DPDK17_Accelerating Packet Processing with FPGA NICs
LF_DPDK17_rte_security: enhancing IPSEC offload
LF_DPDK17_Enabling hardware acceleration in DPDK data plane applications
LF_DPDK17_Flexible and Extensible support for new protocol processing with DP...
LF_DPDK17_rte_raw_device: implementing programmable accelerators using generi...
LF_DPDK17_Technical Roadmap
LF_DPDK17_mediated devices: better userland IO
LF_DPDK17_Enhanced Memory Management
LF_DPDK17_Reflections on Mirroring With DPDK
LF_DPDK17_Implementation and Testing of Soft Patch Panel
LF_DPDK_Accelerate storage service via SPDK
LF_DPDK17_The Path to Data Plane Microservices

Recently uploaded (20)

PPTX
sap open course for s4hana steps from ECC to s4
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PPT
Teaching material agriculture food technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Approach and Philosophy of On baking technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Cloud computing and distributed systems.
PDF
Encapsulation theory and applications.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Machine learning based COVID-19 study performance prediction
sap open course for s4hana steps from ECC to s4
The AUB Centre for AI in Media Proposal.docx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
Teaching material agriculture food technology
Unlocking AI with Model Context Protocol (MCP)
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
Approach and Philosophy of On baking technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Cloud computing and distributed systems.
Encapsulation theory and applications.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
“AI and Expert System Decision Support & Business Intelligence Systems”
Machine learning based COVID-19 study performance prediction

LF_DPDK17_DPDK with KNI – Pushing the Performance of an SDWAN Gateway to Highway Limits!

  • 2. 2#DPDKSummit Agenda u  IntroducIon – 2 mins u  Understanding a typical SDWAN Ecosystem, SDWAN gateway, Key Performance Requirements, Why DPDK? u  SoluIon Overview – 3 mins u  Dedicated DPDK apvs OVS-DPDK, KNI u  SoluIon Design with DPDK – 5 mins u  SoYware Architecture, High-level design, Component Design & Threading Model, ConfiguraIon Management u  The Big Picture – 3 mins u  Addressing SDWAN gateway requirements u  Conclusion – 2 mins u  Current status, Future Work, Credits, Further Reading & Q/A
  • 4. 4 Understanding the SDWAN Ecosystem u  SoYware Defined WAN is centered around a gateway (usually a COTS hardware) through which a branch connects with other branches and its Enterprise Data center through IPSEC enabled broadband. u  SDWAN gateway is centrally managed by Zero Touch Provisioning (ZTP) and oYen needs to provide high speed throughput. u  The gateway hardware comprises of: u  One or two ports face the WAN side (aka uplink), can support high speed Internet (each port can be 10Gbps Full Duplex) u  Remaining ports face the LAN side (aka access link), usually can be Gigabit Ethernet – connects directly to hosts or other switches/routers depending on the size of the branch u  The gateway soYware usually: u  Runs Linux base OS (customized Redhat, Centos or Ubuntu) u  VirtualizaIon soYware for supporIng VNFs u  Virtual Switch (viz. Open vSwitch) – for switching packets to other overlay and underlay desInaIons (local and/or remote to the branch)
  • 5. 5 The SDWAN Ecosystem A Simplified Illustration Hardware Switch Branch #N Machine Machine Machine Machine Machine Machine Access Links SDWAN Gateway Hardware Switch Branch #1 Machine Machine Machine Machine Machine Machine Access Links SDWAN Gateway Data Center (private cloud) Data Center (public cloud) CMS (openstack/ neutron plugin) Openflow Controller Border Gateway Border Gateway Access Links(Wired/Wireless) - LAN Uplinks (Broadband IPSEC enabled) – WAN – data traffic Legend WAN – control traffic (openflow, JSON) LAN side ports (usually 1GbE) WAN side ports (can be upto 10GbE) ovs-vswitchd openvswitch.ko & kernel network stack SDWAN gateway CoTS hardware (x86)
  • 6. 6 Some SDWAN Datapath Considerations u  For an Enterprise Branch, the SDWAN gateway must be capable of high speed data transfer. For cheaper capacity, Enterprises are adding Broadband links to MPLS. OYen a hybrid approach. This means: u  Consistency of Performance – provide QoS (rate limiIng and policing) u  According to IDC, “Today 40-60% of Enterprise data is migraIng between WAN to the Internet” u  Example: Voice and Video Streaming capability across the WAN between hosts in different branches and main office u  As data is transferred across broadband, security is the key u  Typically done through Group Key Exchange – each gateway acts as an IPSEC end point.
  • 7. 7 Why DPDK? Limita&ons of Kernel based forwarding u  Using Linux Kernel for high speed data path typically has some inherent issues: u  Linux Kernel default pagesize: 4K u  This means for every three packets (1500 MTU) there could be a page fault. During large number of packets processed, this could introduce lot of delay. u  No dedicated resources for packet processing u  CPU and memory (pages) shared with rest of system u  All ports are kernel managed u  Packets arrive in kernel’s network stack and passes through several layers of kernel before reaching virtual switch (Open vSwitch). This can introduce boqlenecks. u  First packet given to OVS user space for openflow rules table consultaIon leading to more boqlenecks. u  Result: even though SDWAN gateway has 20G uplink, it cannot meet the performance requirements!
  • 8. 8 Why DPDK? Limita&ons of Kernel based forwarding u  Using Linux Kernel for high speed data path typically has some inherent issues: u  Linux Kernel default pagesize: 4K u  This means for every three packets (1500 MTU) there could be a page fault. During large number of packets processed, this could introduce lot of delay. u  No dedicated resources for packet processing u  CPU and memory (pages) shared with rest of system u  All ports are kernel managed u  Packets arrive in kernel’s network stack and passes through several layers of kernel before reaching virtual switch (Open vSwitch). This can introduce boqlenecks. u  First packet given to OVS user space for openflow rules table consultaIon leading to more boqlenecks. u  Result: even though SDWAN gateway has 20G uplink, it cannot meet the performance requirements! Advantages of DPDK u  DPDK supports larger pagesize: u  2M or 1G hugepages u  DPDK allows dedicated resources aqached to network ports (PMD). Also memory can set aside for packet processing. u  DPDK allows packets to be received directly in the user space using PMD u  What is specifically needed for SDWAN? u  Add IPSEC capability u  Add QoS capability
  • 9. 9#DPDKSummit u  IntroducIon u  SoluIon Overview – 3 mins u  Dedicated DPDK app vs OVS-DPDK, KNI u  SoluIon Design with DPDK u  The Big Picture u  Future Work & Conclusion
  • 10. 10 The Need for a Dedicated DPDK app Current State of Art Analysis u  Open vSwitch has integrated DPDK (ovs-dpdk) as an Userspace Datapath u  The main bridge is configured with datapath_type=netdev, which indicates packets are processed in user space instead of Linux kernel u  Devices can be added to ovsdb with Interface type=dpdk and subsequently a PMD thread is spawned for polling packets u  In SDWAN environment, this means a single virtual switch applicaIon (ovs-vswitchd) will have all capabiliIes of slow path (first packet processing for virtual switch features) as well as fast path (subsequent packets). What if? u  Virtual Switch app that gets periodically refreshed by SDWAN vendors for new soYware features have a soYware glitch and crashes? Can we afford to be disconnected from the gateway? What are our opIons? u  What about featureset like IP-tables (firewalling), connecIon tracking etc? Currently these are implemented by kernel. u  Boqom-line: can we have best of both worlds?
  • 11. 11 KNI as The Missing Link! u  Kernel Network Interface is a programming technique provided by DPDK u  KNI queues allow draining of packets between DPDK app (vrs-dpdk-datapath) to/from kernel u  A set of KNI queues (slave network devices) that are aqached to a DPDK port u  Associate them with same MAC addresses u  Abstracted by dpdk_bondX device, where X = DPDK managed port ID u  Upsides: u  Leverage OVS for all slow-path and basic virtual switching funcIonaliIes as packets arriving from WAN can be fed into kernel resident openvswitch flow tables u  Leverage kernel for all IPtables and conntrack funcIonaliIes u  Downsides: u  SIll introduces a copy between kernel and DPDK app – cannot be avoided u  Agreed, but experimental data shows KNIs are rather fast!!
  • 12. 12#DPDKSummit u  IntroducIon u  SoluIon Overview u  SoluIon Design with DPDK – 5 mins u  SoYware Architecture, High-level design, Component Design & Threading Model, ConfiguraIon Management u  The Big Picture u  Conclusion
  • 13. 13 High Level Architecture alubr0 (ovs-vswitchd) openvswitch.ko Kernel TCP/IP rte_kni.ko DPDK Library 7 6 2 3 1 2 3 4 A KNI 1 2 3 4 5 6 8 7 7 vrs-dpdk-datapath (DPDK application) 4 User Space Kernel Space A Main Thread Receive Processing Transmit Processing NW to Access Traffic Path Access to NW Traffic Path Classifier/Flow Table QAT (ingress) NW/A Pipeline A/NW Pipeline Access vLAN VPORT Uplink VPORT (tunnel) Physical Port (Access/Uplink) 1 QAT (egress) 2 UDP/Mac Encap 3 QoS 4 Fragmentation LEGEND N NW/A Packet Hop N A/NW Packet HopControl Path (netlink) libopenvswitch (ovs-2.5+) libvrs-dpdk 5 81 Kernel Flow Table for switching
  • 14. 14 Software Architecture libdpdk.a libopenvswitch-netdev libopenvswitch-netdev-dpdk vrs-dpdk-datapath-device libopenvswitch-dpif-netdev libopenvswitch-flow vrs-dpdk-datapath-flow libopenvswitch-netlink vrs-dpdk-datapath-cfg-mgr libopenvswitch-unixctl vrs-dpdk-datapath-unixctl vrs-dpdk-datapath-main rte_kni.ko User Space Kernel Space vrs-dpdk-datapath component – DPDK application code (Nokia developed) DPDK SDK (upgraded to support DPDK-17.02 – DPDK LTS) Open vSwitch library code LEGEND vrs-dpdk-datapath-qos vrs-dpdk-datapath-qat vrs-dpdk-datapath (DPDK app) igb_uio.ko
  • 15. 15 Component Design & Threading Model vrs-dpdk-datapath Plugin Manager vrs-dpdk-datapath Device Manager (PMD & KNI) vrs-dpdk-datapath Configuration Manager Plugins (IPSec, Arp Snooper, QoS) vrs-dpdk-datapath Unixctl Manager vrs-dpdk-datapath Flow Manager Flow Table PMD Thread (RX/TX) KNI Thread (RX/TX) Main Thread (RX/TX) Physical Port Queue KNI Kernel Queues LEGEND Kernel RX/TX (rte_kni.ko) Netlink messaging (with ovs- vswitchd) Flow Table vrs-dpdk-datapath (DPDK app) Port1 (dpdk0) dpdk_bond0
  • 16. 16 Security Configuration Management ovs-vswitchd IPSEC Key Server XFRM modules (xfrm4_tunnel, xfrm_ipcomp) vrs-dpdk-datapath Flow Tables (IPSEC_POLICY_TABLE, IPSEC_KEYS_TABLE) XFRM_MSG_NEWPOLICY XFRM_MSG_NEWSA XFRM_MSG_DELPOLICY XFRM_MSG_DELSA XFRM_MSG_GETPOLICY XFRM_MSG_GETSA XFRM_MSG_GETPOLICY XFRM_MSG_GETSA XFRM_MSG_NEWPOLICY XFRM_MSG_NEWSA XFRM_MSG_DELPOLICY XFRM_MSG_DELSA VSD UI (IPSec Policy Configuration) User Space Kernel Controller (VSC) nuage-rpc nuage-nsg-ipsec-cfg ALUFF_FLOW_ECMP_ROUTE OFPTYPE_IPSEC_POLICY_MOD JSON OFPTYPE_IPSEC_SEED_UPDATE Netlink with Kernel Datapath Netlink with DPDK Datapath Legend
  • 17. 17#DPDKSummit u  IntroducIon u  SoluIon Overview u  SoluIon Design with DPDK u  The Big Picture – 3 mins u  Addressing SDWAN gateway requirements u  Conclusion
  • 18. 18 Meeting SDWAN gateway specific requirements u  Enabling/Disabling DPDK on WAN ports in the gateway u  Could be dynamically done through SDN UI by Icking off Network Accelera@on u  DPDK app starts, sets up hugeTLB pages, scans PCI bus and configures DPDK ports from list of whitelisted devices u  Note: SDWAN gateways should NOT have downImes, meaning “no reboots” or traffic loss while enabling/disabling DPDK u  SDWAN gateway underlay networking configuraIon u  DPDK enabled WAN ports get their IP addresses automaIcally from DHCP server u  DHCP server works seamlessly: modificaIon in KNI infra to ensure rte_kni_alloc accepts and assigns DPDK physical port’s mac address u  Network Manager hooks added to setup underlay IP tables and routes u  Tuning gateway for best results u  Need to judiciously balance IRQs so as to ensure KNIs get enough cores and PMD threads get full CPU cycles u  Other interesIng configuraIons in KNI devices: Packet Steering Parameters (rps_cpus/xps_cpus) in /proc, txqlen, ring parameters
  • 19. 19 DPDK Profiles – Monetization opportunity! Profile # PMD / uplink # KNI / uplink Usage Normal (Small) 1 1 Regular (day-to-day) processing Accelerated (Medium) 1 3 Encrypt/decrypt happens in same PMD thread. Three KNIs drain packets from PMD. Useful for higher workload than regular profile. Performance (Large) 2 4 One dedicated CPU (core) each for encrypt and decrypt of packets, four KNIs associated with each uplink. Excellent throughput (upto 7Gbps HD) – useful for high performance WAN traffic (voice/video). •  Customers can enable Profiles dynamically at Cloud Director UI and add / remove CPU allocation •  Switching from one profile to another often works seamlessly without gateway reboots! •  Just a restart of the DPDK application.
  • 20. 20 Branch–Cloud–Branch: DPDK everywhere!! Branch-F Branch-A Branch-B Branch-C Branch-D Branch-E vrs-dpdk-datapath Cloud (Enterprise Datacenter) SDWAN border GW w/ 10G ports Branch Hosts Internet Router (Juniper MX, ALU SR7550 etc) 1G FD link (LAN) 10G FD IPSEC Broadband LEGEND 1G FD IPSEC Broadband SDWAN branch GW Stitching together disjoint underlays (terminates and reistarts IPSEC across WANs)
  • 21. 21#DPDKSummit u  IntroducIon u  SoluIon Overview u  SoluIon Design with DPDK u  The Big Picture u  Conclusion – 2 mins u  Current status, Future Work, Credits, Further Reading & Q/A
  • 22. 22 Current State & Future Work u  Current status u  Upto 7Gbps Half Duplex with IPSEC on 10Gbps WAN link u  Highway: 55mph, Freeway: 65+ mph u  That copy between user space and kernel space! u  Kernel IRQ processing becomes the boqleneck aYer that rate u  SIll way way beqer than original: ~2Gbps H/D with IPSEC on 10Gbps WAN link u  SoluIon: u  Move all LAN side ports to DPDK. u  vrs-dpdk-datapath app acts as fastpath app and sends first packet to the slow path ovs-vswitchd app u  Implement flow cache inside vrs-dpdk-datapath along with the pipeline.
  • 23. 23 Credits u  Engineering u  Sabyasachi Sengupta – sabyasachi.sengupta@nokia.com - SDWAN ecosystem & DPDK/OVS Infrastructure u  Paul Hong – paul.hong@nokia.com - DPDK Plugin Management Infrastructure u  Limin Wang – limin.wang@nokia-bell-labs.com - IPSEC plugin, FragmentaIon u  Ravilochan Shamanna – ravilochan.samanna@nokia.com - IPSEC plugin u  John Shirron – john.shirron@nokia.com - QoS plugin u  Rohit PaIl Bagli – rohit.paIl-bagli@nokia.com - FuncIonal test u  Priyanka Kumar – priyanka.kumar@nokia.com - FuncIonal test u  Ankush Singh – ankush.singh@nokia.com - Performance test u  Product Management u  Prasad Nellipudi – prasad.nellipudi@nokia.com u  Program Management u  Raymond Zhang – raymond.zhang@nokia.com