summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_flow_dv.c
diff options
context:
space:
mode:
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>2019-03-27 13:15:43 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-29 17:25:32 +0100
commitf048f3d479a67b6df4b1183df98dfc0b2c75c6ac (patch)
tree05cd8ca10adc13b9fc69cc4c4dc4546038204650 /drivers/net/mlx5/mlx5_flow_dv.c
parentd485cdca01297c626cd4a9cd444fcf6596f167cd (diff)
downloaddpdk-next-eventdev-f048f3d479a67b6df4b1183df98dfc0b2c75c6ac.zip
dpdk-next-eventdev-f048f3d479a67b6df4b1183df98dfc0b2c75c6ac.tar.gz
dpdk-next-eventdev-f048f3d479a67b6df4b1183df98dfc0b2c75c6ac.tar.xz
net/mlx5: switch to the shared IB device context
The code is updated to use the shared IB device context and device handles. The IB device context is shared between reprentors created over the single multiport IB device. All Verbs and DevX objects will be created within this shared context. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_flow_dv.c')
-rw-r--r--drivers/net/mlx5/mlx5_flow_dv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index ebcdd15..d4a1149 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -836,7 +836,7 @@ flow_dv_encap_decap_resource_register
*cache_resource = *resource;
cache_resource->verbs_action =
mlx5_glue->dv_create_flow_action_packet_reformat
- (priv->ctx, cache_resource->size,
+ (priv->sh->ctx, cache_resource->size,
(cache_resource->size ? cache_resource->buf : NULL),
cache_resource->reformat_type,
cache_resource->ft_type);
@@ -1468,7 +1468,7 @@ flow_dv_modify_hdr_resource_register
*cache_resource = *resource;
cache_resource->verbs_action =
mlx5_glue->dv_create_flow_action_modify_header
- (priv->ctx,
+ (priv->sh->ctx,
cache_resource->actions_num *
sizeof(cache_resource->actions[0]),
(uint64_t *)cache_resource->actions,
@@ -1528,7 +1528,7 @@ flow_dv_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id)
ret = -ENOMEM;
goto error_exit;
}
- ret = mlx5_devx_cmd_flow_counter_alloc(priv->ctx, dcs);
+ ret = mlx5_devx_cmd_flow_counter_alloc(priv->sh->ctx, dcs);
if (ret)
goto error_exit;
struct mlx5_flow_counter tmpl = {
@@ -2787,7 +2787,7 @@ flow_dv_matcher_register(struct rte_eth_dev *dev,
if (matcher->egress)
dv_attr.flags |= IBV_FLOW_ATTR_FLAGS_EGRESS;
cache_matcher->matcher_object =
- mlx5_glue->dv_create_flow_matcher(priv->ctx, &dv_attr);
+ mlx5_glue->dv_create_flow_matcher(priv->sh->ctx, &dv_attr);
if (!cache_matcher->matcher_object) {
rte_free(cache_matcher);
return rte_flow_error_set(error, ENOMEM,