From 0fc245ac77c8531bb1e043ca3f60b26788a72f11 Mon Sep 17 00:00:00 2001 From: zab Date: Wed, 21 May 2003 00:57:52 +0000 Subject: [PATCH] - eeb points out that we don't actually need test_bit - don't try and vmalloc _16 meg_ in the ping server, 16k is fine, I promise. - nurr, really default to the socknal in the ping server. --- lnet/klnds/socklnd/socklnd.h | 4 ++-- lnet/klnds/socklnd/socklnd_cb.c | 2 +- lnet/tests/ping_srv.c | 4 ++-- lustre/portals/knals/socknal/socknal.h | 4 ++-- lustre/portals/knals/socknal/socknal_cb.c | 2 +- lustre/portals/tests/ping_srv.c | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lnet/klnds/socklnd/socklnd.h b/lnet/klnds/socklnd/socklnd.h index 2910937..5c6cfa7 100644 --- a/lnet/klnds/socklnd/socklnd.h +++ b/lnet/klnds/socklnd/socklnd.h @@ -241,7 +241,7 @@ typedef struct /* READER */ struct list_head ksnc_rx_list; /* where I enq waiting input or a forwarding descriptor */ - unsigned long ksnc_rx_ready; /* data ready to read */ + int ksnc_rx_ready; /* data ready to read */ int ksnc_rx_scheduled; /* being progressed */ int ksnc_rx_state; /* what is being read */ int ksnc_rx_nob_left; /* # bytes to next hdr/body */ @@ -257,7 +257,7 @@ typedef struct /* WRITER */ struct list_head ksnc_tx_list; /* where I enq waiting for output space */ struct list_head ksnc_tx_queue; /* packets waiting to be sent */ - unsigned long ksnc_tx_ready; /* write space */ + int ksnc_tx_ready; /* write space */ int ksnc_tx_scheduled; /* being progressed */ } ksock_conn_t; diff --git a/lnet/klnds/socklnd/socklnd_cb.c b/lnet/klnds/socklnd/socklnd_cb.c index 3c805fd..153ac84 100644 --- a/lnet/klnds/socklnd/socklnd_cb.c +++ b/lnet/klnds/socklnd/socklnd_cb.c @@ -1514,7 +1514,7 @@ ksocknal_write_space (struct sock *sk) CDEBUG(D_NET, "sk %p wspace %d low water %d conn %p%s%s%s\n", sk, tcp_wspace(sk), SOCKNAL_TX_LOW_WATER(sk), conn, - (conn == NULL) ? "" : (test_bit (0, &conn->ksnc_tx_ready) ? + (conn == NULL) ? "" : (conn->ksnc_tx_ready ? " ready" : " blocked"), (conn == NULL) ? "" : (conn->ksnc_tx_scheduled ? " scheduled" : " idle"), diff --git a/lnet/tests/ping_srv.c b/lnet/tests/ping_srv.c index c4c8057..7488681 100644 --- a/lnet/tests/ping_srv.c +++ b/lnet/tests/ping_srv.c @@ -47,11 +47,11 @@ #include #define STDSIZE (sizeof(int) + sizeof(int) + sizeof(struct timeval)) -#define MAXSIZE (16*1024*1024) +#define MAXSIZE (16*1024) static unsigned ping_head_magic; static unsigned ping_bulk_magic; -static int nal = 1; // Your NAL, +static int nal = SOCKNAL; // Your NAL, static unsigned long packets_valid = 0; // Valid packets static int running = 1; atomic_t pkt; diff --git a/lustre/portals/knals/socknal/socknal.h b/lustre/portals/knals/socknal/socknal.h index 2910937..5c6cfa7 100644 --- a/lustre/portals/knals/socknal/socknal.h +++ b/lustre/portals/knals/socknal/socknal.h @@ -241,7 +241,7 @@ typedef struct /* READER */ struct list_head ksnc_rx_list; /* where I enq waiting input or a forwarding descriptor */ - unsigned long ksnc_rx_ready; /* data ready to read */ + int ksnc_rx_ready; /* data ready to read */ int ksnc_rx_scheduled; /* being progressed */ int ksnc_rx_state; /* what is being read */ int ksnc_rx_nob_left; /* # bytes to next hdr/body */ @@ -257,7 +257,7 @@ typedef struct /* WRITER */ struct list_head ksnc_tx_list; /* where I enq waiting for output space */ struct list_head ksnc_tx_queue; /* packets waiting to be sent */ - unsigned long ksnc_tx_ready; /* write space */ + int ksnc_tx_ready; /* write space */ int ksnc_tx_scheduled; /* being progressed */ } ksock_conn_t; diff --git a/lustre/portals/knals/socknal/socknal_cb.c b/lustre/portals/knals/socknal/socknal_cb.c index 3c805fd..153ac84 100644 --- a/lustre/portals/knals/socknal/socknal_cb.c +++ b/lustre/portals/knals/socknal/socknal_cb.c @@ -1514,7 +1514,7 @@ ksocknal_write_space (struct sock *sk) CDEBUG(D_NET, "sk %p wspace %d low water %d conn %p%s%s%s\n", sk, tcp_wspace(sk), SOCKNAL_TX_LOW_WATER(sk), conn, - (conn == NULL) ? "" : (test_bit (0, &conn->ksnc_tx_ready) ? + (conn == NULL) ? "" : (conn->ksnc_tx_ready ? " ready" : " blocked"), (conn == NULL) ? "" : (conn->ksnc_tx_scheduled ? " scheduled" : " idle"), diff --git a/lustre/portals/tests/ping_srv.c b/lustre/portals/tests/ping_srv.c index c4c8057..7488681 100644 --- a/lustre/portals/tests/ping_srv.c +++ b/lustre/portals/tests/ping_srv.c @@ -47,11 +47,11 @@ #include #define STDSIZE (sizeof(int) + sizeof(int) + sizeof(struct timeval)) -#define MAXSIZE (16*1024*1024) +#define MAXSIZE (16*1024) static unsigned ping_head_magic; static unsigned ping_bulk_magic; -static int nal = 1; // Your NAL, +static int nal = SOCKNAL; // Your NAL, static unsigned long packets_valid = 0; // Valid packets static int running = 1; atomic_t pkt; -- 1.8.3.1