ksock_ltx_t *
ktoenal_get_ltx (int may_block)
{
- long flags;
+ unsigned long flags;
ksock_ltx_t *ltx = NULL;
for (;;)
}
void
-ktoenal_process_transmit (ksock_conn_t *conn, long *irq_flags)
+ktoenal_process_transmit (ksock_conn_t *conn, unsigned long *irq_flags)
{
ksock_tx_t *tx = list_entry (conn->ksnc_tx_queue.next, ksock_tx_t, tx_list);
int rc;
rc = 0; /* nothing sent */
else
{
-#warning FIXME: handle socket errors properly
+ //warning FIXME: handle socket errors properly
CERROR ("Error socknal send(%d) %p: %d\n", tx->tx_nob, conn, rc);
rc = tx->tx_nob; /* kid on for now whole packet went */
}
void
ktoenal_launch_packet (ksock_conn_t *conn, ksock_tx_t *tx)
{
- long flags;
+ unsigned long flags;
int nob = tx->tx_nob;
struct iovec *iov = tx->tx_iov;
int niov = 1;
for (;;)
{
LASSERT (niov <= tx->tx_niov);
- LASSERT (iov->iov_len >= 0);
if (iov->iov_len >= nob)
{
ksock_fmb_t *fmb = (ksock_fmb_t *)arg;
ptl_hdr_t *hdr = (ptl_hdr_t *) page_address(fmb->fmb_pages[0]);
ksock_conn_t *conn;
- long flags;
+ unsigned long flags;
CDEBUG (D_NET, "routed packet from "LPX64" to "LPX64": %d\n",
hdr->src_nid, hdr->dest_nid, error);
LASSERT (conn->ksnc_rx_state == SOCKNAL_RX_HEADER);
LASSERT (conn->ksnc_rx_scheduled);
- switch (conn->ksnc_hdr.type)
- {
- case PTL_MSG_GET:
- case PTL_MSG_ACK:
- body_len = 0;
- break;
- case PTL_MSG_PUT:
- body_len = conn->ksnc_hdr.msg.put.length;
- break;
- case PTL_MSG_REPLY:
- body_len = conn->ksnc_hdr.msg.reply.length;
- break;
- default:
- /* Unrecognised packet type */
- CERROR ("Unrecognised packet type %d from "LPX64" for "LPX64"\n",
- conn->ksnc_hdr.type, conn->ksnc_hdr.src_nid, conn->ksnc_hdr.dest_nid);
- /* Ignore this header and go back to reading a new packet. */
- ktoenal_new_packet (conn, 0);
- return;
- }
+ body_len = conn->ksnc_hdr.payload_length;
if (body_len < 0) /* length corrupt */
{
return;
}
- if (body_len > SOCKNAL_MAX_FWD_PAYLOAD) /* too big to forward */
+ if (body_len > PTL_MTU) /* too big to forward */
{
CERROR ("dropping packet from "LPX64" for "LPX64": packet size %d too big\n",
conn->ksnc_hdr.src_nid, conn->ksnc_hdr.dest_nid, body_len);
}
void
-ktoenal_process_receive (ksock_conn_t *conn, long *irq_flags)
+ktoenal_process_receive (ksock_conn_t *conn, unsigned long *irq_flags)
{
ksock_fmb_t *fmb;
int len;
if (len != -EAGAIN && /* ! nothing to read now */
len != 0) /* ! nothing to read ever */
{
-#warning FIXME: handle socket errors properly
+ // warning FIXME: handle socket errors properly
CERROR ("Error socknal read(%d) %p: %d\n",
conn->ksnc_rx_nob_wanted, conn, len);
}