Whamcloud - gitweb
- eeb points out that we don't actually need test_bit
authorzab <zab>
Wed, 21 May 2003 00:57:52 +0000 (00:57 +0000)
committerzab <zab>
Wed, 21 May 2003 00:57:52 +0000 (00:57 +0000)
- 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
lnet/klnds/socklnd/socklnd_cb.c
lnet/tests/ping_srv.c
lustre/portals/knals/socknal/socknal.h
lustre/portals/knals/socknal/socknal_cb.c
lustre/portals/tests/ping_srv.c

index 2910937..5c6cfa7 100644 (file)
@@ -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;
index 3c805fd..153ac84 100644 (file)
@@ -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"),
index c4c8057..7488681 100644 (file)
 #include <asm/semaphore.h>
 
 #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;
index 2910937..5c6cfa7 100644 (file)
@@ -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;
index 3c805fd..153ac84 100644 (file)
@@ -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"),
index c4c8057..7488681 100644 (file)
 #include <asm/semaphore.h>
 
 #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;