{
struct smbdirect_socket *sc = &info->socket;
- queue_work(info->workqueue, &sc->disconnect_work);
+ queue_work(sc->workqueue, &sc->disconnect_work);
}
/* Upcall from RDMA CM */
if (atomic_read(&sc->recv_io.credits.count) <
sc->recv_io.credits.target - 1) {
log_keep_alive(INFO, "schedule send of an empty message\n");
- queue_work(info->workqueue, &sc->idle.immediate_work);
+ queue_work(sc->workqueue, &sc->idle.immediate_work);
}
}
* order to trigger our next keepalive message.
*/
sc->idle.keepalive = SMBDIRECT_KEEPALIVE_NONE;
- mod_delayed_work(info->workqueue, &sc->idle.timer_work,
+ mod_delayed_work(sc->workqueue, &sc->idle.timer_work,
msecs_to_jiffies(sp->keepalive_interval_msec));
switch (sc->recv_io.expected) {
if (le16_to_cpu(data_transfer->flags) &
SMBDIRECT_FLAG_RESPONSE_REQUESTED) {
log_keep_alive(INFO, "schedule send of immediate response\n");
- queue_work(info->workqueue, &sc->idle.immediate_work);
+ queue_work(sc->workqueue, &sc->idle.immediate_work);
}
/*
*/
if (data_length) {
if (sc->recv_io.credits.target > old_recv_credit_target)
- queue_work(info->workqueue, &sc->recv_io.posted.refill_work);
+ queue_work(sc->workqueue, &sc->recv_io.posted.refill_work);
enqueue_reassembly(info, response, data_length);
wake_up(&sc->recv_io.reassembly.wait_queue);
* Now use the keepalive timeout (instead of keepalive interval)
* in order to wait for a response
*/
- mod_delayed_work(info->workqueue, &sc->idle.timer_work,
+ mod_delayed_work(sc->workqueue, &sc->idle.timer_work,
msecs_to_jiffies(sp->keepalive_timeout_msec));
return 1;
}
sc->statistics.put_receive_buffer++;
spin_unlock_irqrestore(&sc->recv_io.free.lock, flags);
- queue_work(info->workqueue, &sc->recv_io.posted.refill_work);
+ queue_work(sc->workqueue, &sc->recv_io.posted.refill_work);
}
/* Preallocate all receive buffer on transport establishment */
* in order to wait for a response
*/
sc->idle.keepalive = SMBDIRECT_KEEPALIVE_PENDING;
- mod_delayed_work(info->workqueue, &sc->idle.timer_work,
+ mod_delayed_work(sc->workqueue, &sc->idle.timer_work,
msecs_to_jiffies(sp->keepalive_timeout_msec));
log_keep_alive(INFO, "schedule send of empty idle message\n");
- queue_work(info->workqueue, &sc->idle.immediate_work);
+ queue_work(sc->workqueue, &sc->idle.immediate_work);
}
/*
sc->status = SMBDIRECT_SOCKET_DESTROYED;
- destroy_workqueue(info->workqueue);
+ destroy_workqueue(sc->workqueue);
log_rdma_event(INFO, "rdma session destroyed\n");
kfree(info);
server->smbd_conn = NULL;
struct smbdirect_socket *sc = &info->socket;
destroy_receive_buffers(info);
- destroy_workqueue(info->workqueue);
+ destroy_workqueue(sc->workqueue);
mempool_destroy(sc->recv_io.mem.pool);
kmem_cache_destroy(sc->recv_io.mem.cache);
mempool_destroy(sc->send_io.mem.pool);
goto out3;
scnprintf(name, MAX_NAME_LEN, "smbd_%p", info);
- info->workqueue = create_workqueue(name);
- if (!info->workqueue)
+ sc->workqueue = create_workqueue(name);
+ if (!sc->workqueue)
goto out4;
rc = allocate_receive_buffers(info, sp->recv_credit_max);
return 0;
out5:
- destroy_workqueue(info->workqueue);
+ destroy_workqueue(sc->workqueue);
out4:
mempool_destroy(sc->recv_io.mem.pool);
out3:
* so that the timer will cause a disconnect.
*/
sc->idle.keepalive = SMBDIRECT_KEEPALIVE_PENDING;
- mod_delayed_work(info->workqueue, &sc->idle.timer_work,
+ mod_delayed_work(sc->workqueue, &sc->idle.timer_work,
msecs_to_jiffies(sp->negotiate_timeout_msec));
INIT_WORK(&sc->recv_io.posted.refill_work, smbd_post_send_credits);
* Schedule the work to do MR recovery for future I/Os MR
* recovery is slow and don't want it to block current I/O
*/
- queue_work(info->workqueue, &info->mr_recovery_work);
+ queue_work(sc->workqueue, &info->mr_recovery_work);
done:
if (atomic_dec_and_test(&info->mr_used_count))