static int
ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote)
{
- ksock_peer_t *peer = c->ksnc_peer;
+ ksock_peer_ni_t *peer_ni = c->ksnc_peer;
ksock_conn_t *conn;
ksock_tx_t *tx;
int rc;
read_lock(&ksocknal_data.ksnd_global_lock);
- conn = ksocknal_find_conn_locked(peer, NULL, !!remote);
+ conn = ksocknal_find_conn_locked(peer_ni, NULL, !!remote);
if (conn != NULL) {
ksock_sched_t *sched = conn->ksnc_scheduler;
if (tx == NULL)
return -ENOMEM;
- if ((rc = ksocknal_launch_packet(peer->ksnp_ni, tx, peer->ksnp_id)) == 0)
+ if ((rc = ksocknal_launch_packet(peer_ni->ksnp_ni, tx, peer_ni->ksnp_id)) == 0)
return 0;
ksocknal_free_tx(tx);
static int
ksocknal_handle_zcack(ksock_conn_t *conn, __u64 cookie1, __u64 cookie2)
{
- ksock_peer_t *peer = conn->ksnc_peer;
+ ksock_peer_ni_t *peer_ni = conn->ksnc_peer;
ksock_tx_t *tx;
ksock_tx_t *tmp;
struct list_head zlist = LIST_HEAD_INIT(zlist);
return count == 1 ? 0 : -EPROTO;
}
- spin_lock(&peer->ksnp_lock);
+ spin_lock(&peer_ni->ksnp_lock);
list_for_each_entry_safe(tx, tmp,
- &peer->ksnp_zc_req_list, tx_zc_list) {
+ &peer_ni->ksnp_zc_req_list, tx_zc_list) {
__u64 c = tx->tx_msg.ksm_zc_cookies[0];
if (c == cookie1 || c == cookie2 || (cookie1 < c && c < cookie2)) {
}
}
- spin_unlock(&peer->ksnp_lock);
+ spin_unlock(&peer_ni->ksnp_lock);
while (!list_empty(&zlist)) {
tx = list_entry(zlist.next, ksock_tx_t, tx_zc_list);