Limits on jumbo mbuf cluster allocation

Andre Oppermann andre at freebsd.org
Fri Mar 8 18:06:13 UTC 2013


On 08.03.2013 18:04, Garrett Wollman wrote:
> <<On Fri, 8 Mar 2013 00:31:18 -0800, Jack Vogel <jfvogel at gmail.com> said:
>
>> I am not strongly opposed to trying the 4k mbuf pool for all larger sizes,
>> Garrett maybe if you would try that on your system and see if that helps
>> you, I could envision making this a tunable at some point perhaps?
>
> If you can provide a patch I can certainly build it in to our kernel
> and have it ready the next time the production server crashes.  I'd
> like it to be at least a *little* tested by someone else beforehand,
> though.

This should do the trick.

-- 
Andre

Index: dev/ixgbe/ixgbe.c
===================================================================
--- dev/ixgbe/ixgbe.c   (revision 247893)
+++ dev/ixgbe/ixgbe.c   (working copy)
@@ -1120,12 +1120,8 @@
         */
         if (adapter->max_frame_size <= 2048)
                 adapter->rx_mbuf_sz = MCLBYTES;
-       else if (adapter->max_frame_size <= 4096)
+       else
                 adapter->rx_mbuf_sz = MJUMPAGESIZE;
-       else if (adapter->max_frame_size <= 9216)
-               adapter->rx_mbuf_sz = MJUM9BYTES;
-       else
-               adapter->rx_mbuf_sz = MJUM16BYTES;

         /* Prepare receive descriptors and buffers */
         if (ixgbe_setup_receive_structures(adapter)) {


More information about the freebsd-net mailing list