* [dpdk-users] How to fix segmentation fault with large mempool (to support jumbo packets) ?
@ 2020-08-06 17:35 David Aldrich
0 siblings, 0 replies; only message in thread
From: David Aldrich @ 2020-08-06 17:35 UTC (permalink / raw)
I have a problem with transmitting jumbo packets with DPDK. The code
below show how I create a mempool and then how I send the packet. (This is
highly simplified - I haven't shown how I allocate the mbuf or assign the
data). My problem is that this works fine for small mbufs (BUF_SIZE ==
but I need to send jumbo packets (9000 octets). My understanding is that I
need to set the mbuf size to accommodate the largest packet I need to send.
But as soon as I increase BUF_SIZE beyond 2048 (say to 4096) the pointer
returned by rte_pktmbuf_prepend() is invalid - I get a segmentation fault at
the line shown below. I don't know how to fix this.
Am I setting the parameters to rte_mempool_create() incorrectly?
Is the mempool too large?
Any advice would be appreciated.
I am using dpdk-stable-18.11.9.
#define BUF_SIZE 4096
#define MBUF_SIZE (BUF_SIZE + sizeof(struct rte_mbuf) +
#define NB_MBUF 8192
// (I do check the return value of this call)
// Send packet
// Allocate mbuf from mempool and assign to p_mbuf, assign packet data then
set headers ...
struct udp_hdr* p_udp_hdr = (struct udp_hdr*)rte_pktmbuf_prepend(p_mbuf,
struct ipv4_hdr* p_ip_hdr = (struct ipv4_hdr*)rte_pktmbuf_prepend(p_mbuf,
if (p_ip_hdr != NULL)
p_ip_hdr->version_ihl = 0x45; <=== SEGMENTATION FAULT HERE
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-06 17:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 17:35 [dpdk-users] How to fix segmentation fault with large mempool (to support jumbo packets) ? David Aldrich
DPDK usage discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://inbox.dpdk.org/users/0 users/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 users users/ https://inbox.dpdk.org/users \
Example config snippet for mirrors.
Newsgroup available over NNTP:
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git