- 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.
/* 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 */
/* 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;
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"),
#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;
/* 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 */
/* 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;
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"),
#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;