Re: [PATCH RFC] net/macb: Fix UDPv4 checksum offload

From: One Thousand Gnomes
Date: Wed Apr 29 2015 - 06:15:46 EST


> Unfortunately, the Cadence MACB doesn't support the enabling or
> disabling of checksum generation per descriptor.

So how does packet forwarding work ? If that means the device is
re-checksumming packets it is forwarding then that's really not very good
at all, especially if it takes frames that are unchecksummed and corrupts
them with a checksum midflight which is based upon unknown validity.

Other question: you seem to be assuming that the headers in part are
valid. That's not necessarily the case (even for local traffic you can
get UDP frames sent via RAW sockets that are invalid - eg with the ihl
pointing beyond the end of the packet). Given you then write into that
offset isn't a length check needed.

That might also be a useful fast path for longer frames, as you know the
worst case length for a 2 byte UDP frame.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/