Re: [PATCH] ixgbe: fix truesize calculation when merging active tail into lro skb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Le mardi 14 février 2012 à 09:21 -0800, Alexander Duyck a écrit :

> The code itself is correct, but the comment isn't.  This code path is
> applied only to the case where we are not using pages.  The default Rx
> buffer size is actually about 3K when RSC is in use, which means
> truesize is about 4.25K per buffer.
> 

Hmm... any reason its not 2.25K per buffer ? (assuming MTU=1500)

Do you really need this code in ixgbe_set_rx_buffer_len() ?

                /*
                 * Make best use of allocation by using all but 1K of a
                 * power of 2 allocation that will be used for skb->head.
                 */
                else if (max_frame <= IXGBE_RXBUFFER_3K)
                        rx_buf_len = IXGBE_RXBUFFER_3K;
                else if (max_frame <= IXGBE_RXBUFFER_7K)
                        rx_buf_len = IXGBE_RXBUFFER_7K;
                else if (max_frame <= IXGBE_RXBUFFER_15K)
                        rx_buf_len = IXGBE_RXBUFFER_15K;
                else
                        rx_buf_len = IXGBE_MAX_RXBUFFER;

Why not using :
		rx_buf_len = max_frame;

and let kmalloc() do its best ?



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux