From: Ofer Dagan <ofer.d@claroty.com>
To: stephen@networkplumber.org
Cc: users@dpdk.org
Subject: Re: [EXTERNAL] Re: Support jumbo packets with XDP
Date: Mon, 3 Feb 2025 09:16:58 +0200 [thread overview]
Message-ID: <CAJZ4YbNHTnX98do_in4yasxQpdHnFONVVemyH1s_o7m2wKjrbA@mail.gmail.com> (raw)
In-Reply-To: <20250202093255.19da8189@hermes.local>
[-- Attachment #1: Type: text/plain, Size: 2215 bytes --]
Hi Stephan,
Thanks for your response. I'm building DPDK 24.11 on kernel version
5.15.0-130-generic. It does seem to work with the MTU you suggested, but
how can I support even larger packets (up to 9000)?
Are there any workarounds for such cases? I don't mind a performance
penalty as these use cases are expected to support less traffic then the
ones using dpdk drivers.
On Sun, Feb 2, 2025 at 7:33 PM Stephen Hemminger <stephen@networkplumber.org>
wrote:
> On Sun, 2 Feb 2025 08: 53: 42 +0200 Ofer Dagan <ofer. d@ claroty. com>
> wrote: > Hi all, > > We are trying to start using AF_XDP instead of libpcap
> (for use cases where > dpdk drivers aren't a good fit for us). When using
> XDP, we
> ZjQcmQRYFpfptBannerStart
> ------------------------------
> WARNING:External E-Mail - Use caution with links and attachments
>
> ZjQcmQRYFpfptBannerEnd
>
> On Sun, 2 Feb 2025 08:53:42 +0200
> Ofer Dagan <ofer.d@claroty.com> wrote:
>
> > Hi all,
> >
> > We are trying to start using AF_XDP instead of libpcap (for use cases where
> > dpdk drivers aren't a good fit for us). When using XDP, we can't set high
> > MTU. How to still support jumbo packets in our application?
> >
> > Thanks,
> > Ofer
>
> What error are you seeing?
> What version of DPDK, and what version of kernel are you building for.
>
> The current version of AF_XDP Poll mode driver supports larger mtu sizes.
> It is constrained because the receive buffer has to fit on a single page
> and there is overhead for the various headers.
>
>
> dev_info->min_mtu = RTE_ETHER_MIN_MTU;
> #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
> dev_info->max_rx_pktlen = getpagesize() -
> sizeof(struct rte_mempool_objhdr) -
> sizeof(struct rte_mbuf) -
> RTE_PKTMBUF_HEADROOM - XDP_PACKET_HEADROOM;
> #else
> dev_info->max_rx_pktlen = ETH_AF_XDP_FRAME_SIZE - XDP_PACKET_HEADROOM;
> #endif
> dev_info->max_mtu = dev_info->max_rx_pktlen - ETH_AF_XDP_ETH_OVERHEAD;
>
> If you have a relatively recent kernel the UNALIGNED_CHUNK_FLAG should be set.
> Stepping through the maths for that
> max_rx_pktlen = 4096 - 24 - 128 - 128 - 256 = 3560
> max_mtu = max_rx_pktlen - 14 - 4 = 3542
>
>
[-- Attachment #2: Type: text/html, Size: 4372 bytes --]
next prev parent reply other threads:[~2025-02-03 7:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-02 6:53 Ofer Dagan
2025-02-02 17:32 ` Stephen Hemminger
2025-02-03 7:16 ` Ofer Dagan [this message]
2025-02-04 2:43 ` [EXTERNAL] " Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJZ4YbNHTnX98do_in4yasxQpdHnFONVVemyH1s_o7m2wKjrbA@mail.gmail.com \
--to=ofer.d@claroty.com \
--cc=stephen@networkplumber.org \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).