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

From: Sergei Shtylyov <[email-masked]>
Date: Sat, 13 Sep 2014 23:17:55 +0300

Hello.

On 9/13/2014 1:22 AM, David L Stevens wrote:

> This patch allows an admin to set the MTU on a sunvnet device to arbitrary
> values between the minimum (68) and maximum (65535) IPv4 packet sizes.

> Signed-off-by: David L Stevens <[email-masked]>
> ---
>   drivers/net/ethernet/sun/sunvnet.c |    6 +++++-
>   drivers/net/ethernet/sun/sunvnet.h |    2 +-
>   2 files changed, 6 insertions(+), 2 deletions(-)

> diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
> index a6418bb..b557ec4 100644
> --- a/drivers/net/ethernet/sun/sunvnet.c
> +++ b/drivers/net/ethernet/sun/sunvnet.c
> @@ -751,6 +751,10 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
>   	if (unlikely(!port))
>   		goto out_dropped;
>   +	if (skb->len > port->vio.rmtu) {

    The patch seems somehow spoiled -- there should be no space before +.

> +		goto out_dropped;
> +	}
> +
>   	spin_lock_irqsave(&port->vio.lock, flags);
>    	dr = &port->vio.drings[VIO_DRIVER_TX_RING];

WBR, Sergei