Download presentation
Presentation is loading. Please wait.
1
ODP-VPP Integration updates
Sachin Saxena Sreejith Surendran Nair
2
Where we are on VPP-ODP Integration ?
Able to resolve the dpdk port initialization issue & made progress further through successful initialization. PoC is done to Run VPP with ODP linux-generic, odp-dpdk and NXP-Dpaa2 platform implementation. The base patch for VPP-ODP support is merged in FD.io respective Git Another patch to introduce generic ODP graph node in VPP & Compilation framework is in review-rework state. After the ODP graph node patch will be merged, The FD.io odp4vpp GIT will be ready for functionality with ODP XXX platform implementation.
3
What's more to target? Following items need to be Higher priority for stable functionality & performance. Avoid packet copy -> Currently Data path includes packet copy for each RX & TX legs. Main Control <–> Worker Threads model is not working even for single worker thread. Multi Core/threads support RSS (Received side scaling) to enable multiple ODP Queue usage. Other Performance optimizations.
4
Optimization Suggestions
The main issue is that VPP is tightly coupled to DPDK and So, it has visibility of DPDK BUFFER FORMAT. While in ODP, Application User don’t care about internal buffer structure and have no such restriction on platform specific implementation. For better performance VPP utilizes inline VLIB metadata in Buffer and it’s location is fixed in buffer format which do not supported in ODP. I will suggest few New ODP APIs And/OR Changes in VPP framework to avoid packet copy in each functional leg in next few slides.
5
VPP VLIB (Vector Library) expectation
VPP VLIB expect a metadata space of 2-Cache lines in buffer as shown below and must be before HEADROOM area. typedef struct { /* Start of cacheline-0 */ …… /* cacheline-1 */ /* cacheline-2 */ u8 pre_data[VLIB_BUFFER_PRE_DATA_SIZE] u8 data[0]; } vlib_buffer_t; rte_mbuf vlib_mbuf Headroom Packet_Data VLIB metadata in DPDK buffer Format
6
Changes @ Initialization
We should use the provision of allocating User Area while creating ODP PACKET Pool. This User Area space should be of size to satisfy the need of VLIB Buffer. Also, we do need a New ODP API to get Start of Virtual Memory address of Buffers and total Size. This is required to set virtual.start, virtual.end & virtual.size in VLIB Main Structure. This used heavily in data path to convert a buffer of 32/64 bit pointer to 32 bit Index value and vice-versa. XXX Vlib_mbuf XXX Headroom Packet_Data params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE; params.pkt.len = SHM_PKT_POOL_BUF_SIZE; params.pkt.uarea_size = 192; // 64 B * 3 params.type = ODP_POOL_PACKET; params.pkt.num = SHM_PKT_POOL_NB_PKTS;
7
Changes in Rx processing
We require to suggest changes in VPP VLIB structure to accommodate ODP etc … other than DPDK If we change pre_data (Headroom) and data fields to pointers, as shown in figure, we can achieve ODP minimum cost to existing VPP framework. For example in DPDK graph node, we need to assign these pointers for each packet. typedef struct { /* Start of cacheline-0 */ …… /* cacheline-1 */ /* cacheline-2 */ u8 resv [VLIB_BUFFER_PRE_DATA_SIZE -2]; u8 *pre_data; u8 *data; } vlib_buffer_t; XXX Vlib_mbuf XXX Headroom Packet_Data Generic Buffer Format
8
Changes in Rx processing Conti…
In ODP graph Node Following should be required. RCV Pkt from ODP API Get Inline Vlib buffer pointer using odp_packet_user_area() (Saved Allocation) Get packet Headroom & Data pointer using ODP packet APIs and fill VPP VLib Buffer (Saved Data Copying) Do Rest of the processing
9
Changes in Tx processing
During transmit, we need to get ODP packet handle from VLIB buffer (ODP User area) pointer. For this, EITHER we may introduce a context pointer (void *) in vlib_buffer and save “odp_packet_t” during receive and retrieve it during Tx (as shown in figure) OR we need a New ODP API to get packet handle from packet “User Area pointer”. (Saved packet Copy and VLIB Buffer memory free) typedef struct { /* Start of cacheline-0 */ …… /* cacheline-1 */ /* cacheline-2 */ u8 resv [VLIB_BUFFER_PRE_DATA_SIZE - 3]; void *pkt_cntxt; u8 *pre_data; u8 *data; } vlib_buffer_t; odp_packet_t XXX Vlib_mbuf XXX Headroom Packet_Data
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.