[ovs-dev,3/5] datapath: Backport the removal of __tcp_checksum_complete()
diff mbox series

Message ID 1560210191-9414-4-git-send-email-pkusunyifeng@gmail.com
State New
Headers show
Series
  • datapath: Support 5.0.x kernel version
Related show

Commit Message

Yifeng Sun June 10, 2019, 11:43 p.m. UTC
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@gmail.com>
---
 datapath/linux/compat/stt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yi-Hung Wei June 12, 2019, 9:19 p.m. UTC | #1
On Mon, Jun 10, 2019 at 4:45 PM Yifeng Sun <pkusunyifeng@gmail.com> wrote:
>
> 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@gmail.com>
> ---

LGTM.
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>

Patch
diff mbox series

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)