> On Fri, 18 Oct 2024 03:21:28 +0000
> Chaoyong He <chaoyong...@corigine.com> wrote:
> 
> > > RTE_PKTMBUF_HEADROOM); }
> > > > +
> > >
> > > Not sure why this is needed? What is the problem with the original code?
> > > Are you trying to force packets to be segmented?
> >
> > Actually, we are trying to force packets *not* segmented by making the
> mbuf size large enough to hold the packets.
> >
> > In our user case, we start l3fwd app with parameter '--max-pkt-len 4000',
> and obviously the original logic with RTE_MBUF_DEFAULT_DATAROOM mbuf
> size will cause the packets to be segmented.
> > Which is not what we want, so we add this new '--mbuf-size=4096'
> parameter, the mbuf size will large enough to hold even the largest packet.
> >
> > Do you think this make sense?
> 
> Maybe query the driver, and use the max_rx_pkt_len as input to deciding the
> right mbuf size.

Sorry, I am not quite understanding here.
I can't find 'max_rx_pkt_len' in l3fwd app, instead it's exist testpmd app.
Could you please explain a little more about the advice?

> If max-pkt-len was 4000 and driver can only take 2K buffers, then use 2K mbuf
> size.
> If max-pkt-len was 1500 then use mtu + headroom and round up

Reply via email to