diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-02-26 15:34:42 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-02-26 15:34:42 -0500 |
commit | 8e22e1b3499a446df48c2b26667ca36c55bf864c (patch) | |
tree | 5329f98b3eb3c95a9dcbab0fa4f9b6e62f0e788d /include/linux/virtio_net.h | |
parent | 00d3c14f14d51babd8aeafd5fa734ccf04f5ca3d (diff) | |
parent | 64a577196d66b44e37384bc5c4d78c61f59d5b2a (diff) |
Merge airlied/drm-next into drm-misc-next
Backmerge the main pull request to sync up with all the newly landed
drivers. Otherwise we'll have chaos even before 4.12 started in
earnest.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/linux/virtio_net.h')
-rw-r--r-- | include/linux/virtio_net.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 66204007d7ac..5209b5ed2a64 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -56,7 +56,8 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, | |||
56 | 56 | ||
57 | static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, | 57 | static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, |
58 | struct virtio_net_hdr *hdr, | 58 | struct virtio_net_hdr *hdr, |
59 | bool little_endian) | 59 | bool little_endian, |
60 | bool has_data_valid) | ||
60 | { | 61 | { |
61 | memset(hdr, 0, sizeof(*hdr)); /* no info leak */ | 62 | memset(hdr, 0, sizeof(*hdr)); /* no info leak */ |
62 | 63 | ||
@@ -91,7 +92,8 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, | |||
91 | skb_checksum_start_offset(skb)); | 92 | skb_checksum_start_offset(skb)); |
92 | hdr->csum_offset = __cpu_to_virtio16(little_endian, | 93 | hdr->csum_offset = __cpu_to_virtio16(little_endian, |
93 | skb->csum_offset); | 94 | skb->csum_offset); |
94 | } else if (skb->ip_summed == CHECKSUM_UNNECESSARY) { | 95 | } else if (has_data_valid && |
96 | skb->ip_summed == CHECKSUM_UNNECESSARY) { | ||
95 | hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID; | 97 | hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID; |
96 | } /* else everything is zero */ | 98 | } /* else everything is zero */ |
97 | 99 | ||