Subject: Re: [PATCHv4 net-next 2/3] sunvnet: allow admin to set sunvnet MTU

From: David L Stevens <[email-masked]>
Date: Tue, 16 Sep 2014 14:51:37 -0400

On 09/15/2014 08:35 PM, David L Stevens wrote:

>   */
>  #define VNET_TX_TIMEOUT			(5 * HZ)
>  
> -#define VNET_MAXPACKET			1518ULL /* ETH_FRAMELEN + VLAN_HDR */
> +#define VNET_MAXPACKET			65553ULL /* 64K-1  +ETH HDR +VLAN HDR*/
>  #define VNET_TX_RING_SIZE		512
>  #define VNET_TX_WAKEUP_THRESH(dr)	((dr)->pending / 4)

While looking at adding TSO support, I've turned up a bug with this.

The transmit buffer mapping should be using a cookie per-page and this increases
the page count (without page alignment) from 2 with a 1500-byte MTU to 10 with a 64K MTU
+ framing and allowing from unaligned buffers.

I think it worked during my testing because the pages were contiguous, but the tx buffer
allocation code is assuming 2 pages (and 2 cookies) max.

So, it's incorrect. I'll fix and repost; please don't apply these yet.

							+-DLS