mempool_t *pool;
} mem;
+ /*
+ * This is a coordination for smbdirect_send_batch.
+ *
+ * There's only one possible credit, which means
+ * only one instance is running at a time.
+ */
+ struct {
+ atomic_t count;
+ wait_queue_head_t wait_queue;
+ } bcredits;
+
/*
* The local credit state for ib_post_send()
*/
INIT_DELAYED_WORK(&sc->idle.timer_work, __smbdirect_socket_disabled_work);
disable_delayed_work_sync(&sc->idle.timer_work);
+ atomic_set(&sc->send_io.bcredits.count, 0);
+ init_waitqueue_head(&sc->send_io.bcredits.wait_queue);
+
atomic_set(&sc->send_io.lcredits.count, 0);
init_waitqueue_head(&sc->send_io.lcredits.wait_queue);
*/
bool need_invalidate_rkey;
u32 remote_key;
+
+ int credit;
};
struct smbdirect_recv_io {