* @param rss
* RSS context to release.
*/
-void mlx4_rss_put(struct mlx4_rss *rss)
+void
+mlx4_rss_put(struct mlx4_rss *rss)
{
assert(rss->refcnt);
if (--rss->refcnt)
* @return
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
-int mlx4_rss_attach(struct mlx4_rss *rss)
+int
+mlx4_rss_attach(struct mlx4_rss *rss)
{
assert(rss->refcnt);
if (rss->usecnt++) {
* @param rss
* RSS context to detach from.
*/
-void mlx4_rss_detach(struct mlx4_rss *rss)
+void
+mlx4_rss_detach(struct mlx4_rss *rss)
{
struct priv *priv = rss->priv;
unsigned int i;
struct rte_mbuf *(*elts)[elts_n] = rxq->elts;
struct mlx4dv_obj mlxdv;
struct mlx4dv_rwq dv_rwq;
- struct mlx4dv_cq dv_cq;
+ struct mlx4dv_cq dv_cq = { .comp_mask = MLX4DV_CQ_MASK_UAR, };
const char *msg;
struct ibv_cq *cq = NULL;
struct ibv_wq *wq = NULL;
rxq->mcq.cqe_cnt = dv_cq.cqe_cnt;
rxq->mcq.set_ci_db = dv_cq.set_ci_db;
rxq->mcq.cqe_64 = (dv_cq.cqe_size & 64) ? 1 : 0;
+ rxq->mcq.arm_db = dv_cq.arm_db;
+ rxq->mcq.arm_sn = dv_cq.arm_sn;
+ rxq->mcq.cqn = dv_cq.cqn;
+ rxq->mcq.cq_uar = dv_cq.cq_uar;
+ rxq->mcq.cq_db_reg = (uint8_t *)dv_cq.cq_uar + MLX4_CQ_DOORBELL;
/* Update doorbell counter. */
rxq->rq_ci = elts_n / sges_n;
rte_wmb();
dev->data->dev_conf.rxmode.hw_ip_checksum),
.csum_l2tun = (priv->hw_csum_l2tun &&
dev->data->dev_conf.rxmode.hw_ip_checksum),
+ .l2tun_offload = priv->hw_csum_l2tun,
.stats = {
.idx = idx,
},
goto error;
}
/* Use the entire Rx mempool as the memory region. */
- rxq->mr = mlx4_mp2mr(priv->pd, mp);
+ rxq->mr = mlx4_mr_get(priv, mp);
if (!rxq->mr) {
- rte_errno = EINVAL;
ERROR("%p: MR creation failure: %s",
(void *)dev, strerror(rte_errno));
goto error;
if (rxq->channel)
claim_zero(ibv_destroy_comp_channel(rxq->channel));
if (rxq->mr)
- claim_zero(ibv_dereg_mr(rxq->mr));
+ mlx4_mr_put(rxq->mr);
rte_free(rxq);
}