qed: select ZLIB_INFLATE
[firefly-linux-kernel-4.4.55.git] / drivers / net / macvtap.c
index 248478c6f6e49522681a3eeb8a80fd8eaefd32fc..54036ae0a388c9a34cbb92fc832980fc1e584dc2 100644 (file)
@@ -137,7 +137,7 @@ static const struct proto_ops macvtap_socket_ops;
 #define TUN_OFFLOADS (NETIF_F_HW_CSUM | NETIF_F_TSO_ECN | NETIF_F_TSO | \
                      NETIF_F_TSO6 | NETIF_F_UFO)
 #define RX_OFFLOADS (NETIF_F_GRO | NETIF_F_LRO)
-#define TAP_FEATURES (NETIF_F_GSO | NETIF_F_SG)
+#define TAP_FEATURES (NETIF_F_GSO | NETIF_F_SG | NETIF_F_FRAGLIST)
 
 static struct macvlan_dev *macvtap_get_vlan_rcu(const struct net_device *dev)
 {
@@ -935,6 +935,9 @@ static ssize_t macvtap_do_read(struct macvtap_queue *q,
                /* Nothing to read, let's sleep */
                schedule();
        }
+       if (!noblock)
+               finish_wait(sk_sleep(&q->sk), &wait);
+
        if (skb) {
                ret = macvtap_put_user(q, skb, to);
                if (unlikely(ret < 0))
@@ -942,8 +945,6 @@ static ssize_t macvtap_do_read(struct macvtap_queue *q,
                else
                        consume_skb(skb);
        }
-       if (!noblock)
-               finish_wait(sk_sleep(&q->sk), &wait);
        return ret;
 }