[ofa-general] [PATCH V1 2/2] sdplib: add KEEPALIVE support
Jim Mott
jim at mellanox.com
Tue Jul 31 05:07:03 PDT 2007
Hi,
This is the user space part of an OFED 1.3 patch to add keepalive
support to SDP.
Diff from OFED 1.2
Index: ofa_user/src/userspace/libsdp/src/port.c
===================================================================
--- ofa_user.orig/src/userspace/libsdp/src/port.c 2007-06-27
15:56:21.000000000 +0300
+++ ofa_user/src/userspace/libsdp/src/port.c 2007-07-03
20:16:47.000000000 +0300
@@ -793,8 +793,21 @@ setsockopt(
__sdp_log( 2, "SETSOCKOPT: <%s:%d:%d> level <%d> name <%d>\n",
program_invocation_short_name, fd,
shadow_fd, level, optname );
+ if (level == SOL_SOCKET && optname == SO_KEEPALIVE &&
get_is_sdp_socket(fd)) {
+ level = AF_INET_SDP;
+ __sdp_log( 2, "SETSOCKOPT: <%s:%d:%d> substitute level
%d\n",
+ program_invocation_short_name, fd, shadow_fd,
level );
+ }
+
ret = _socket_funcs.setsockopt( fd, level, optname, optval,
optlen );
if ( ( ret >= 0 ) && ( shadow_fd != -1 ) ) {
+ if (level == SOL_SOCKET && optname == SO_KEEPALIVE &&
+ get_is_sdp_socket(shadow_fd)) {
+ level = AF_INET_SDP;
+ __sdp_log( 2, "SETSOCKOPT: <%s:%d:%d> substitute
level %d\n",
+ program_invocation_short_name, fd,
shadow_fd, level );
+ }
+
sret = _socket_funcs.setsockopt( shadow_fd, level,
optname, optval, optlen );
if ( sret < 0 ) {
More information about the general
mailing list