From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uWUxzbrcDNKG+6euNpJzYpPz7bpptHZ+IVtIXWR/8yg=; b=YnacpKin0hQGUMz1MpQ3Qyp5TCDPNmjkJ7kCGrbgDmAMwtoMAZMlgtXZIR8GnVh8pp5RGq46LquT1ixupC9pouPeIldwFqRC3EMuR0550hHhZHXzbrlm+XApLjVYw5UycMgX4Gd282Y3VNdXVDPMCEqDsbsfRYCnJ8aLNJ9iWr0= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB4059.eurprd05.prod.outlook.com (52.134.66.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Wed, 10 Oct 2018 21:22:45 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045%2]) with mapi id 15.20.1207.029; Wed, 10 Oct 2018 21:22:45 +0000 From: Yongseok Koh To: Dekel Peled CC: Shahaf Shuler , "dev@dpdk.org" , Ori Kam Thread-Topic: [PATCH v4 1/4] net/mlx5: add flow action functions to glue Thread-Index: AQHUYHQ+y+T0g/yrt0Wh3kS49kHmhKUY/dIA 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> In-Reply-To: <1539160531-27953-2-git-send-email-dekelp@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0020.namprd07.prod.outlook.com (2603:10b6:a02:bc::33) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB4059; 6:X9r5i0MS14vmJ9asQPJrQH+TJruu5O41k7Huoo5YBxEH8SNQp8/5a1AvjtkMwWbLEh5LFssPYavrhczQHxMjGhueMJLxf/84yGCmRIg5i4/yAU3Yg00GeKG/XHwWFHSmQEeor3aPam9UXW80yRpcUiiV1QylPL0JwR8E4pNF3fzPLBK6t1Je6UWiPQU1WFaKhjRp710Ong5SSHS7o/TrSlIO35Q+ZdjC7lMyxTHgsSr9Krjhw9CZRDHWkjCu3DEilKiqwu6yNtYA1q/xxyveU5pXJm8/mXKxwnz/uzuIjYfUruNyfotle4E3oxh4vnKskGEXuGeN2odzr+mg5ZVHzhraNzK4CoON4QiaqddU/hnsWLPMPkP7KhiF9gDjc8w++RRTHz8vB8UuvAMyQi+h92x4V1vqL71TZcEmJWO+a0eCPz65BEHARqlpuDIsY/K7RBlXskETqM+sOYc9Daks+w==; 5:La6ZEsNy4d/VF03s9K2bqd+mBud4aYG3Wl53I7FUi7wSmrc7JtJXWMPDmMF4DQYUnmUPBDnQJLh89/aI5dR/GGaG4hK4X0IjBeTe+X9Ib14pH0RJOqwHXTkrRFseFc3jui+ITTvunv64nbyxrlwXUmv7v/Mftw/lqGU4vLT4DLI=; 7:dPPgMC2yJ7T7uZBtkKlpIP07JCTDvQJstkbcoXd2nEFKvXFnTgGLODMak4ItdZvtfV+E9efbZMJDLEMy0a97/Nd4v5jMZKi0G/Ajtq0qyqlgYJ5j/rP22k32UmDnlsChfp/98pGlNYgn6s4DQTzN9RfYO9xGsxvlVGRIp+mTmAXVAFOweKUESQSLbchuP/H+O9ndZNJ3yJgEHOq3JNK2GGnhHLcTJmDx9kcbcqxCLP3tEpq2ZJJsNmPWZrKfqj7d x-ms-office365-filtering-correlation-id: 5f17449a-3bfa-4320-560a-08d62ef6851a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB4059; x-ms-traffictypediagnostic: DB3PR0502MB4059: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231355)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051); SRVR:DB3PR0502MB4059; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB4059; x-forefront-prvs: 08213D42D3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(136003)(39860400002)(376002)(346002)(189003)(199004)(25786009)(66066001)(486006)(186003)(8676002)(305945005)(86362001)(81156014)(8936002)(53936002)(33656002)(9686003)(6512007)(14454004)(97736004)(2906002)(81166006)(6862004)(256004)(476003)(6636002)(26005)(4326008)(107886003)(6246003)(19627235002)(102836004)(446003)(478600001)(11346002)(99286004)(76176011)(3846002)(1076002)(33896004)(6116002)(52116002)(71190400001)(71200400001)(54906003)(68736007)(386003)(6506007)(5660300001)(229853002)(7736002)(316002)(106356001)(5250100002)(6436002)(105586002)(6486002)(2900100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4059; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 2dmwtic6cBRC8pu9LzL0MKxTYs/QmWZOx0Nin1Ll+vxTXfL5svg6JoJu/49/FbhHu76vJKGkKA2lP7VPCe6v7z0SWEn8dyuYveYczeUZ48E6ucTZgJ4mcpMaqym5OuSAd0p7EwUL8d14t3W2164FbItXYvLjYaoq0qutVDRbXCTiGmB2F7wHAmkkdiTVE3PK9bY0GblZA2QjTYxdbdLf60cWrLTy7oo35O9nyJ/sdf3B9RS0gkPEuRfuFp/awSvlX5BukNw374INWVJu6q3aYxQKP3y3vY7CB1DDz3d+0E3msYnTSZ6pFBVyFpVPrKBgfh5PThD/Uznul6Yptg5qsDfIum7Aeo3MhawTfAr26z4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <059645C555DE564DB2A08A1BB5722EBF@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f17449a-3bfa-4320-560a-08d62ef6851a X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2018 21:22:45.3815 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4059 Subject: Re: [dpdk-dev] [PATCH v4 1/4] net/mlx5: add flow action functions to glue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2018 21:22:46 -0000 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',