Is netmap jumbo frames broken in STABLE?

Andrew Vylegzhanin avv314 at gmail.com
Fri Jun 17 01:40:28 UTC 2016


About week ago I've patched if_ix.c, just returned back code fragment of
max_frame_size determination from 2.8.3 version of ixgbe driver:

        /*
        ** Determine the correct mbuf pool
        ** for doing jumbo frames
        */

        if (adapter->max_frame_size <= 2048)
                adapter->rx_mbuf_sz = MCLBYTES;
        else if (adapter->max_frame_size <= 4096)
                adapter->rx_mbuf_sz = MJUMPAGESIZE;
        else if (adapter->max_frame_size <= 9216)
                adapter->rx_mbuf_sz = MJUM9BYTES;
        else
                adapter->rx_mbuf_sz = MJUM16BYTES;

After week of heavy testing everything is ok.

This solution is acceptable for me for now, because I use eight interfaces
in netmap mode only.
In future I want to make support something like dev.ix.N.jumbo_mbuf_enable
variable, since one of ix interfaces will be used for generic kernel stack
with jumbo frame support.

Doing with fragmented packet in netmap ring is also possible way, but need
more user cpu cycles for processing, I guess.
In any case I can test it when this  patch will be merged for netmap.

--
Andrew

2016-06-08 14:28 GMT+03:00 <tom.barbette at ulg.ac.be>:
>
> Support for fragmented packets with ixgbe was recently added on the linux
version of Netmap :
>
>
https://github.com/luigirizzo/netmap/commit/fc1e77560a8a8ea93cc3594de5fae94334debcd3
>
> I think the change for freebsd would be quite the same looking at
https://github.com/freebsd/freebsd/blob/master/sys/dev/netmap/ixgbe_netmap.h#L396
>
> After that, your userspace application simply have to check for the
NS_MOREFRAG flag in the receive ring, and if it's set he knows the end of
the packet will follow in the next buf.
>
> Tom


More information about the freebsd-net mailing list