<div dir="ltr">Hi Stephan,
<br><br>Thanks <span class="gmail-hljs-keyword">for</span> your response.
I<span class="gmail-hljs-comment">'m building DPDK 24.11 on kernel version 5.15.0-130-generic.</span>
It does seem <span class="gmail-hljs-keyword">to</span> work <span class="gmail-hljs-keyword">with</span> the MTU you suggested, but how can I support even larger packets (up <span class="gmail-hljs-keyword">to</span> <span class="gmail-hljs-number">9000</span>)?
<br>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.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Feb 2, 2025 at 7:33 PM Stephen Hemminger <<a href="mailto:stephen@networkplumber.org">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-7933454833554672907"><u></u>
<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;display:none">
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</div>
<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;max-height:0px;opacity:0;overflow:hidden;display:none">ZjQcmQRYFpfptBannerStart</div>
<u></u>
<div dir="ltr" lang="en" id="m_-7933454833554672907pfptBanneriudeyjt" style="display:block;text-align:left;margin:16px 0px;padding:8px 16px;border-radius:4px;min-width:200px;background-color:rgb(250,223,155);border-top:4px solid rgb(229,187,0)">
<div id="m_-7933454833554672907pfptBanneriudeyjt" style="float:left;display:block;margin:0px 0px 1px;max-width:600px">
<div id="m_-7933454833554672907pfptBanneriudeyjt" style="display:block;background-color:rgb(250,223,155);color:rgb(0,0,0);font-family:Arial,sans-serif;font-weight:bold;font-size:14px;line-height:18px">
</div>
<div id="m_-7933454833554672907pfptBanneriudeyjt" style="font-weight:normal;display:block;background-color:rgb(250,223,155);color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:12px;line-height:18px;margin-top:2px">
<hr><font color="#FF0000">WARNING:</font>External E-Mail - Use caution with links and attachments
</div>
</div>
<div style="height:0px;clear:both;display:block;line-height:0;font-size:0.01px"> </div>
</div>
<u></u>
<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;max-height:0px;opacity:0;overflow:hidden;display:none">ZjQcmQRYFpfptBannerEnd</div>
<div><pre style="font-family:sans-serif;font-size:100%;white-space:pre-wrap">On Sun, 2 Feb 2025 08:53:42 +0200
Ofer Dagan <<a href="mailto:ofer.d@claroty.com" target="_blank">ofer.d@claroty.com</a>> 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
</pre></div>
</div></blockquote></div>