kevin laatz ciara loftus fosdem 2020 introduction
play

Kevin Laatz & Ciara Loftus FOSDEM 2020 Introduction - PowerPoint PPT Presentation

Kevin Laatz & Ciara Loftus FOSDEM 2020 Introduction https://www.dpdk.org/wp-content/uploads/sites/35/2019/07/14-AF_XDP-dpdk-summit-china-2019.pdf


  1. Kevin Laatz & Ciara Loftus FOSDEM 2020

  2. Introduction https://www.dpdk.org/wp-content/uploads/sites/35/2019/07/14-AF_XDP-dpdk-summit-china-2019.pdf https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwikxb2Z7pnnAhVNY8AKHchXDfAQjhx6BAgBEAI&url=https%3A%2F%2 Fwww.cdrecycler.com%2Finterstate-waste-apex-merger.aspx&psig=AOvVaw0QFTtUxvONAgVjKXlMC_-v&ust=1579873577016036

  3. Introduction • Userspace Libraries and Drivers. • Accelerate packet processing workloads. • Runs on wide variety of CPU architectures. • Has its own memory management subsystem. • Device specific PMDs (Poll Mode Drivers). https://www.dpdk.org/wp-content/uploads/sites/35/2019/07/14-AF_XDP-dpdk-summit-china-2019.pdf https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwikxb2Z7pnnAhVNY8AKHchXDfAQjhx6BAgBEAI&url=https%3A%2F%2 Fwww.cdrecycler.com%2Finterstate-waste-apex-merger.aspx&psig=AOvVaw0QFTtUxvONAgVjKXlMC_-v&ust=1579873577016036

  4. Introduction AF_XDP • Userspace Libraries and Drivers. • Kernel based address family. • Accelerate packet processing workloads. • Optimized for high performance packet processing. • Runs on wide variety of CPU architectures. • AF_XDP sockets redirect packets to userspace. • Has its own memory management subsystem. • By-passes kernel network stack • Device specific PMDs (Poll Mode Drivers). • “In - kernel fast path”. https://www.dpdk.org/wp-content/uploads/sites/35/2019/07/14-AF_XDP-dpdk-summit-china-2019.pdf https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwikxb2Z7pnnAhVNY8AKHchXDfAQjhx6BAgBEAI&url=https%3A%2F%2 Fwww.cdrecycler.com%2Finterstate-waste-apex-merger.aspx&psig=AOvVaw0QFTtUxvONAgVjKXlMC_-v&ust=1579873577016036

  5. Introduction AF_XDP • Userspace Libraries and Drivers. • Kernel based address family. • Accelerate packet processing workloads. • Optimized for high performance packet processing. • Runs on wide variety of CPU architectures. • AF_XDP sockets redirect packets to userspace. • Has its own memory management subsystem. • By-passes kernel network stack • Device specific PMDs (Poll Mode Drivers). • “In - kernel fast path”. Traditional DPDK Model Userspace DPDK apps i40e ixgbe Other PMD PMD PMDs Kernel space igb_uio vfio https://www.dpdk.org/wp-content/uploads/sites/35/2019/07/14-AF_XDP-dpdk-summit-china-2019.pdf https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwikxb2Z7pnnAhVNY8AKHchXDfAQjhx6BAgBEAI&url=https%3A%2F%2 Fwww.cdrecycler.com%2Finterstate-waste-apex-merger.aspx&psig=AOvVaw0QFTtUxvONAgVjKXlMC_-v&ust=1579873577016036

  6. Introduction AF_XDP • Userspace Libraries and Drivers. • Kernel based address family. • Accelerate packet processing workloads. • Optimized for high performance packet processing. • Runs on wide variety of CPU architectures. • AF_XDP sockets redirect packets to userspace. • Has its own memory management subsystem. • By-passes kernel network stack • Device specific PMDs (Poll Mode Drivers). • “In - kernel fast path”. DPDK with AF_XDP Traditional DPDK Model Userspace Userspace DPDK apps DPDK apps DPDK AF_XDP i40e ixgbe Other PMD PMD PMD PMDs Kernel space Kernel space NIC driver igb_uio vfio https://www.dpdk.org/wp-content/uploads/sites/35/2019/07/14-AF_XDP-dpdk-summit-china-2019.pdf https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwikxb2Z7pnnAhVNY8AKHchXDfAQjhx6BAgBEAI&url=https%3A%2F%2 Fwww.cdrecycler.com%2Finterstate-waste-apex-merger.aspx&psig=AOvVaw0QFTtUxvONAgVjKXlMC_-v&ust=1579873577016036

  7. Problem Statement

  8. Problem Statement The Goal: • All DPDK applications should be able to run out-of-the-box with the AF_XDP PMD. • DPDK app + AF_XDP PMD should run with good performance. •

  9. Problem Statement The Goal: • All DPDK applications should be able to run out-of-the-box with the AF_XDP PMD. • DPDK app + AF_XDP PMD should run with good performance. • The Challenge: • Frameworks like DPDK have their own memory management which come with their own • assumptions and constraints.

  10. Problem Statement The Goal: • All DPDK applications should be able to run out-of-the-box with the AF_XDP PMD. • DPDK app + AF_XDP PMD should run with good performance. • The Challenge: • Frameworks like DPDK have their own memory management which come with their own • assumptions and constraints. Discrepancy between the DPDK and AF_XDP buffer alignment. • Prevents direct mapping of DPDK mempool to AF_XDP UMEM. • Extra complexity/work negatively impacting performance. •

  11. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 Chunk 0 Chunk 1 Page 1 Chunk 2 Chunk 3 Page 2

  12. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 Chunk 0 • Area of memory allocated by the user Chunk 1 for packet data Page 1 Chunk 2 Chunk 3 Page 2

  13. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 Chunk 0 • Area of memory allocated by the user Chunk 1 for packet data Page 1 Chunk 2 • Split up into equal Chunk 3 sized-chunks Page 2

  14. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 Chunk 0 • Area of memory allocated by the user Chunk 1 for packet data Page 1 Chunk 2 • Split up into equal Chunk 3 sized-chunks Page 2 • RX Path: Kernel places packet data in a chunk for userspace (DPDK) to retrieve

  15. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 Chunk 0 • Area of memory allocated by the user Chunk 1 for packet data Page 1 Chunk 2 • Split up into equal Chunk 3 sized-chunks Page 2 • RX Path: Kernel places packet data in a chunk for userspace (DPDK) to retrieve • TX Path: Userspace places packet data in chunk for kernel NIC driver to transmit

  16. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 Chunk 0 Chunk 1 Page 1 Chunk 2 Chunk 3 Page 2 *Prior to Kernel 5.4

  17. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 PAGE_SIZE = 4K Chunk 0 Start address must be Chunk 1 PAGE_SIZE aligned Page 1 Chunk 2 Chunk 3 Page 2 *Prior to Kernel 5.4

  18. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 PAGE_SIZE = 4K Chunk 0 Start address must be Chunk 1 PAGE_SIZE aligned Page 1 Chunk 2 Chunks must be ^2 Chunk 3 sized Page 2 *Prior to Kernel 5.4

  19. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 PAGE_SIZE = 4K Chunk 0 Start address must be Chunk 1 PAGE_SIZE aligned Page 1 Chunk 2 Chunks must be ^2 Chunk 3 sized Page 2 Chunks may not cross page boundaries *Prior to Kernel 5.4

  20. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 PAGE_SIZE = 4K Chunk 0 DPDK MBUF 0 Start address must be Chunk 1 PAGE_SIZE aligned Page 1 DPDK Chunk 2 MBUF 1 Chunks must be ^2 Chunk 3 sized DPDK Page 2 MBUF 2 Chunks may not cross DPDK page boundaries MBUF 3 Page 3 *Prior to Kernel 5.4

  21. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 PAGE_SIZE = 4K Chunk 0 DPDK MBUF 0 Start address must be Mbufs can be any Chunk 1 PAGE_SIZE aligned size Page 1 DPDK Chunk 2 MBUF 1 Chunks must be ^2 Chunk 3 sized DPDK Page 2 MBUF 2 Chunks may not cross DPDK page boundaries MBUF 3 Page 3 *Prior to Kernel 5.4

  22. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 PAGE_SIZE = 4K Chunk 0 DPDK MBUF 0 Start address must be Mbufs can be any Chunk 1 PAGE_SIZE aligned size Page 1 DPDK Chunk 2 MBUF 1 Chunks must be ^2 Mbufs can have Chunk 3 sized arbitrary DPDK Page 2 MBUF 2 alignment Chunks may not cross DPDK page boundaries MBUF 3 Page 3 *Prior to Kernel 5.4

  23. AF_XDP UMEM* vs DPDK Mbuf Pool Page 0 PAGE_SIZE = 4K Chunk 0 DPDK MBUF 0 Start address must be Mbufs can be any Chunk 1 PAGE_SIZE aligned size Page 1 DPDK Chunk 2 MBUF 1 Chunks must be ^2 Mbufs can have Chunk 3 sized arbitrary DPDK Page 2 MBUF 2 alignment Chunks may not cross DPDK page boundaries MBUF 3 Page 3 *Prior to To get the highest performing integration of AF_XDP and DPDK, the DPDK Kernel 5.4 mbuf pool must be mapped into the UMEM for a zero copy datapath.

  24. DPDK Solutions

  25. DPDK Solutions Copy Mode UMEM CHUNK DPDK MBUF pkt memcpy pkt • Memcpy packets between UMEM & mbufpool • Cycle-heavy memcpy • DPDK 19.05

  26. DPDK Solutions Copy Mode Alignment API UMEM UMEM DPDK CHUNK CHUNK MBUF DPDK MBUF pkt pkt pkt memcpy pkt • Memcpy packets between • API to change mbuf pool UMEM & mbufpool alignment, then 1:1 map • Cycle-heavy memcpy • Invasive change • DPDK 19.05 • No DPDK release

  27. DPDK Solutions Copy Mode Alignment API External Mbuf UMEM UMEM UMEM DPDK CHUNK CHUNK MBUF CHUNK DPDK DPDK MBUF MBUF pkt pkt pkt pkt * memcpy pkt *pkt • Memcpy packets between • API to change mbuf pool • Mbuf points to packet UMEM & mbufpool alignment, then 1:1 map data in UMEM chunk • Cycle-heavy memcpy • Invasive change • Additional complexity • DPDK 19.05 • No DPDK release • DPDK 19.08

  28. New Solution: Kernel Arbitrary Alignment

  29. New Solution: Kernel Arbitrary Alignment Page 0 PAGE_SIZE = 4K Chunk 0 Chunk 1 Page 1 Chunk 2 Main benefits of the new solution: Enables arbitrary chunk alignment. • Chunk 3 Page 2 Page 3

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend