SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
http://ostinato.org/
Srivats P.
6WIND SPEED MATTERS
The Challenge 2014 DPDK Design Contest
OSTINATO
DPDKa elerated
http://ostinato.org/
What is Ostinato?
Open Source Cross Platform
Traffic Generator
http://ostinato.org/
What is DPDK?
Application
Libraries and
user-space NIC
drivers to boost
packet
processing
performance
http://ostinato.org/
Together
DPDK
Packet Processing
Power
OSTINATO
Features and
Flexibility
1/10G line rate
feature rich
traffic generator
on commodity
hardware
http://ostinato.org/
Multi-core Processor
DPDK Programming Model
Core
Packet
Processing
Software
Engine
Core
Packet
Processing
Software
Engine
Core
Launch
and
Control
of Engines
Core
Packet
Processing
Software
Engine
DPDK Libraries + Environment Abstraction Layer (EAL)
SlavesMaster
Run to completion
model for engines
Alternatively,
they can collaborate
in a pipeline model
http://ostinato.org/
Ostinato Controller -Agent Architecture
Agent
(Drone)
Controller
(Ostinato)
►Packet Generation
►Packet Capture
►Statistics
GUI/Python-Script
►Configuration
►Control
►Results
ProtoBuf based RPC
Protocols, Packet Length,
Rates etc.
http://ostinato.org/
Drone Classes and Interfaces
PortPortPortPort
RpcServer
OstService
RPC interface
Port Class
Interface
Ostinato
(Controller)
Drone
(Agent)
http://ostinato.org/
RPC Interface
service OstService {
rpc checkVersion(VersionInfo) returns (VersionCompatibility);
rpc getPortIdList(Void) returns (PortIdList);
rpc getPortConfig(PortIdList) returns (PortConfigList);
rpc modifyPort(PortConfigList) returns (Ack);
rpc getStreamIdList(PortId) returns (StreamIdList);
rpc getStreamConfig(StreamIdList) returns (StreamConfigList);
rpc addStream(StreamIdList) returns (Ack);
rpc deleteStream(StreamIdList) returns (Ack);
rpc modifyStream(StreamConfigList) returns (Ack);
rpc startTransmit(PortIdList) returns (Ack);
rpc stopTransmit(PortIdList) returns (Ack);
rpc startCapture(PortIdList) returns (Ack);
rpc stopCapture(PortIdList) returns (Ack);
rpc getCaptureBuffer(PortId) returns (CaptureBuffer);
rpc getStats(PortIdList) returns (PortStatsList);
rpc clearStats(PortIdList) returns (Ack);
}
http://ostinato.org/
Port Class Interface (1/2)
class AbstractPort {
public:
// Common functionality for all ports implemented by AbstractPort
int id();
const char* name();
bool modify(const OstProto::Port &port);
int streamCount();
StreamBase* streamAtIndex(int index);
StreamBase* stream(int streamId);
bool addStream(StreamBase *stream);
bool deleteStream(int streamId);
void updatePacketList();
(more)
http://ostinato.org/
Port Class Interface (2/2)
(contd.)
// Pure virtual functions implemented by platform specific code
virtual OstProto::LinkState linkState() = 0;
virtual bool hasExclusiveControl() = 0;
virtual bool setExclusiveControl(bool exclusive) = 0;
virtual void clearPacketList() = 0;
virtual void setPacketListSize(quint64 size) = 0
virtual void loopNextPacketSet(qint64 size, qint64 repeats,
long repeatDelaySec, long repeatDelayNsec) = 0;
virtual bool appendToPacketList(long sec, long nsec,
const uchar *packet, int length) = 0;
virtual void setPacketListLoopMode(bool loop, quint64 secDelay,
quint64 nsecDelay) = 0;
virtual void startTransmit() = 0;
virtual void stopTransmit() = 0;
virtual bool isTransmitOn() = 0;
virtual void startCapture() = 0;
virtual void stopCapture() = 0;
virtual bool isCaptureOn() = 0;
virtual QIODevice* captureData() = 0;
void stats(PortStats *stats) = 0;
}
http://ostinato.org/
AbstractPort
PcapPort
LinuxPort BsdPort WinPcapPort
Port Class Diagram (UML)
DpdkPort
Uses libpcap for
packet transmit
and capture
http://ostinato.org/
Key Point for transmitted packets
AbstractPort
computes the minimum set of unique packets
required to be transmitted
pre-builds this minimum unique packet set
during Tx, this packet set is looped over and over
No packet buffers are allocated or built
during transmit
http://ostinato.org/
DpdkPort Engines (1/2)
Port Rx Ring Polling
while (!stopRxPolling) {
rte_eth_rx_burst(rxPkts)
foreach pkt in rxPkts rte_pktmbuf_free(pkt)
}
Note: Ostinato, being a traffic generator, does not need to process Rx
packets
Port Tx
while (!stopTransmit) {
rte_eth_tx_burst(txPkts) // txPkts is pre-built
rte_delay_us(timeTillNextPktOrBurst)
}
Note: ensure rte_eth_tx_burst() does not free mbufs by bumping their
refcnt via rte_pktmbuf_clone() during packet list pre-building time so we
can keep transmitting the same mbuf again and again without
realloc/rebuild
http://ostinato.org/
DpdkPort Engines (2/2)
Port Rx Capture
while (!stopCapture) {
rte_eth_rx_burst(rxPkts)
foreach pkt in rxPkts
rte_memcpy(capBuf++, pkt)
rte_pktmbuf_free(pkt)
}
Port Statistics Rx/Tx
while (!stopStatsPolling) {
rte_eth_stats_get()
sleep(1)
}
http://ostinato.org/
Engine - Core assignment strategies
DpdkPort engines to be assigned to cores
Always On (core assignment at init)
Drone core functionality
RPC, Protocol Builders, PacketList Builder etc.
Port Rx Ring Polling
Port Statistics Rx/Tx
On-Demand (core reserved at init or assigned on-demand)
Port Tx (of pre-built packets)
Port Rx Capture
http://ostinato.org/
Core assignment example strategy #1
Core Assignment
Master: Drone core functionality + DPDK port stats (one thread polls all ports)
Slave 0: Poll Rx Rings for all ports, Capture Rx for requested ports
Slave 1: Port 1 Tx
Slave 2: Port 2 Tx
…
Slave n: Port n Tx
Pros
Dedicated core to a port Tx
Optimal for port with only 1 Tx queue
Cons
2 cores are potentially under-utilized (Master, Slave 0)
Port Rx + Capture Rx may exceed core capacity leading to packet drops
Slave 1 – n cores may be under-utilized depending on Tx Rate (or if Tx off)
#ports = (#cores – 2)
Quad-core processor can support only 2 ports
http://ostinato.org/
Core assignment example strategy #2
Core Assignment
Master: Drone core functionality + DPDK port stats (one thread polls all ports)
Slave 0: Poll Rx Rings for all ports
Slave 1: Port 1 Tx + Port 1 Capture Rx
Slave 2: Port 2 Tx + Port 2 Capture Rx
…
Slave n: Port n Tx + Port n Capture Rx
Pros
More Rx Capture Bandwidth for simultaneous capture on multiple ports
Optimal when packets transmitted from one port are captured on another
Cons
2 cores are potentially under-utilized (Master, Slave 0)
Port Tx rate may be affected by the multiplexed capture functionality
#ports = (#cores – 2)
Quad-core processor can support only 2 ports
http://ostinato.org/
Core assignment example strategy #3
Core Assignment
Master: Drone core functionality + DPDK port stats (one thread polls all ports)
Slave 0: Poll Rx Rings for all ports, Capture Rx for requested ports
Slave 1: Port Tx Q1 for all ports
Slave 2: Port Tx Q2 for all ports
…
Slave n: Port Tx Qn for all ports
Pros
Multiple cores (equal to no. of supported Tx queues) dedicated to a port Tx
Optimal for ports with multiple Tx queues
All ports supported
Cons
2 cores are potentially under-utilized (Master, Slave 0)
Port Rx + Capture Rx may exceed core capacity leading to packet drops
Slave 1 – n may be under/over-utilized depending on supported Tx queues
and Tx rates
http://ostinato.org/
The “core” problem
Engine - Core assignment strategy will determine
Max number of supported ports
Max packet transmit/capture rate on a port
No one strategy fits all use cases
Optimal solution requires knowledge of
system configuration and capacity
use case
Implement multiple strategies and allow
end-user to override the default strategy
http://ostinato.org/
DpdkPort Performance
Unfortunately, we don’t have access to DPDK
supported hardware NICs and a server-grade multi-
core processor
Current development is being done on emulated
82545EM NICs on a VirtualBox VM running on a
quad-core laptop
On this development platform, for 64-byte packets,
DpdkPort generates a max of ~190Kpps against
PcapPort’s ~15Kpps
http://ostinato.org/
DPDK Potential Improvements
DPDK Build Environment
Not straight-forward to integrate into existing applications
having their own build environment
A traffic generator doesn’t need active Rx Ring polling
If capture is not enabled on port, can PMD/NIC
automatically empty rx ring and free mbuf?
Note: Rx stats still need to be maintained and collected
Nano-second resolution Delay API
rte_delay_ns()
http://ostinato.org/
Source Code
Repo URL: https://code.google.com/r/pstavirs-dpdk/
Caveats
Code is work in progress (aka alpha quality)
Not everything discussed here is implemented as of today
(Aug 1, 2014)
http://ostinato.org/
Build Instructions
DPDK
Download DPDK - http://dpdk.org/download
Follow build and verification steps from
http://dpdk.org/doc/quick-start
Drone
hg clone https://code.google.com/r/pstavirs-dpdk/ ostinato
Export environment variables RTE_SDK and RTE_TARGET
Follow build steps from
http://ostinato.org/wiki/BuildingFromSource
http://ostinato.org/
Ostinato DpdkPort Screenshot
http://ostinato.org/
Support
For programmers who know their “stuff”
Contact the author Srivats P. <pstavirs@gmail.com>
Everyone else
Please wait till the code is ready for “General Availability”
(aka beta quality)
http://ostinato.org/
That's all folks!
Want to help with DPDK-Ostinato?

Mais conteúdo relacionado

Mais procurados

The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThomas Graf
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
 
DPDK Summit 2015 - HP - Al Sanders
DPDK Summit 2015 - HP - Al SandersDPDK Summit 2015 - HP - Al Sanders
DPDK Summit 2015 - HP - Al SandersJim St. Leger
 
DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking WalkthroughThomas Graf
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.Naoto MATSUMOTO
 
Packet Framework - Cristian Dumitrescu
Packet Framework - Cristian DumitrescuPacket Framework - Cristian Dumitrescu
Packet Framework - Cristian Dumitrescuharryvanhaaren
 
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
BPF  & Cilium - Turning Linux into a Microservices-aware Operating SystemBPF  & Cilium - Turning Linux into a Microservices-aware Operating System
BPF & Cilium - Turning Linux into a Microservices-aware Operating SystemThomas Graf
 
DPDK Support for New HW Offloads
DPDK Support for New HW OffloadsDPDK Support for New HW Offloads
DPDK Support for New HW OffloadsNetronome
 
Performance challenges in software networking
Performance challenges in software networkingPerformance challenges in software networking
Performance challenges in software networkingStephen Hemminger
 
High Performance Networking Leveraging the DPDK and Growing Community
High Performance Networking Leveraging the DPDK and Growing CommunityHigh Performance Networking Leveraging the DPDK and Growing Community
High Performance Networking Leveraging the DPDK and Growing Community6WIND
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Diverajdeep
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabMichelle Holley
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus SDN/OpenFlow switch
 
CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016] CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016] IO Visor Project
 
Integrating Linux routing with FusionCLI™
Integrating Linux routing with FusionCLI™Integrating Linux routing with FusionCLI™
Integrating Linux routing with FusionCLI™Stephen Hemminger
 

Mais procurados (20)

The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
DPDK Summit 2015 - HP - Al Sanders
DPDK Summit 2015 - HP - Al SandersDPDK Summit 2015 - HP - Al Sanders
DPDK Summit 2015 - HP - Al Sanders
 
DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking Walkthrough
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.
 
Packet Framework - Cristian Dumitrescu
Packet Framework - Cristian DumitrescuPacket Framework - Cristian Dumitrescu
Packet Framework - Cristian Dumitrescu
 
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
BPF  & Cilium - Turning Linux into a Microservices-aware Operating SystemBPF  & Cilium - Turning Linux into a Microservices-aware Operating System
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
 
DPDK Support for New HW Offloads
DPDK Support for New HW OffloadsDPDK Support for New HW Offloads
DPDK Support for New HW Offloads
 
Performance challenges in software networking
Performance challenges in software networkingPerformance challenges in software networking
Performance challenges in software networking
 
High Performance Networking Leveraging the DPDK and Growing Community
High Performance Networking Leveraging the DPDK and Growing CommunityHigh Performance Networking Leveraging the DPDK and Growing Community
High Performance Networking Leveraging the DPDK and Growing Community
 
DPDK KNI interface
DPDK KNI interfaceDPDK KNI interface
DPDK KNI interface
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Dive
 
100 M pps on PC.
100 M pps on PC.100 M pps on PC.
100 M pps on PC.
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
 
CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016] CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016]
 
Tc basics
Tc basicsTc basics
Tc basics
 
Integrating Linux routing with FusionCLI™
Integrating Linux routing with FusionCLI™Integrating Linux routing with FusionCLI™
Integrating Linux routing with FusionCLI™
 

Semelhante a Dpdk accelerated Ostinato

Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Andriy Berestovskyy
 
PLNOG20 - Paweł Małachowski - Stress your DUT–wykorzystanie narzędzi open sou...
PLNOG20 - Paweł Małachowski - Stress your DUT–wykorzystanie narzędzi open sou...PLNOG20 - Paweł Małachowski - Stress your DUT–wykorzystanie narzędzi open sou...
PLNOG20 - Paweł Małachowski - Stress your DUT–wykorzystanie narzędzi open sou...PROIDEA
 
Aceleracion TCP Mikrotik.pdf
Aceleracion TCP Mikrotik.pdfAceleracion TCP Mikrotik.pdf
Aceleracion TCP Mikrotik.pdfWifiCren
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustEvan Chan
 
Workshop Wireshark
Workshop Wireshark Workshop Wireshark
Workshop Wireshark Fabio Rosa
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)micchie
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDKKernel TLV
 
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...PROIDEA
 
LinuxCon2009: 10Gbit/s Bi-Directional Routing on standard hardware running Linux
LinuxCon2009: 10Gbit/s Bi-Directional Routing on standard hardware running LinuxLinuxCon2009: 10Gbit/s Bi-Directional Routing on standard hardware running Linux
LinuxCon2009: 10Gbit/s Bi-Directional Routing on standard hardware running Linuxbrouer
 
Evaluation of OpenFlow in RB750GL
Evaluation of OpenFlow in RB750GLEvaluation of OpenFlow in RB750GL
Evaluation of OpenFlow in RB750GLToshiki Tsuboi
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Michelle Holley
 
Wireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance toolsWireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance toolsSachidananda Sahu
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdfJean-Frederic Clere
 
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSBuilding a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSFernando Luiz Cola
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoScyllaDB
 
VMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep DiveVMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep DiveVMworld
 
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure WebLinux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure WebAll Things Open
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchJim St. Leger
 

Semelhante a Dpdk accelerated Ostinato (20)

Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
PLNOG20 - Paweł Małachowski - Stress your DUT–wykorzystanie narzędzi open sou...
PLNOG20 - Paweł Małachowski - Stress your DUT–wykorzystanie narzędzi open sou...PLNOG20 - Paweł Małachowski - Stress your DUT–wykorzystanie narzędzi open sou...
PLNOG20 - Paweł Małachowski - Stress your DUT–wykorzystanie narzędzi open sou...
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
Aceleracion TCP Mikrotik.pdf
Aceleracion TCP Mikrotik.pdfAceleracion TCP Mikrotik.pdf
Aceleracion TCP Mikrotik.pdf
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to Rust
 
Workshop Wireshark
Workshop Wireshark Workshop Wireshark
Workshop Wireshark
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
 
LinuxCon2009: 10Gbit/s Bi-Directional Routing on standard hardware running Linux
LinuxCon2009: 10Gbit/s Bi-Directional Routing on standard hardware running LinuxLinuxCon2009: 10Gbit/s Bi-Directional Routing on standard hardware running Linux
LinuxCon2009: 10Gbit/s Bi-Directional Routing on standard hardware running Linux
 
Evaluation of OpenFlow in RB750GL
Evaluation of OpenFlow in RB750GLEvaluation of OpenFlow in RB750GL
Evaluation of OpenFlow in RB750GL
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
 
Wireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance toolsWireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance tools
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
 
Packet Card Knowledge Transferfinal
Packet Card Knowledge TransferfinalPacket Card Knowledge Transferfinal
Packet Card Knowledge Transferfinal
 
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSBuilding a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
 
VMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep DiveVMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep Dive
 
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure WebLinux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Dpdk accelerated Ostinato

  • 1. http://ostinato.org/ Srivats P. 6WIND SPEED MATTERS The Challenge 2014 DPDK Design Contest OSTINATO DPDKa elerated
  • 2. http://ostinato.org/ What is Ostinato? Open Source Cross Platform Traffic Generator
  • 3. http://ostinato.org/ What is DPDK? Application Libraries and user-space NIC drivers to boost packet processing performance
  • 4. http://ostinato.org/ Together DPDK Packet Processing Power OSTINATO Features and Flexibility 1/10G line rate feature rich traffic generator on commodity hardware
  • 5. http://ostinato.org/ Multi-core Processor DPDK Programming Model Core Packet Processing Software Engine Core Packet Processing Software Engine Core Launch and Control of Engines Core Packet Processing Software Engine DPDK Libraries + Environment Abstraction Layer (EAL) SlavesMaster Run to completion model for engines Alternatively, they can collaborate in a pipeline model
  • 6. http://ostinato.org/ Ostinato Controller -Agent Architecture Agent (Drone) Controller (Ostinato) ►Packet Generation ►Packet Capture ►Statistics GUI/Python-Script ►Configuration ►Control ►Results ProtoBuf based RPC Protocols, Packet Length, Rates etc.
  • 7. http://ostinato.org/ Drone Classes and Interfaces PortPortPortPort RpcServer OstService RPC interface Port Class Interface Ostinato (Controller) Drone (Agent)
  • 8. http://ostinato.org/ RPC Interface service OstService { rpc checkVersion(VersionInfo) returns (VersionCompatibility); rpc getPortIdList(Void) returns (PortIdList); rpc getPortConfig(PortIdList) returns (PortConfigList); rpc modifyPort(PortConfigList) returns (Ack); rpc getStreamIdList(PortId) returns (StreamIdList); rpc getStreamConfig(StreamIdList) returns (StreamConfigList); rpc addStream(StreamIdList) returns (Ack); rpc deleteStream(StreamIdList) returns (Ack); rpc modifyStream(StreamConfigList) returns (Ack); rpc startTransmit(PortIdList) returns (Ack); rpc stopTransmit(PortIdList) returns (Ack); rpc startCapture(PortIdList) returns (Ack); rpc stopCapture(PortIdList) returns (Ack); rpc getCaptureBuffer(PortId) returns (CaptureBuffer); rpc getStats(PortIdList) returns (PortStatsList); rpc clearStats(PortIdList) returns (Ack); }
  • 9. http://ostinato.org/ Port Class Interface (1/2) class AbstractPort { public: // Common functionality for all ports implemented by AbstractPort int id(); const char* name(); bool modify(const OstProto::Port &port); int streamCount(); StreamBase* streamAtIndex(int index); StreamBase* stream(int streamId); bool addStream(StreamBase *stream); bool deleteStream(int streamId); void updatePacketList(); (more)
  • 10. http://ostinato.org/ Port Class Interface (2/2) (contd.) // Pure virtual functions implemented by platform specific code virtual OstProto::LinkState linkState() = 0; virtual bool hasExclusiveControl() = 0; virtual bool setExclusiveControl(bool exclusive) = 0; virtual void clearPacketList() = 0; virtual void setPacketListSize(quint64 size) = 0 virtual void loopNextPacketSet(qint64 size, qint64 repeats, long repeatDelaySec, long repeatDelayNsec) = 0; virtual bool appendToPacketList(long sec, long nsec, const uchar *packet, int length) = 0; virtual void setPacketListLoopMode(bool loop, quint64 secDelay, quint64 nsecDelay) = 0; virtual void startTransmit() = 0; virtual void stopTransmit() = 0; virtual bool isTransmitOn() = 0; virtual void startCapture() = 0; virtual void stopCapture() = 0; virtual bool isCaptureOn() = 0; virtual QIODevice* captureData() = 0; void stats(PortStats *stats) = 0; }
  • 11. http://ostinato.org/ AbstractPort PcapPort LinuxPort BsdPort WinPcapPort Port Class Diagram (UML) DpdkPort Uses libpcap for packet transmit and capture
  • 12. http://ostinato.org/ Key Point for transmitted packets AbstractPort computes the minimum set of unique packets required to be transmitted pre-builds this minimum unique packet set during Tx, this packet set is looped over and over No packet buffers are allocated or built during transmit
  • 13. http://ostinato.org/ DpdkPort Engines (1/2) Port Rx Ring Polling while (!stopRxPolling) { rte_eth_rx_burst(rxPkts) foreach pkt in rxPkts rte_pktmbuf_free(pkt) } Note: Ostinato, being a traffic generator, does not need to process Rx packets Port Tx while (!stopTransmit) { rte_eth_tx_burst(txPkts) // txPkts is pre-built rte_delay_us(timeTillNextPktOrBurst) } Note: ensure rte_eth_tx_burst() does not free mbufs by bumping their refcnt via rte_pktmbuf_clone() during packet list pre-building time so we can keep transmitting the same mbuf again and again without realloc/rebuild
  • 14. http://ostinato.org/ DpdkPort Engines (2/2) Port Rx Capture while (!stopCapture) { rte_eth_rx_burst(rxPkts) foreach pkt in rxPkts rte_memcpy(capBuf++, pkt) rte_pktmbuf_free(pkt) } Port Statistics Rx/Tx while (!stopStatsPolling) { rte_eth_stats_get() sleep(1) }
  • 15. http://ostinato.org/ Engine - Core assignment strategies DpdkPort engines to be assigned to cores Always On (core assignment at init) Drone core functionality RPC, Protocol Builders, PacketList Builder etc. Port Rx Ring Polling Port Statistics Rx/Tx On-Demand (core reserved at init or assigned on-demand) Port Tx (of pre-built packets) Port Rx Capture
  • 16. http://ostinato.org/ Core assignment example strategy #1 Core Assignment Master: Drone core functionality + DPDK port stats (one thread polls all ports) Slave 0: Poll Rx Rings for all ports, Capture Rx for requested ports Slave 1: Port 1 Tx Slave 2: Port 2 Tx … Slave n: Port n Tx Pros Dedicated core to a port Tx Optimal for port with only 1 Tx queue Cons 2 cores are potentially under-utilized (Master, Slave 0) Port Rx + Capture Rx may exceed core capacity leading to packet drops Slave 1 – n cores may be under-utilized depending on Tx Rate (or if Tx off) #ports = (#cores – 2) Quad-core processor can support only 2 ports
  • 17. http://ostinato.org/ Core assignment example strategy #2 Core Assignment Master: Drone core functionality + DPDK port stats (one thread polls all ports) Slave 0: Poll Rx Rings for all ports Slave 1: Port 1 Tx + Port 1 Capture Rx Slave 2: Port 2 Tx + Port 2 Capture Rx … Slave n: Port n Tx + Port n Capture Rx Pros More Rx Capture Bandwidth for simultaneous capture on multiple ports Optimal when packets transmitted from one port are captured on another Cons 2 cores are potentially under-utilized (Master, Slave 0) Port Tx rate may be affected by the multiplexed capture functionality #ports = (#cores – 2) Quad-core processor can support only 2 ports
  • 18. http://ostinato.org/ Core assignment example strategy #3 Core Assignment Master: Drone core functionality + DPDK port stats (one thread polls all ports) Slave 0: Poll Rx Rings for all ports, Capture Rx for requested ports Slave 1: Port Tx Q1 for all ports Slave 2: Port Tx Q2 for all ports … Slave n: Port Tx Qn for all ports Pros Multiple cores (equal to no. of supported Tx queues) dedicated to a port Tx Optimal for ports with multiple Tx queues All ports supported Cons 2 cores are potentially under-utilized (Master, Slave 0) Port Rx + Capture Rx may exceed core capacity leading to packet drops Slave 1 – n may be under/over-utilized depending on supported Tx queues and Tx rates
  • 19. http://ostinato.org/ The “core” problem Engine - Core assignment strategy will determine Max number of supported ports Max packet transmit/capture rate on a port No one strategy fits all use cases Optimal solution requires knowledge of system configuration and capacity use case Implement multiple strategies and allow end-user to override the default strategy
  • 20. http://ostinato.org/ DpdkPort Performance Unfortunately, we don’t have access to DPDK supported hardware NICs and a server-grade multi- core processor Current development is being done on emulated 82545EM NICs on a VirtualBox VM running on a quad-core laptop On this development platform, for 64-byte packets, DpdkPort generates a max of ~190Kpps against PcapPort’s ~15Kpps
  • 21. http://ostinato.org/ DPDK Potential Improvements DPDK Build Environment Not straight-forward to integrate into existing applications having their own build environment A traffic generator doesn’t need active Rx Ring polling If capture is not enabled on port, can PMD/NIC automatically empty rx ring and free mbuf? Note: Rx stats still need to be maintained and collected Nano-second resolution Delay API rte_delay_ns()
  • 22. http://ostinato.org/ Source Code Repo URL: https://code.google.com/r/pstavirs-dpdk/ Caveats Code is work in progress (aka alpha quality) Not everything discussed here is implemented as of today (Aug 1, 2014)
  • 23. http://ostinato.org/ Build Instructions DPDK Download DPDK - http://dpdk.org/download Follow build and verification steps from http://dpdk.org/doc/quick-start Drone hg clone https://code.google.com/r/pstavirs-dpdk/ ostinato Export environment variables RTE_SDK and RTE_TARGET Follow build steps from http://ostinato.org/wiki/BuildingFromSource
  • 25. http://ostinato.org/ Support For programmers who know their “stuff” Contact the author Srivats P. <pstavirs@gmail.com> Everyone else Please wait till the code is ready for “General Availability” (aka beta quality)
  • 26. http://ostinato.org/ That's all folks! Want to help with DPDK-Ostinato?