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: <20060803151631.GA14774@2ka.mipt.ru>
Date:	Thu, 3 Aug 2006 19:16:31 +0400
From:	Evgeniy Polyakov <johnpol@....mipt.ru>
To:	Krzysztof Oledzki <olel@....pl>
Cc:	Arnd Hannemann <arnd@...dnet.de>, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: problems with e1000 and jumboframes

On Thu, Aug 03, 2006 at 05:08:51PM +0200, Krzysztof Oledzki (olel@....pl) wrote:
> >>Why? After your explanation that makes sense for me. The driver needs
> >>one contiguous chunk for those 9k packet buffer and thus requests a
> >>3-order page of 16k. Or do i still do not understand this?
> >
> >Correct, except that it wants 32k.
> >e1000 logic is following:
> >align frame size to power-of-two,
> 16K?

Yep.

> >then skb_alloc adds a little
> >(sizeof(struct skb_shared_info)) at the end, and this ends up
> >in 32k request just for 9k jumbo frame.
> 
> Strange, why this skb_shared_info cannon be added before first alignment? 
> And what about smaller frames like 1500, does this driver behave similar 
> (first align then add)?

It can be.
Could attached  (completely untested) patch help?

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index da62db8..cf6506d 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3132,6 +3132,8 @@ #define MAX_STD_JUMBO_FRAME_SIZE 9234
 	 * larger slab size
 	 * i.e. RXBUFFER_2048 --> size-4096 slab */
 
+	max_frame += sizeof(struct skb_shared_info);
+
 	if (max_frame <= E1000_RXBUFFER_256)
 		adapter->rx_buffer_len = E1000_RXBUFFER_256;
 	else if (max_frame <= E1000_RXBUFFER_512)
@@ -3146,6 +3148,8 @@ #define MAX_STD_JUMBO_FRAME_SIZE 9234
 		adapter->rx_buffer_len = E1000_RXBUFFER_8192;
 	else if (max_frame <= E1000_RXBUFFER_16384)
 		adapter->rx_buffer_len = E1000_RXBUFFER_16384;
+	
+	max_frame -= sizeof(struct skb_shared_info);
 
 	/* adjust allocation if LPE protects us, and we aren't using SBP */
 	if (!adapter->hw.tbi_compatibility_on &&

> Best regards,
> 
> 				Krzysztof Olędzki


-- 
	Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ