net/smc: preallocated memory for rdma work requests
The work requests for rdma writes are built in local variables within function smc_tx_rdma_write(). This violates the rule that the work request storage has to stay till the work request is confirmed by a completion queue response. This patch introduces preallocated memory for these work requests. The storage is allocated, once a link (and thus a queue pair) is established. Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
53bc8d2af0
commit
ad6f317f72
@@ -270,10 +270,16 @@ static inline void smc_cdc_msg_to_host(struct smc_host_cdc_msg *local,
|
||||
smcr_cdc_msg_to_host(local, peer, conn);
|
||||
}
|
||||
|
||||
struct smc_cdc_tx_pend;
|
||||
struct smc_cdc_tx_pend {
|
||||
struct smc_connection *conn; /* socket connection */
|
||||
union smc_host_cursor cursor; /* tx sndbuf cursor sent */
|
||||
union smc_host_cursor p_cursor; /* rx RMBE cursor produced */
|
||||
u16 ctrl_seq; /* conn. tx sequence # */
|
||||
};
|
||||
|
||||
int smc_cdc_get_free_slot(struct smc_connection *conn,
|
||||
struct smc_wr_buf **wr_buf,
|
||||
struct smc_rdma_wr **wr_rdma_buf,
|
||||
struct smc_cdc_tx_pend **pend);
|
||||
void smc_cdc_tx_dismiss_slots(struct smc_connection *conn);
|
||||
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf,
|
||||
|
Reference in New Issue
Block a user