virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving

Commit 501db51139 ("virtio: don't set VIRTIO_NET_HDR_F_DATA_VALID on
xmit") in fact disables VIRTIO_HDR_F_DATA_VALID on receiving path too,
fixing this by adding a hint (has_data_valid) and set it only on the
receiving path.

Cc: Rolf Neugebauer <rolf.neugebauer@docker.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jason Wang
2017-01-20 14:32:42 +08:00
committed by David S. Miller
parent 69fed99baa
commit 6391a4481b
5 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -1104,7 +1104,7 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb)
hdr = skb_vnet_hdr(skb);
if (virtio_net_hdr_from_skb(skb, &hdr->hdr,
virtio_is_little_endian(vi->vdev)))
virtio_is_little_endian(vi->vdev), false))
BUG();
if (vi->mergeable_rx_bufs)