File 0035-Support-SLE15-SP3-tcp-option-setting.patch of Package lustre_2_12

From d7f54ea5f0ddbe7457f1a3ef93b6f84ca8153034 Mon Sep 17 00:00:00 2001
From: Mr NeilBrown <neilb@suse.de>
Date: Wed, 23 Aug 2023 15:25:45 +1000
Subject: [PATCH 35/35] Support SLE15-SP3 tcp option setting.

SLE15-SP3 has both kernel_setsockopt() AND various
tcp_sock_set_FOO().
This confused lustre which doesn't expect both.
So de-confuse it.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
---
 libcfs/include/libcfs/linux/linux-net.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libcfs/include/libcfs/linux/linux-net.h b/libcfs/include/libcfs/linux/linux-net.h
index 41484bd3b44a..bd379c935022 100644
--- a/libcfs/include/libcfs/linux/linux-net.h
+++ b/libcfs/include/libcfs/linux/linux-net.h
@@ -27,6 +27,9 @@
 
 #include <net/tcp.h>
 
+#if defined(CONFIG_SUSE_VERSION) && CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL >= 3
+/* Already have these interfaces */
+#else
 static inline void tcp_sock_set_quickack(struct sock *sk, int opt)
 {
 	struct socket *sock = sk->sk_socket;
@@ -67,6 +70,7 @@ static inline int tcp_sock_set_keepcnt(struct sock *sk, int opt)
 	return kernel_setsockopt(sock, SOL_TCP, TCP_KEEPCNT,
 				 (char *)&opt, sizeof(opt));
 }
+#endif
 #endif /* HAVE_KERNEL_SETSOCKOPT */
 
 #endif /* __LIBCFS_LINUX_NET_H__ */
-- 
2.41.0

openSUSE Build Service is sponsored by