Lines Matching refs:mdev

27 u16 mlx5e_ktls_get_stop_room(struct mlx5_core_dev *mdev, struct mlx5e_params *params)
31 if (!mlx5e_is_ktls_tx(mdev))
36 stop_room += mlx5e_stop_room_for_wqe(mdev, MLX5E_TLS_SET_STATIC_PARAMS_WQEBBS);
37 stop_room += mlx5e_stop_room_for_wqe(mdev, MLX5E_TLS_SET_PROGRESS_PARAMS_WQEBBS);
38 stop_room += num_dumps * mlx5e_stop_room_for_wqe(mdev, MLX5E_KTLS_DUMP_WQEBBS);
44 static void mlx5e_ktls_set_tisc(struct mlx5_core_dev *mdev, void *tisc)
47 MLX5_SET(tisc, tisc, pd, mdev->mlx5e_res.hw_objs.pdn);
48 MLX5_SET(tisc, tisc, transport_domain, mdev->mlx5e_res.hw_objs.td.tdn);
51 static int mlx5e_ktls_create_tis(struct mlx5_core_dev *mdev, u32 *tisn)
55 mlx5e_ktls_set_tisc(mdev, MLX5_ADDR_OF(create_tis_in, in, ctx));
57 return mlx5_core_create_tis(mdev, in, tisn);
60 static int mlx5e_ktls_create_tis_cb(struct mlx5_core_dev *mdev,
68 mlx5e_ktls_set_tisc(mdev, MLX5_ADDR_OF(create_tis_in, in, ctx));
75 static int mlx5e_ktls_destroy_tis_cb(struct mlx5_core_dev *mdev, u32 tisn,
99 struct mlx5_core_dev *mdev;
143 static struct mlx5e_bulk_async_ctx *mlx5e_bulk_async_init(struct mlx5_core_dev *mdev, int n)
154 mlx5_cmd_init_async_ctx(mdev, &bulk_async->async_ctx);
193 mlx5e_tls_priv_tx_init(struct mlx5_core_dev *mdev, struct mlx5e_tls_sw_stats *sw_stats,
203 priv_tx->mdev = mdev;
207 err = mlx5e_ktls_create_tis(mdev, &priv_tx->tisn);
212 err = mlx5e_ktls_create_tis_cb(mdev, async->async_ctx,
234 mlx5e_ktls_destroy_tis_cb(priv_tx->mdev, priv_tx->tisn,
240 static void mlx5e_tls_priv_tx_list_cleanup(struct mlx5_core_dev *mdev,
247 bulk_async = mlx5e_bulk_async_init(mdev, size);
267 struct mlx5_core_dev *mdev;
287 bulk_async = mlx5e_bulk_async_init(pool->mdev, MLX5E_TLS_TX_POOL_BULK);
292 obj = mlx5e_tls_priv_tx_init(pool->mdev, pool->sw_stats, &bulk_async->arr[i]);
324 mlx5e_tls_priv_tx_list_cleanup(pool->mdev, &local_list, i);
352 mlx5e_tls_priv_tx_list_cleanup(pool->mdev, &local_list, MLX5E_TLS_TX_POOL_BULK);
356 static struct mlx5e_tls_tx_pool *mlx5e_tls_tx_pool_init(struct mlx5_core_dev *mdev,
377 pool->mdev = mdev;
399 mlx5e_tls_priv_tx_list_cleanup(pool->mdev, &local_list, MLX5E_TLS_TX_POOL_BULK);
404 mlx5e_tls_priv_tx_list_cleanup(pool->mdev, &pool->list, pool->size);
437 obj = mlx5e_tls_priv_tx_init(pool->mdev, pool->sw_stats, NULL);
915 if (!mlx5e_is_ktls_device(priv->mdev))
921 dek_pool = mlx5_crypto_dek_pool_create(priv->mdev, MLX5_ACCEL_OBJ_TLS_KEY);
926 if (!mlx5e_is_ktls_tx(priv->mdev))
929 priv->tls->tx_pool = mlx5e_tls_tx_pool_init(priv->mdev, &priv->tls->sw_stats);
946 if (!mlx5e_is_ktls_tx(priv->mdev))
956 if (mlx5e_is_ktls_device(priv->mdev))