]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/net/ip.h
net: add gro_compute_pseudo functions
[karo-tx-linux.git] / include / net / ip.h
index db4a771b9ef3a6893bb2ae5d5f8692bfec5c571d..c8fd6112bd0b49f772557b4ec56c3737ad65594e 100644 (file)
@@ -364,6 +364,14 @@ static inline void inet_set_txhash(struct sock *sk)
        sk->sk_txhash = flow_hash_from_keys(&keys);
 }
 
+static inline __wsum inet_gro_compute_pseudo(struct sk_buff *skb, int proto)
+{
+       const struct iphdr *iph = skb_gro_network_header(skb);
+
+       return csum_tcpudp_nofold(iph->saddr, iph->daddr,
+                                 skb_gro_len(skb), proto, 0);
+}
+
 /*
  *     Map a multicast IP onto multicast MAC for type ethernet.
  */