lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1329241172.4818.4.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Date:	Tue, 14 Feb 2012 18:39:32 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Alexander Duyck <alexander.h.duyck@...el.com>
Cc:	jeffrey.t.kirsher@...el.com, Christian Brunner <chb@....de>,
	netdev@...r.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@...el.com>
Subject: Re: [PATCH] ixgbe: fix truesize calculation when merging active
 tail into lro skb

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ