]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/sched/act_csum.c
net_sched: switch to exit_batch for action pernet ops
[linux.git] / net / sched / act_csum.c
index 1c40caadcff959ba0c6cec6b8e32f7b459c42cfa..af4b8ec60d9a90cf2a624eceba27350625012424 100644 (file)
@@ -229,6 +229,9 @@ static int tcf_csum_ipv4_udp(struct sk_buff *skb, unsigned int ihl,
        const struct iphdr *iph;
        u16 ul;
 
+       if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP)
+               return 1;
+
        /*
         * Support both UDP and UDPLITE checksum algorithms, Don't use
         * udph->len to get the real length without any protocol check,
@@ -282,6 +285,9 @@ static int tcf_csum_ipv6_udp(struct sk_buff *skb, unsigned int ihl,
        const struct ipv6hdr *ip6h;
        u16 ul;
 
+       if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP)
+               return 1;
+
        /*
         * Support both UDP and UDPLITE checksum algorithms, Don't use
         * udph->len to get the real length without any protocol check,
@@ -629,16 +635,14 @@ static __net_init int csum_init_net(struct net *net)
        return tc_action_net_init(tn, &act_csum_ops);
 }
 
-static void __net_exit csum_exit_net(struct net *net)
+static void __net_exit csum_exit_net(struct list_head *net_list)
 {
-       struct tc_action_net *tn = net_generic(net, csum_net_id);
-
-       tc_action_net_exit(tn);
+       tc_action_net_exit(net_list, csum_net_id);
 }
 
 static struct pernet_operations csum_net_ops = {
        .init = csum_init_net,
-       .exit = csum_exit_net,
+       .exit_batch = csum_exit_net,
        .id   = &csum_net_id,
        .size = sizeof(struct tc_action_net),
 };