[ovs-dev] [PATCH 3/5] datapath: Backport the removal of __tcp_checksum_complete()

Yifeng Sun pkusunyifeng at gmail.com
Mon Jun 10 23:43:09 UTC 2019


Upstream commit 6ab6dfa6bb500f5cbb9b7a0f23a1613417ca2d12 ("net: get
rid of __tcp_checksum_complete())" deleted __tcp_checksum_complete()
and caused compilation failure for OVS on newer kernels.

This patch fixes it by using __skb_checksum_complete(), which is
100% the same with __tcp_checksum_complete().

Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
---
 datapath/linux/compat/stt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
index 5f045120ed20..21fef09f4329 100644
--- a/datapath/linux/compat/stt.c
+++ b/datapath/linux/compat/stt.c
@@ -1299,7 +1299,7 @@ static bool validate_checksum(struct sk_buff *skb)
 	skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, skb->len,
 				       IPPROTO_TCP, 0);
 
-	return __tcp_checksum_complete(skb) == 0;
+	return __skb_checksum_complete(skb) == 0;
 }
 
 static bool set_offloads(struct sk_buff *skb)
-- 
2.7.4



More information about the dev mailing list