OpenDataPlane / odp

The ODP project is an open-source, cross-platform set of application programming interfaces (APIs) for the networking data plane

Home Page:https://opendataplane.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation fault with ODP 1.34

manishmatey opened this issue · comments

Hello team,

We have recently migrated from ODP 1.29 to 1.34 and found segmentation fault when first TCP SYN packet is received from client.
We debugged further and found issue is with below function:
File : ofp_tcp_input.c
Function : ofp_tcp_input() -> ofp_packet_user_area()

Below function ofp_packet_user_area() is returning NULL pointer.
if (ofp_packet_user_area(*m)->chksum_flags
& OFP_L4_CHKSUM_STATUS_VALID)

This function ofp_packet_user_area() calls internally below ODP functions:
static inline struct ofp_packet_user_area *ofp_packet_user_area(odp_packet_t pkt)
{
return odp_packet_user_area(pkt);
}

_ODP_INLINE void *odp_packet_user_area(odp_packet_t pkt)
{
return _odp_pkt_get(pkt, void *, user_area);
}

#define _odp_pkt_get(pkt, cast, field)
(*(cast *)(uintptr_t)((uint8_t *)pkt + _odp_packet_inline.field))

As there is no change in OFP code, only ODP code has been changed from 1.29 to 1.34 so posting this in ODP community.
Please help me on this.

Hi,

Is user area enabled in pool parameters (odp_pool_param_t.pkt.uarea_size)? odp_pool_print() output would help in debugging this issue.

@JereLeppanen has recently worked on updating OFP to support the latest ODP code, so he could have more insight into this issue.

Hi @MatiasElo , I will check and update.