From fd8ce7eafe71cd1ae149d716545884a73f9e261a Mon Sep 17 00:00:00 2001 From: ericm Date: Wed, 20 Aug 2003 11:23:33 +0000 Subject: [PATCH] [tcpnal]: - don't consider pid when doing connection search, it's conform to the ksocknal behavior. --- lnet/ulnds/connection.c | 16 +++++++++++++--- lnet/ulnds/socklnd/connection.c | 16 +++++++++++++--- lustre/portals/unals/connection.c | 16 +++++++++++++--- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/lnet/ulnds/connection.c b/lnet/ulnds/connection.c index f7956bc..0fe6e60 100644 --- a/lnet/ulnds/connection.c +++ b/lnet/ulnds/connection.c @@ -56,9 +56,14 @@ unsigned short tcpnal_acceptor_port = 988; */ static int compare_connection(void *arg1, void *arg2) { - connection c = arg1; - unsigned int * id = arg2; - return((c->ip==id[0]) && (c->port==id[1])); + connection c = arg1; + unsigned int * id = arg2; +#if 0 + return((c->ip==id[0]) && (c->port==id[1])); +#else + /* CFS specific hacking */ + return (c->ip == id[0]); +#endif } @@ -69,7 +74,12 @@ static int compare_connection(void *arg1, void *arg2) */ static unsigned int connection_key(unsigned int *id) { +#if 0 return(id[0]^id[1]); +#else + /* CFS specific hacking */ + return (unsigned int) id[0]; +#endif } diff --git a/lnet/ulnds/socklnd/connection.c b/lnet/ulnds/socklnd/connection.c index f7956bc..0fe6e60 100644 --- a/lnet/ulnds/socklnd/connection.c +++ b/lnet/ulnds/socklnd/connection.c @@ -56,9 +56,14 @@ unsigned short tcpnal_acceptor_port = 988; */ static int compare_connection(void *arg1, void *arg2) { - connection c = arg1; - unsigned int * id = arg2; - return((c->ip==id[0]) && (c->port==id[1])); + connection c = arg1; + unsigned int * id = arg2; +#if 0 + return((c->ip==id[0]) && (c->port==id[1])); +#else + /* CFS specific hacking */ + return (c->ip == id[0]); +#endif } @@ -69,7 +74,12 @@ static int compare_connection(void *arg1, void *arg2) */ static unsigned int connection_key(unsigned int *id) { +#if 0 return(id[0]^id[1]); +#else + /* CFS specific hacking */ + return (unsigned int) id[0]; +#endif } diff --git a/lustre/portals/unals/connection.c b/lustre/portals/unals/connection.c index f7956bc..0fe6e60 100644 --- a/lustre/portals/unals/connection.c +++ b/lustre/portals/unals/connection.c @@ -56,9 +56,14 @@ unsigned short tcpnal_acceptor_port = 988; */ static int compare_connection(void *arg1, void *arg2) { - connection c = arg1; - unsigned int * id = arg2; - return((c->ip==id[0]) && (c->port==id[1])); + connection c = arg1; + unsigned int * id = arg2; +#if 0 + return((c->ip==id[0]) && (c->port==id[1])); +#else + /* CFS specific hacking */ + return (c->ip == id[0]); +#endif } @@ -69,7 +74,12 @@ static int compare_connection(void *arg1, void *arg2) */ static unsigned int connection_key(unsigned int *id) { +#if 0 return(id[0]^id[1]); +#else + /* CFS specific hacking */ + return (unsigned int) id[0]; +#endif } -- 1.8.3.1