On Thu, Sep 24, 2015 at 5:31 AM, David Woodhouse <dw...@infradead.org> wrote: > On Thu, 2015-09-24 at 05:05 -0700, Eric Dumazet wrote: >> >> 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. > > Perhaps so, yes. > > Any thoughts on the other reason I was staring at this same code path > this week? I am able to reliably feed inappropriate packets to a > NETIF_F_IP_CSUM-capable device with the test program at > http://bombadil.infradead.org/~dwmw2/raw.c (and equivalent code paths > via virtio_net, tun and others). > > They're *supposed* to get checksummed by software if the device can't > cope, but netif_skb_features() returns the wrong answer, so we fail to > do that and they're fed with CHECKSUM_PARTIAL to a device which can't > handle them. Causing a WARN() or a BUG() or a silent corruption, > depending on the driver. > Which drivers are doing this? It is up to the driver to determine whether a particular packet being sent can have checksum offloaded to the device. If it cannot offload the checksum it must call skb_checksum_help.
Tom > -- > dwmw2 > -- 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