SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
OpenDataPlane: network packet journey
Maxim Uvarov
This presentation describes what is ODP. Touches common data
types and APIs to work with network packets. Answers the question
why ODP is needed and how to use it. Gives basic overview of
internal components.
ENGINEERS AND DEVICES
WORKING TOGETHER
Linux kernel stack
ENGINEERS AND DEVICES
WORKING TOGETHER
More complex but not complete view:
https://wiki.linuxfoundation.org/images/1/1c/Network_data_flow_through_kernel.png
ENGINEERS AND DEVICES
WORKING TOGETHER
Issues with kernel network stack:
- Long and unpredictable latencies for network packets;
- Memory size for metadata for network packet (SKB metadata, TCP/IP and netfilter metadata) - few
kilobytes for 64 byte packet;
- System fight for cpu time between kernel and userland, spending cpu cycles is not optimal;
- TLB entries for both userland and kernel, no Huge Pages support;
- Packet body copy, strip out vlan tags and later re insertion in user land for AF packet;
- Other interrupts involved which may delay execution;
- No hw accelerators support;
- Crash in kernel makes whole system not operable and you have to reboot. Reboot whole system vs
one single application.
ENGINEERS AND DEVICES
WORKING TOGETHER
Abstract network hardware
ENGINEERS AND DEVICES
WORKING TOGETHER
What is OpenDataPlane?
● ODP is the set of APIs describing hardware in software.
● It is represented as library both static and dynamic.
● Supported ABI compatibility libodp version to use with different implementations.
● Non ABI compat version uses “native types” for more speed optimization.
● ODP defines API and does not put any restrictions for implementations.
● Know similar projects to ODP are: dpdk, netmap, pf_ring, libpcap.
● Know implementations are: Linux generic, DPDK based, Cavium Thunder-X,
Freescale based on DPAA, TI Keystone II, Kalray MPAA.
Current ODP implementations done in linux user space. Where hardware delivers packets
directly to user space memory. If ODP API can not be accelerated with hardware, than
software realisation is used.
ENGINEERS AND DEVICES
WORKING TOGETHER
ODP network packet odp_packet_t handle
odp_packet_t = odp_packet_alloc()
void *odp_packet_data(odp_packet_t pkt);
uint32_t odp_packet_len(odp_packet_t pkt);
uint32_t odp_packet_headroom(odp_packet_t pkt);
uint32_t odp_packet_tailroom(odp_packet_t pkt);
void *odp_packet_push_head(odp_packet_t pkt, uint32_t len);
void *odp_packet_pull_head(odp_packet_t pkt, uint32_t len);
void *odp_packet_pull_head(odp_packet_t pkt, uint32_t len);
int odp_packet_extend_tail(odp_packet_t *pkt, uint32_t len, void
**data_ptr,
uint32_t *seg_len);
int odp_packet_move_data(odp_packet_t pkt, uint32_t dst_offset,
uint32_t src_offset, uint32_t len);
int odp_packet_copy_data(odp_packet_t pkt, uint32_t dst_offset,
uint32_t src_offset, uint32_t len);
ENGINEERS AND DEVICES
WORKING TOGETHER
Packet journey begins: ODP classifier
Classifier is the hw block on ingress pipeline doing matching packet with
configured Packet Matching Rules (PMRs). As the result packet scheduled for
processing to specific queue.
Packet classification does not take any cpu time. No latency delays in packet
processing.
ENGINEERS AND DEVICES
WORKING TOGETHER
PKTIO, QUEUES and POOLS
odp_pktio_t - handle to control packets Input / Output, set up modes, get
statistics counters and link status, describe connection to odp queue.
odp_queue_t - handle to describe queue of the packet.
odp_pool_t - handle for memory storage for the packets.
Example of usage:
odp_pktio_t pktio = odp_pktio_create(“netmap:eth0”);
odp_queue_t queue = odp_queue_create(“qname”);
odp_pool_t pool = odp_pool_create(“pool name”, &params);
ENGINEERS AND DEVICES
WORKING TOGETHER
Run model
ENGINEERS AND DEVICES
WORKING TOGETHER
ODP_PKTIN_MODE_DIRECT
odp_pktin_queue_t queue_in,
odp_pktout_queue_t queue_out
odp_pktin_queue(pktio, &queue_in, 1);
odp_pktout_queue(pktio, &queue_out, 1);
while (1) {
pkts = odp_pktin_recv_tmo(queue_in, pkt_tbl, MAX_PKT_BURST,
ODP_PKTIN_NO_WAIT);
sent = odp_pktout_send(queue_out, pkt_tbl, pkts);
}
ENGINEERS AND DEVICES
WORKING TOGETHER
ODP_PKTIN_MODE_SCHED
while (1) {
odp_event_t ev;
ev = odp_schedule();
switch (odp_event_type(ev)) {
case ODP_EVENT_PACKET:
pkt = odp_packet_from_event(ev);
sent = odp_pktout_send(queue_out, pkt, 1);
case ODP_EVENT_TIMEOUT:
case ODP_EVENT_CRYPTO_COMPL:
}
}
ENGINEERS AND DEVICES
WORKING TOGETHER
Crypto operation: encrypt / decrypt packet
odp_crypto_session_t - struct provides crypto block setups (sync, async, cipher
and auth algorithms)
int odp_crypto_operation(odp_crypto_op_param_t *param,
odp_bool_t *posted,
odp_crypto_op_result_t *result);
odp_crypto_compl_t odp_crypto_compl_from_event(odp_event_t ev);
ENGINEERS AND DEVICES
WORKING TOGETHER
Egress Traffic manager
QoS packet scheduling ODP block using following algorithms:
● Strict Priority scheduling.
● Weighted Fair Queueing scheduling (WFQ).
● Bandwidth Shaping.
● Weighted Random Early Discard (WRED).
odp_tm_t tm = odp_tm_create("TM", &tm_params);
odp_tm_queue_t tq = odp_tm_queue_create(tm, &queue_params);
tn = odp_tm_node_create(tm, "TmNode", &node_params);
odp_tm_queue_connect(tq, tn);
sched_profile_RR = odp_tm_sched_create("SchedProfileRR", &sched_params);
ENGINEERS AND DEVICES
WORKING TOGETHER
Areas where ODP can be useful:
- Routers;
- IoT sensors information collector servers;
- Industrial real time networking application;
- DPI systems (like Snort, Suricata);
- VPN applications;
- OS kernel network stack less network apps (OFP);
- Virtual switches;
ENGINEERS AND DEVICES
WORKING TOGETHER
Links
API, Linux-generic implementation and tests:
https://git.linaro.org/lng/odp.git
ODP-DPDK:
https://git.linaro.org/lng/odp-dpdk.git
ODP Freescale DPAA1, DPAA2:
http://git.freescale.com/git/cgit.cgi/ppc/sdk/odp.git
Cavium ARM 64 Thunder-X:
https://github.com/Linaro/odp-thunderx

Contenu connexe

Tendances

Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linaro
 
BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr
Linaro
 
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
Linaro
 

Tendances (20)

BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64
 
LAS16-TR03: Upstreaming 201
LAS16-TR03: Upstreaming 201LAS16-TR03: Upstreaming 201
LAS16-TR03: Upstreaming 201
 
P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304
 
Las16 200 - firmware summit - ras what is it- why do we need it
Las16 200 - firmware summit - ras what is it- why do we need itLas16 200 - firmware summit - ras what is it- why do we need it
Las16 200 - firmware summit - ras what is it- why do we need it
 
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
 
LAS16-TR02: Upstreaming 101
LAS16-TR02: Upstreaming 101LAS16-TR02: Upstreaming 101
LAS16-TR02: Upstreaming 101
 
BKK16-306 ART ii
BKK16-306 ART iiBKK16-306 ART ii
BKK16-306 ART ii
 
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portlandAsymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
 
LAS16-207: Bus scaling QoS
LAS16-207: Bus scaling QoSLAS16-207: Bus scaling QoS
LAS16-207: Bus scaling QoS
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7
 
Deep Learning on ARM Platforms - SFO17-509
Deep Learning on ARM Platforms - SFO17-509Deep Learning on ARM Platforms - SFO17-509
Deep Learning on ARM Platforms - SFO17-509
 
BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr
 
LAS16-209: Finished and Upcoming Projects in LMG
LAS16-209: Finished and Upcoming Projects in LMGLAS16-209: Finished and Upcoming Projects in LMG
LAS16-209: Finished and Upcoming Projects in LMG
 
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
 
Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!
 
Kernel Recipes 2015: Greybus
Kernel Recipes 2015: GreybusKernel Recipes 2015: Greybus
Kernel Recipes 2015: Greybus
 
BKK16-106 ODP Project Update
BKK16-106 ODP Project UpdateBKK16-106 ODP Project Update
BKK16-106 ODP Project Update
 
Luca Abeni - Real-Time Virtual Machines with Linux and kvm
Luca Abeni - Real-Time Virtual Machines with Linux and kvmLuca Abeni - Real-Time Virtual Machines with Linux and kvm
Luca Abeni - Real-Time Virtual Machines with Linux and kvm
 
LAS16-200: SCMI - System Management and Control Interface
LAS16-200:  SCMI - System Management and Control InterfaceLAS16-200:  SCMI - System Management and Control Interface
LAS16-200: SCMI - System Management and Control Interface
 

Similaire à BUD17-300: Journey of a packet

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
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4
Open Networking Summits
 
Conference Paper: Universal Node: Towards a high-performance NFV environment
Conference Paper: Universal Node: Towards a high-performance NFV environmentConference Paper: Universal Node: Towards a high-performance NFV environment
Conference Paper: Universal Node: Towards a high-performance NFV environment
Ericsson
 

Similaire à BUD17-300: Journey of a packet (20)

Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
Multicore
MulticoreMulticore
Multicore
 
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
 
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)
 
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]
 
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*
 
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
 
FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)
 
FD.IO Vector Packet Processing
FD.IO Vector Packet ProcessingFD.IO Vector Packet Processing
FD.IO Vector Packet Processing
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4
 
GR740 User day
GR740 User dayGR740 User day
GR740 User day
 
Stacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackStacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStack
 
Exploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC CloudExploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC Cloud
 
Parallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMPParallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMP
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
Conference Paper: Universal Node: Towards a high-performance NFV environment
Conference Paper: Universal Node: Towards a high-performance NFV environmentConference Paper: Universal Node: Towards a high-performance NFV environment
Conference Paper: Universal Node: Towards a high-performance NFV environment
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
Mmap failure analysis
Mmap failure analysisMmap failure analysis
Mmap failure analysis
 
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 

Plus de Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

Plus de Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

BUD17-300: Journey of a packet

  • 1. OpenDataPlane: network packet journey Maxim Uvarov This presentation describes what is ODP. Touches common data types and APIs to work with network packets. Answers the question why ODP is needed and how to use it. Gives basic overview of internal components.
  • 2. ENGINEERS AND DEVICES WORKING TOGETHER Linux kernel stack
  • 3. ENGINEERS AND DEVICES WORKING TOGETHER More complex but not complete view: https://wiki.linuxfoundation.org/images/1/1c/Network_data_flow_through_kernel.png
  • 4. ENGINEERS AND DEVICES WORKING TOGETHER Issues with kernel network stack: - Long and unpredictable latencies for network packets; - Memory size for metadata for network packet (SKB metadata, TCP/IP and netfilter metadata) - few kilobytes for 64 byte packet; - System fight for cpu time between kernel and userland, spending cpu cycles is not optimal; - TLB entries for both userland and kernel, no Huge Pages support; - Packet body copy, strip out vlan tags and later re insertion in user land for AF packet; - Other interrupts involved which may delay execution; - No hw accelerators support; - Crash in kernel makes whole system not operable and you have to reboot. Reboot whole system vs one single application.
  • 5. ENGINEERS AND DEVICES WORKING TOGETHER Abstract network hardware
  • 6. ENGINEERS AND DEVICES WORKING TOGETHER What is OpenDataPlane? ● ODP is the set of APIs describing hardware in software. ● It is represented as library both static and dynamic. ● Supported ABI compatibility libodp version to use with different implementations. ● Non ABI compat version uses “native types” for more speed optimization. ● ODP defines API and does not put any restrictions for implementations. ● Know similar projects to ODP are: dpdk, netmap, pf_ring, libpcap. ● Know implementations are: Linux generic, DPDK based, Cavium Thunder-X, Freescale based on DPAA, TI Keystone II, Kalray MPAA. Current ODP implementations done in linux user space. Where hardware delivers packets directly to user space memory. If ODP API can not be accelerated with hardware, than software realisation is used.
  • 7. ENGINEERS AND DEVICES WORKING TOGETHER ODP network packet odp_packet_t handle odp_packet_t = odp_packet_alloc() void *odp_packet_data(odp_packet_t pkt); uint32_t odp_packet_len(odp_packet_t pkt); uint32_t odp_packet_headroom(odp_packet_t pkt); uint32_t odp_packet_tailroom(odp_packet_t pkt); void *odp_packet_push_head(odp_packet_t pkt, uint32_t len); void *odp_packet_pull_head(odp_packet_t pkt, uint32_t len); void *odp_packet_pull_head(odp_packet_t pkt, uint32_t len); int odp_packet_extend_tail(odp_packet_t *pkt, uint32_t len, void **data_ptr, uint32_t *seg_len); int odp_packet_move_data(odp_packet_t pkt, uint32_t dst_offset, uint32_t src_offset, uint32_t len); int odp_packet_copy_data(odp_packet_t pkt, uint32_t dst_offset, uint32_t src_offset, uint32_t len);
  • 8. ENGINEERS AND DEVICES WORKING TOGETHER Packet journey begins: ODP classifier Classifier is the hw block on ingress pipeline doing matching packet with configured Packet Matching Rules (PMRs). As the result packet scheduled for processing to specific queue. Packet classification does not take any cpu time. No latency delays in packet processing.
  • 9. ENGINEERS AND DEVICES WORKING TOGETHER PKTIO, QUEUES and POOLS odp_pktio_t - handle to control packets Input / Output, set up modes, get statistics counters and link status, describe connection to odp queue. odp_queue_t - handle to describe queue of the packet. odp_pool_t - handle for memory storage for the packets. Example of usage: odp_pktio_t pktio = odp_pktio_create(“netmap:eth0”); odp_queue_t queue = odp_queue_create(“qname”); odp_pool_t pool = odp_pool_create(“pool name”, &params);
  • 10. ENGINEERS AND DEVICES WORKING TOGETHER Run model
  • 11. ENGINEERS AND DEVICES WORKING TOGETHER ODP_PKTIN_MODE_DIRECT odp_pktin_queue_t queue_in, odp_pktout_queue_t queue_out odp_pktin_queue(pktio, &queue_in, 1); odp_pktout_queue(pktio, &queue_out, 1); while (1) { pkts = odp_pktin_recv_tmo(queue_in, pkt_tbl, MAX_PKT_BURST, ODP_PKTIN_NO_WAIT); sent = odp_pktout_send(queue_out, pkt_tbl, pkts); }
  • 12. ENGINEERS AND DEVICES WORKING TOGETHER ODP_PKTIN_MODE_SCHED while (1) { odp_event_t ev; ev = odp_schedule(); switch (odp_event_type(ev)) { case ODP_EVENT_PACKET: pkt = odp_packet_from_event(ev); sent = odp_pktout_send(queue_out, pkt, 1); case ODP_EVENT_TIMEOUT: case ODP_EVENT_CRYPTO_COMPL: } }
  • 13. ENGINEERS AND DEVICES WORKING TOGETHER Crypto operation: encrypt / decrypt packet odp_crypto_session_t - struct provides crypto block setups (sync, async, cipher and auth algorithms) int odp_crypto_operation(odp_crypto_op_param_t *param, odp_bool_t *posted, odp_crypto_op_result_t *result); odp_crypto_compl_t odp_crypto_compl_from_event(odp_event_t ev);
  • 14. ENGINEERS AND DEVICES WORKING TOGETHER Egress Traffic manager QoS packet scheduling ODP block using following algorithms: ● Strict Priority scheduling. ● Weighted Fair Queueing scheduling (WFQ). ● Bandwidth Shaping. ● Weighted Random Early Discard (WRED). odp_tm_t tm = odp_tm_create("TM", &tm_params); odp_tm_queue_t tq = odp_tm_queue_create(tm, &queue_params); tn = odp_tm_node_create(tm, "TmNode", &node_params); odp_tm_queue_connect(tq, tn); sched_profile_RR = odp_tm_sched_create("SchedProfileRR", &sched_params);
  • 15. ENGINEERS AND DEVICES WORKING TOGETHER Areas where ODP can be useful: - Routers; - IoT sensors information collector servers; - Industrial real time networking application; - DPI systems (like Snort, Suricata); - VPN applications; - OS kernel network stack less network apps (OFP); - Virtual switches;
  • 16. ENGINEERS AND DEVICES WORKING TOGETHER Links API, Linux-generic implementation and tests: https://git.linaro.org/lng/odp.git ODP-DPDK: https://git.linaro.org/lng/odp-dpdk.git ODP Freescale DPAA1, DPAA2: http://git.freescale.com/git/cgit.cgi/ppc/sdk/odp.git Cavium ARM 64 Thunder-X: https://github.com/Linaro/odp-thunderx