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.woodho...@intel.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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to