Whamcloud - gitweb
LU-12400 lnet: SO_SNDTIMEO, SO_RCVTIMEO removed 37/35237/4
authorShaun Tancheff <stancheff@cray.com>
Mon, 15 Jul 2019 17:28:01 +0000 (12:28 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 20 Jul 2019 18:38:32 +0000 (18:38 +0000)
Y2038 64-bit time removed socket options that specify time.
The previous interface is available under _OLD and versions
expecting timespec64 are _NEW.

Linux-commit: 7f1bc6e95d7840d4305595b3e4025cddda88cee5

Test-Parameters: trivial
Cray-bug-id: LUS-7600
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I73ad3aa61afdfeba6160d95470b22cea03ed17f9
Reviewed-on: https://review.whamcloud.com/35237
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-socket.c

index 85bb413..4a8bf1a 100644 (file)
 #include <libcfs/libcfs.h>
 #include <lnet/lib-lnet.h>
 
 #include <libcfs/libcfs.h>
 #include <lnet/lib-lnet.h>
 
+/*
+ * kernel 5.1: commit 7f1bc6e95d7840d4305595b3e4025cddda88cee5
+ * Y2038 64-bit time.
+ *  SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING options, the
+ *  way they are currently defined, are not y2038 safe.
+ *  Subsequent patches in the series add new y2038 safe versions
+ *  of these options which provide 64 bit timestamps on all
+ *  architectures uniformly.
+ *  Hence, rename existing options with OLD tag suffixes.
+ *
+ * NOTE: When updating to timespec64 change change these to '_NEW'.
+ *
+ */
+#ifndef SO_SNDTIMEO
+#define SO_SNDTIMEO SO_SNDTIMEO_OLD
+#endif
+
+#ifndef SO_RCVTIMEO
+#define SO_RCVTIMEO SO_RCVTIMEO_OLD
+#endif
+
 int
 lnet_sock_write(struct socket *sock, void *buffer, int nob, int timeout)
 {
 int
 lnet_sock_write(struct socket *sock, void *buffer, int nob, int timeout)
 {