|
@@ -2011,8 +2011,8 @@ static void kiblnd_destroy_tx_pool(kib_pool_t *pool)
|
|
|
sizeof(*tx->tx_pages));
|
|
|
if (tx->tx_frags)
|
|
|
LIBCFS_FREE(tx->tx_frags,
|
|
|
- IBLND_MAX_RDMA_FRAGS *
|
|
|
- sizeof(*tx->tx_frags));
|
|
|
+ (1 + IBLND_MAX_RDMA_FRAGS) *
|
|
|
+ sizeof(*tx->tx_frags));
|
|
|
if (tx->tx_wrq)
|
|
|
LIBCFS_FREE(tx->tx_wrq,
|
|
|
(1 + IBLND_MAX_RDMA_FRAGS) *
|
|
@@ -2090,11 +2090,12 @@ static int kiblnd_create_tx_pool(kib_poolset_t *ps, int size,
|
|
|
}
|
|
|
|
|
|
LIBCFS_CPT_ALLOC(tx->tx_frags, lnet_cpt_table(), ps->ps_cpt,
|
|
|
- IBLND_MAX_RDMA_FRAGS * sizeof(*tx->tx_frags));
|
|
|
+ (1 + IBLND_MAX_RDMA_FRAGS) *
|
|
|
+ sizeof(*tx->tx_frags));
|
|
|
if (!tx->tx_frags)
|
|
|
break;
|
|
|
|
|
|
- sg_init_table(tx->tx_frags, IBLND_MAX_RDMA_FRAGS);
|
|
|
+ sg_init_table(tx->tx_frags, IBLND_MAX_RDMA_FRAGS + 1);
|
|
|
|
|
|
LIBCFS_CPT_ALLOC(tx->tx_wrq, lnet_cpt_table(), ps->ps_cpt,
|
|
|
(1 + IBLND_MAX_RDMA_FRAGS) *
|