From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH v4 1/4] net/mlx5: add flow action functions to glue Date: Wed, 10 Oct 2018 21:22:45 +0000 Message-ID: <20181010212235.GJ9031@mtidpdk.mti.labs.mlnx> References: <1539113137-4914-1-git-send-email-dekelp@mellanox.com> <1539160531-27953-2-git-send-email-dekelp@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Shahaf Shuler , "dev@dpdk.org" , Ori Kam To: Dekel Peled Return-path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0051.outbound.protection.outlook.com [104.47.1.51]) by dpdk.org (Postfix) with ESMTP id 6FB751B20A for ; Wed, 10 Oct 2018 23:22:46 +0200 (CEST) In-Reply-To: <1539160531-27953-2-git-send-email-dekelp@mellanox.com> Content-Language: en-US Content-ID: <059645C555DE564DB2A08A1BB5722EBF@eurprd05.prod.outlook.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Oct 10, 2018 at 11:35:28AM +0300, Dekel Peled wrote: > This patch adds glue functions for operations: > - Create packet reformat (encap/decap) flow action. > - Destroy flow action. >=20 > The new operations depend on HAVE_IBV_FLOW_ACTION_DV_SUPPORT. >=20 > Signed-off-by: Dekel Peled > --- > drivers/net/mlx5/Makefile | 5 +++++ > drivers/net/mlx5/meson.build | 2 ++ > drivers/net/mlx5/mlx5_glue.c | 38 ++++++++++++++++++++++++++++++++++++++ > drivers/net/mlx5/mlx5_glue.h | 13 +++++++++++++ > 4 files changed, 58 insertions(+) >=20 > diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile > index 92bae9d..474ad42 100644 > --- a/drivers/net/mlx5/Makefile > +++ b/drivers/net/mlx5/Makefile > @@ -142,6 +142,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-conf= ig-h.sh > enum MLX5DV_FLOW_ACTION_TAG \ > $(AUTOCONF_OUTPUT) > $Q sh -- '$<' '$@' \ > + HAVE_IBV_FLOW_ACTION_DV_SUPPORT \ > + infiniband/mlx5dv.h \ > + func mlx5dv_create_flow_action_packet_reformat \ > + $(AUTOCONF_OUTPUT) I thought you also added this macro to the code in mlx5_flow_dv.c but you didn't. My original concern was about a case where DV is supported (HAVE_IBV_FLOW_DV_SUPPORT) but the new flow action (HAVE_IBV_FLOW_ACTION_DV_SUPPORT) isn't supported. Your code won't be compi= led in such a chase. There's one more option to consider, which is much simpler. You can change = the HAVE_IBV_FLOW_DV_SUPPORT to check the new function. $Q sh -- '$<' '$@' \ HAVE_IBV_FLOW_DV_SUPPORT \ infiniband/mlx5dv.h \ func mlx5dv_create_flow_action_packet_reformat \ $(AUTOCONF_OUTPUT) If we don't need to support two different versions of library, (or there co= uld be only one version supporting both), it isn't necessary to have two separa= te macros. Let's take it offline to talk to lib/ker team. Thanks, Yongseok > + $Q sh -- '$<' '$@' \ > HAVE_ETHTOOL_LINK_MODE_25G \ > /usr/include/linux/ethtool.h \ > enum ETHTOOL_LINK_MODE_25000baseCR_Full_BIT \ > diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build > index 6966248..d555c3c 100644 > --- a/drivers/net/mlx5/meson.build > +++ b/drivers/net/mlx5/meson.build > @@ -96,6 +96,8 @@ if build > 'MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP' ], > [ 'HAVE_IBV_FLOW_DV_SUPPORT', 'infiniband/mlx5dv.h', > 'MLX5DV_FLOW_ACTION_TAG' ], > + [ 'HAVE_IBV_FLOW_ACTION_DV_SUPPORT', 'infiniband/mlx5dv.h', > + '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',