]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Revert "UBUNTU: SAUCE: net: add recursion limit to GRO"
authorLuis Henriques <luis.henriques@canonical.com>
Thu, 17 Nov 2016 14:21:34 +0000 (14:21 +0000)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 6 Dec 2016 16:52:13 +0000 (16:52 +0000)
This reverts commit ac0099a90faf726b0b9df877583945463780137d, as it will
be replaced by the upstream version available in stable kernel release
v4.4.32.

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/net/geneve.c
drivers/net/vxlan.c
include/linux/netdevice.h
net/8021q/vlan.c
net/core/dev.c
net/ethernet/eth.c
net/ipv4/af_inet.c
net/ipv4/fou.c
net/ipv4/gre_offload.c
net/ipv4/udp_offload.c
net/ipv6/ip6_offload.c

index 8b31818a2daecfbc9c23389177b0b4ac228b9518..88c8b70631cd1e2d40697765ca36604ec17f550f 100644 (file)
@@ -460,7 +460,7 @@ static struct sk_buff **geneve_gro_receive(struct sk_buff **head,
 
        skb_gro_pull(skb, gh_len);
        skb_gro_postpull_rcsum(skb, gh, gh_len);
-       pp = call_gro_receive(ptype->callbacks.gro_receive, head, skb);
+       pp = ptype->callbacks.gro_receive(head, skb);
 
 out_unlock:
        rcu_read_unlock();
index 9c1d683da1c555a400f42fa58cd28b5528ee7be7..9ce3fcc3adcd301d4a985ef2a1096d86159426a0 100644 (file)
@@ -755,7 +755,7 @@ static struct sk_buff **vxlan_gro_receive(struct sk_buff **head,
                }
        }
 
-       pp = call_gro_receive(eth_gro_receive, head, skb);
+       pp = eth_gro_receive(head, skb);
 
 out:
        skb_gro_remcsum_cleanup(skb, &grc);
index 08fbc382998ff7eb5f3c04ab7b3404ffb806f364..d5dc9248f9d6452e8fa1893db9b423c0499d440b 100644 (file)
@@ -2052,10 +2052,7 @@ struct napi_gro_cb {
        /* Used in foo-over-udp, set in udp[46]_gro_receive */
        u8      is_ipv6:1;
 
-       /* Number of gro_receive callbacks this packet already went through */
-       u8 recursion_counter:4;
-
-       /* 3 bit hole */
+       /* 7 bit hole */
 
        /* used to support CHECKSUM_COMPLETE for tunneling protocols */
        __wsum  csum;
@@ -2066,25 +2063,6 @@ struct napi_gro_cb {
 
 #define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
 
-#define GRO_RECURSION_LIMIT 15
-static inline int gro_recursion_inc_test(struct sk_buff *skb)
-{
-       return ++NAPI_GRO_CB(skb)->recursion_counter == GRO_RECURSION_LIMIT;
-}
-
-typedef struct sk_buff **(*gro_receive_t)(struct sk_buff **, struct sk_buff *);
-static inline struct sk_buff **call_gro_receive(gro_receive_t cb,
-                                               struct sk_buff **head,
-                                               struct sk_buff *skb)
-{
-       if (gro_recursion_inc_test(skb)) {
-               NAPI_GRO_CB(skb)->flush |= 1;
-               return NULL;
-       }
-
-       return cb(head, skb);
-}
-
 struct packet_type {
        __be16                  type;   /* This is really htons(ether_type). */
        struct net_device       *dev;   /* NULL is wildcarded here           */
index ad8d6e6b87cab9c2c03c9e317513880d1b755b95..d2cd9de4b7241dcc8c1df5fd7832b3b317799923 100644 (file)
@@ -659,7 +659,7 @@ static struct sk_buff **vlan_gro_receive(struct sk_buff **head,
 
        skb_gro_pull(skb, sizeof(*vhdr));
        skb_gro_postpull_rcsum(skb, vhdr, sizeof(*vhdr));
-       pp = call_gro_receive(ptype->callbacks.gro_receive, head, skb);
+       pp = ptype->callbacks.gro_receive(head, skb);
 
 out_unlock:
        rcu_read_unlock();
index 715b681f107e0d4b4d3c3973c7bd927da7a882d4..9065dd903209ba6aec594717e695ba58a148ca8f 100644 (file)
@@ -4240,7 +4240,6 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
                NAPI_GRO_CB(skb)->flush = 0;
                NAPI_GRO_CB(skb)->free = 0;
                NAPI_GRO_CB(skb)->encap_mark = 0;
-               NAPI_GRO_CB(skb)->recursion_counter = 0;
                NAPI_GRO_CB(skb)->gro_remcsum_start = 0;
 
                /* Setup for GRO checksum validation */
index 600ef99503391484a2811a5d46392ab8542238e2..103871784e5085a8f16b792d2b059ea97cff9721 100644 (file)
@@ -438,7 +438,7 @@ struct sk_buff **eth_gro_receive(struct sk_buff **head,
 
        skb_gro_pull(skb, sizeof(*eh));
        skb_gro_postpull_rcsum(skb, eh, sizeof(*eh));
-       pp = call_gro_receive(ptype->callbacks.gro_receive, head, skb);
+       pp = ptype->callbacks.gro_receive(head, skb);
 
 out_unlock:
        rcu_read_unlock();
index afc18e9ca94adeb33d6344481839701971815cbc..1a5c1ca3ad3c861b8bf1bbdb706ecde7cb562c28 100644 (file)
@@ -1372,7 +1372,7 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head,
        skb_gro_pull(skb, sizeof(*iph));
        skb_set_transport_header(skb, skb_gro_offset(skb));
 
-       pp = call_gro_receive(ops->callbacks.gro_receive, head, skb);
+       pp = ops->callbacks.gro_receive(head, skb);
 
 out_unlock:
        rcu_read_unlock();
index d83888bc33d32dbb76773dc7e8b200c405a31b77..d120f5f91ed8ae4dcb61de1b189516889c1ed37d 100644 (file)
@@ -209,7 +209,7 @@ static struct sk_buff **fou_gro_receive(struct sk_buff **head,
        if (!ops || !ops->callbacks.gro_receive)
                goto out_unlock;
 
-       pp = call_gro_receive(ops->callbacks.gro_receive, head, skb);
+       pp = ops->callbacks.gro_receive(head, skb);
 
 out_unlock:
        rcu_read_unlock();
@@ -376,7 +376,7 @@ static struct sk_buff **gue_gro_receive(struct sk_buff **head,
        if (WARN_ON_ONCE(!ops || !ops->callbacks.gro_receive))
                goto out_unlock;
 
-       pp = call_gro_receive(ops->callbacks.gro_receive, head, skb);
+       pp = ops->callbacks.gro_receive(head, skb);
 
 out_unlock:
        rcu_read_unlock();
index 79ae0d7becbf522250f31e84674a515b5ed5a7d4..e603004c1af8293f0d8b919a5c1f2023bc4ceebd 100644 (file)
@@ -219,7 +219,7 @@ static struct sk_buff **gre_gro_receive(struct sk_buff **head,
        /* Adjusted NAPI_GRO_CB(skb)->csum after skb_gro_pull()*/
        skb_gro_postpull_rcsum(skb, greh, grehlen);
 
-       pp = call_gro_receive(ptype->callbacks.gro_receive, head, skb);
+       pp = ptype->callbacks.gro_receive(head, skb);
 
 out_unlock:
        rcu_read_unlock();
index d49b61945ea2b674279e4f74ec273d7546ead825..0e36e56dfd225ad3757e14445f9364ecff33ff9b 100644 (file)
@@ -339,14 +339,8 @@ unflush:
        skb_gro_pull(skb, sizeof(struct udphdr)); /* pull encapsulating udp header */
        skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr));
        NAPI_GRO_CB(skb)->proto = uo_priv->offload->ipproto;
-
-       if (gro_recursion_inc_test(skb)) {
-               flush = 1;
-               pp = NULL;
-       } else {
-               pp = uo_priv->offload->callbacks.gro_receive(head, skb,
-                                                            uo_priv->offload);
-       }
+       pp = uo_priv->offload->callbacks.gro_receive(head, skb,
+                                                    uo_priv->offload);
 
 out_unlock:
        rcu_read_unlock();
index efe6268b8bc3e279def9b5322c8fee2c3c5ec92f..82e9f30760283aca2f3d9468573aea607bd5bf6b 100644 (file)
@@ -247,7 +247,7 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
 
        skb_gro_postpull_rcsum(skb, iph, nlen);
 
-       pp = call_gro_receive(ops->callbacks.gro_receive, head, skb);
+       pp = ops->callbacks.gro_receive(head, skb);
 
 out_unlock:
        rcu_read_unlock();