X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx5%2Fmlx5_flow.c;h=c347f8130e114166974367881cf3c5edc2d8817b;hb=6a11a1eac0b6dcd52580eef99cf6f09e3361cc3b;hp=de4e4a374abaff4c567adfd8669cf1e8b86bcb52;hpb=048f0d45e3420cc3569f60e2d9b5ee447ae34fd1;p=dpdk.git diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index de4e4a374a..c347f8130e 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -6498,40 +6498,20 @@ mlx5_flow_query(struct rte_eth_dev *dev, } /** - * Manage filter operations. + * Get rte_flow callbacks. * * @param dev * Pointer to Ethernet device structure. - * @param filter_type - * Filter type. - * @param filter_op - * Operation to perform. - * @param arg + * @param ops * Pointer to operation-specific structure. * - * @return - * 0 on success, a negative errno value otherwise and rte_errno is set. + * @return 0 */ int -mlx5_dev_filter_ctrl(struct rte_eth_dev *dev, - enum rte_filter_type filter_type, - enum rte_filter_op filter_op, - void *arg) -{ - switch (filter_type) { - case RTE_ETH_FILTER_GENERIC: - if (filter_op != RTE_ETH_FILTER_GET) { - rte_errno = EINVAL; - return -rte_errno; - } - *(const void **)arg = &mlx5_flow_ops; - return 0; - default: - DRV_LOG(ERR, "port %u filter type (%d) not supported", - dev->data->port_id, filter_type); - rte_errno = ENOTSUP; - return -rte_errno; - } +mlx5_flow_ops_get(struct rte_eth_dev *dev __rte_unused, + const struct rte_flow_ops **ops) +{ + *ops = &mlx5_flow_ops; return 0; } @@ -7901,10 +7881,11 @@ static void get_tunnel_miss(struct rte_eth_dev *dev, void *x) rte_spinlock_unlock(&thub->sl); ctx->tunnel = mlx5_flow_tunnel_allocate(dev, ctx->app_tunnel); - ctx->tunnel->refctn = 1; rte_spinlock_lock(&thub->sl); - if (ctx->tunnel) + if (ctx->tunnel) { + ctx->tunnel->refctn = 1; LIST_INSERT_HEAD(&thub->tunnels, ctx->tunnel, chain); + } }