On Wed, Jun 28, 2017 at 08:05:06PM +0800, Jason Wang wrote:
On 2017å06æ28æ 12:01, Michael S. Tsirkin wrote:
On Wed, Jun 28, 2017 at 11:40:30AM +0800, Jason Wang wrote:Not sure this is an issue. But if it is, we can probably checksum the packet
On 2017å06æ28æ 11:31, Michael S. Tsirkin wrote:Hmm maybe I mean NEEDS_CHECKSUM actually.
On Wed, Jun 28, 2017 at 10:45:18AM +0800, Jason Wang wrote:Yes, but the comment said:
On 2017å06æ28æ 10:17, Michael S. Tsirkin wrote:That's on input. But I think for tun it's output, where that is equivalent
On Wed, Jun 28, 2017 at 10:14:34AM +0800, Jason Wang wrote:DATA_VALID is CHECKSUM_UNCESSARY on the host, and according to the comment
On 2017å06æ28æ 10:02, Michael S. Tsirkin wrote:That's the part I don't get. With DATA_VALID csum in packet is wrong, XDP
On Wed, Jun 28, 2017 at 09:54:03AM +0800, Jason Wang wrote:I think it's safe. For XDP_PASS, it work like in the past.
We should allow csumed packet for small buffer, otherwise XDP_PASSThe issue would be VIRTIO_NET_HDR_F_DATA_VALID might be set.
won't work correctly.
Fixes commit bb91accf2733 ("virtio-net: XDP support for small buffers")
Signed-off-by: Jason Wang<jasowang@xxxxxxxxxx>
What do you think?
tools assume it's value.
* The hardware you're dealing with doesn't calculate the full checksum
* (as in CHECKSUM_COMPLETE), but it does parse headers and verify
* for specific protocols. For such packets it will set
* if their checksums are okay. skb->csum is still undefined in this case
* though. A driver or device must never modify the checksum field in the
* packet even if checksum is verified.
The csum is correct I believe?
* The skb was already checksummed by the protocol, or a checksum is not
* This has the same meaning on as CHECKSUM_NONE for checksum offload on
So still correct I think?
I'll need to re-read the spec.
before passing it to XDP. But it would be a little slow.
Right. I confused DATA_VALID with NEEDS_CHECKSUM.
IIUC XDP generally refuses to attach if checksum offload
Could you pls explain how to reproduce the issue you are seeing?