aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio_net.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/virtio_net.h')
-rw-r--r--include/linux/virtio_net.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index ca68826d8449..162761f72c14 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -118,10 +118,15 @@ retry:
if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
u16 gso_size = __virtio16_to_cpu(little_endian, hdr->gso_size);
+ unsigned int nh_off = p_off;
struct skb_shared_info *shinfo = skb_shinfo(skb);
+ /* UFO may not include transport header in gso_size. */
+ if (gso_type & SKB_GSO_UDP)
+ nh_off -= thlen;
+
/* Too small packets are not really GSO ones. */
- if (skb->len - p_off > gso_size) {
+ if (skb->len - nh_off > gso_size) {
shinfo->gso_size = gso_size;
shinfo->gso_type = gso_type;