[dpdk-dev] [PATCH v5 1/4] net/mlx5: add flow action functions to glue
Yongseok Koh
yskoh at mellanox.com
Thu Oct 11 19:05:09 CEST 2018
> On Oct 11, 2018, at 5:12 AM, Dekel Peled <dekelp at mellanox.com> wrote:
>
> This patch adds glue functions for operations:
> - Create packet reformat (encap/decap) flow action.
> - Destroy flow action.
>
> The new operations depend on HAVE_IBV_FLOW_DV_SUPPORT.
>
> Signed-off-by: Dekel Peled <dekelp at mellanox.com>
> ---
> drivers/net/mlx5/Makefile | 2 +-
> drivers/net/mlx5/meson.build | 2 +-
> drivers/net/mlx5/mlx5_glue.c | 38 ++++++++++++++++++++++++++++++++++++++
> drivers/net/mlx5/mlx5_glue.h | 10 ++++++++++
> 4 files changed, 50 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
> index 92bae9d..bbfb686 100644
> --- a/drivers/net/mlx5/Makefile
> +++ b/drivers/net/mlx5/Makefile
> @@ -139,7 +139,7 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
> $Q sh -- '$<' '$@' \
> HAVE_IBV_FLOW_DV_SUPPORT \
> infiniband/mlx5dv.h \
> - enum MLX5DV_FLOW_ACTION_TAG \
> + func mlx5dv_create_flow_action_packet_reformat \
> $(AUTOCONF_OUTPUT)
> $Q sh -- '$<' '$@' \
> HAVE_ETHTOOL_LINK_MODE_25G \
> diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
> index 6966248..c93347c 100644
> --- a/drivers/net/mlx5/meson.build
> +++ b/drivers/net/mlx5/meson.build
> @@ -95,7 +95,7 @@ if build
> [ 'HAVE_IBV_MLX5_MOD_CQE_128B_COMP', 'infiniband/mlx5dv.h',
> 'MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP' ],
> [ 'HAVE_IBV_FLOW_DV_SUPPORT', 'infiniband/mlx5dv.h',
> - 'MLX5DV_FLOW_ACTION_TAG' ],
> + 'mlx5dv_create_flow_action_packet_reformat' ],
> [ 'HAVE_IBV_DEVICE_MPLS_SUPPORT', 'infiniband/verbs.h',
> 'IBV_FLOW_SPEC_MPLS' ],
> [ 'HAVE_IBV_WQ_FLAG_RX_END_PADDING', 'infiniband/verbs.h',
> diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
> index 48590df..565c2cf 100644
> --- a/drivers/net/mlx5/mlx5_glue.c
> +++ b/drivers/net/mlx5/mlx5_glue.c
> @@ -174,6 +174,17 @@
> return ibv_destroy_flow(flow_id);
> }
>
> +static int
> +mlx5_glue_destroy_flow_action(struct ibv_flow_action *action)
> +{
> +#ifdef HAVE_IBV_FLOW_DV_SUPPORT
> + return ibv_destroy_flow_action(action);
> +#else
> + (void)action;
> + return -ENOTSUP;
Please revert it to positive value and submit v6 with my acked-by tag.
Thanks
Yongseok
More information about the dev
mailing list