[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140227214752.GA2678@mtl-eit-vdi-22.mtl.labs.mlnx>
Date: Thu, 27 Feb 2014 23:47:54 +0200
From: Amir Vadai <amirv@...lanox.com>
To: David Miller <davem@...emloft.net>
Cc: eric.dumazet@...il.com, David.Laight@...LAB.COM,
netdev@...r.kernel.org, yevgenyp@...lanox.com,
ogerlitz@...lanox.com, eugenia@...lanox.com
Subject: Re: net/mlx4_en: Pad ethernet packets smaller than 17 bytes
On 27/02/14 15:36 -0500, David Miller wrote:
> From: Amir Vadai <amirv@...lanox.com>
> Date: Thu, 27 Feb 2014 17:46:37 +0200
>
> > On 27/02/14 06:44 -0800, Eric Dumazet wrote:
> >> On Thu, 2014-02-27 at 16:02 +0200, Amir Vadai wrote:
> >> >
> >> > Yes, skb will not be classified as inline-able if nr_frags != 1.
> >> > See is_inline()
> >
> > Maybe I wasn't accurate enough. inline-able skb must have:
> > 1. skb->len < inline_thold
> > 2. nr_frags <= 1
> >
> > Default value for inline_thold is 104 and it is a module parameter
> > that can be changed.
>
> BTW, the canonical way to deal with minimum length requirements is to
> use skb_padto().
I think that in this case it will be a bit of an overshoot. It
will add many unnecessary operations because it need to make sure that
there is enough space in the skb linear buffer for the padding. And in
my case the restriction is on the hardware buffer, so IMHO there is no
need to manipulate the skb.
Amir
--
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