[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1443096325.29850.151.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 24 Sep 2015 05:05:25 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Francois Romieu <romieu@...zoreil.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 RFC] 8139cp: Fix GSO MSS handling
On Thu, 2015-09-24 at 11:38 +0100, David Woodhouse wrote:
> When fixing the TSO support I noticed we just mask ->gso_size with the
> MSSMask value and don't care about the consequences.
>
> Provide a .ndo_features_check() method which drops the NETIF_F_TSO
> feature for any skb which would exceed the maximum, and thus forces it
> to be segmented by software.
>
> Then we can stop the masking in cp_start_xmit(), and just WARN if the
> maximum is exceeded, which should now never happen.
>
> Finally, Francois Romieu noticed that we didn't even have the right
> value for MSSMask anyway; it should be 0x7ff (11 bits) not 0xfff.
>
> Signed-off-by: David Woodhouse <David.Woodhouse@...el.com>
> ---
> OK, netif_set_gso_max_size() was *not*, as I had naïvely assumed, a way
> to set the maximum value of ->gso_size. That's an unfortunate set of
> naming decisions.
Right, netif_skb_features() only has the following checks :
if (gso_segs > dev->gso_max_segs || gso_segs < dev->gso_min_segs)
features &= ~NETIF_F_GSO_MASK;
But now we have .ndo_features_check() we could remove this generic check
from fast path.
--
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