From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01hn0213.outbound.protection.outlook.com [104.47.2.213]) by dpdk.org (Postfix) with ESMTP id 8FEE12BE6 for ; Sun, 22 Jul 2018 13:21:25 +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=WGg7z8SuGeQ3wif0+V8X5uQWJOmKlV1oajuzPGrJH4Q=; b=hvCSblvKaPKygP5zGFatpQSzbIlWMpP2xz2jKpC/jS8G2lA/ho/e6olNsY1tPQJhrTSLpz7Ea2b3dmhAL8sf366mBws0ooF6pzCySFHe/4gjjzizRM2pPCZXwUz2hOMLKj/JhB+ZQm+cPaEEdi5RofJ2RxSqAvKlFZunkA0sTxA= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4987.eurprd05.prod.outlook.com (20.176.236.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Sun, 22 Jul 2018 11:21:17 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3%3]) with mapi id 15.20.0952.022; Sun, 22 Jul 2018 11:21:17 +0000 From: Shahaf Shuler To: Adrien Mazarguil CC: =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , Yongseok Koh , "dev@dpdk.org" , Guillaume Gaudonville , Raslan Darawsheh , Wael Abualrub Thread-Topic: [PATCH v2 0/6] net/mlx5: add support for switch flow rules Thread-Index: AQHUGo2YsjC/gxm8QEamay2sNtnqVaSazu/A Date: Sun, 22 Jul 2018 11:21:17 +0000 Message-ID: References: <20180627173355.4718-1-adrien.mazarguil@6wind.com> <20180713092910.26276-1-adrien.mazarguil@6wind.com> In-Reply-To: <20180713092910.26276-1-adrien.mazarguil@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4987; 7:ISJU+azrwnkfxLU7m++tdKc4zl9dmgDepQ44s6+WQ4Y7FuK6++4K5ZJ28yNX7+rouErU/acciUKMB+Vu3JMaLvQ5nMxXKTt6errqoG6P2Z30vlxeQR8o2BTIxesfUcPmFg8bFl3WN+U1b9MmAjnw0RuMUIAgHRzI0yOvtOMoFOCttKixHVxSVNCYEl/rHUbYyW3az2hwzmMLgRqoid6nYHFOx/S/Fk7CBjTVM1nQjcrL6aARE5etchyakMUkjlRZ x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 3a786312-56e8-4093-afde-08d5efc53e37 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4987; x-ms-traffictypediagnostic: DB7PR05MB4987:|DB7PR05MB4987: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397)(66839620246622); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231311)(2232096)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DB7PR05MB4987; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4987; x-forefront-prvs: 0741C77572 x-forefront-antispam-report: SFV:SPM; SFS:(10009020)(376002)(346002)(39860400002)(396003)(366004)(136003)(189003)(199004)(102836004)(9686003)(6506007)(478600001)(76176011)(5250100002)(186003)(97736004)(26005)(33656002)(107886003)(66066001)(81166006)(105586002)(14454004)(81156014)(74316002)(4326008)(256004)(6246003)(99286004)(476003)(486006)(14444005)(11346002)(446003)(25786009)(7696005)(53936002)(68736007)(229853002)(2906002)(6116002)(2900100001)(3846002)(106356001)(6916009)(6436002)(55016002)(8676002)(305945005)(8936002)(54906003)(5660300001)(7736002)(316002)(86362001)(59010400001); DIR:OUT; SFP:1501; SCL:5; SRVR:DB7PR05MB4987; H:DB7PR05MB4426.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: N4T0bs1uVGSoPMVfwNCE3NvIr+5yPjHS1D0LYWCiE3hNsbCdEaMyYpGZe9CaXOCffAANdRfitKiwzzMGzFEuJqa298CIRxOm68GEiiNYmUohj9bwbu/zvjqpfyf11vd7/vF4+iac4yP2C4cLzLYA4OZIAhjqmUcFuOhrUfzE2s1OmaVWJMzhhBDLWY/n3fe5/aGyJ53P+FRyY2kRIGxpxcqK6kSDzn6qcoWZpk7bzLs0I22YWigqp8H7uTMxvg0pNt1ikGWOoJ26HNN5ix/NcaUSSTDrOJ7cQJ9qu/dRAtw3t0ed4LC+hJm4urfFY+Y9sjUeTPm3WEPDdhwiwYidn4DaIVn8UkMKh0G9v7LTTmm52uKqxCERbIIPTQ5u2IzLzGfUPOLI0kSe3acBKeZms2ixZ8kH+Tq6qdyEuuIR6SFcrbiYD6vdEk+znbDOhrfO3nMeRMUsyk0swljdumAnGIacQi64eRFCGbesHoXINpg2FBadG5JRw3p85BosKBWG5PFMDEGisL+aH+KYbzvpVy7EtGLVnHx24NBc1FIu4MBAzJXvAVbrizWtxuqcCO1K6/4l9LsfdHoPARWyIZFz4zdo173rLP8MTlugWgETyUMVwFG1lz2Sh9IBRUASMZfMuQSElJ6tn5Z9lUCXc3vkNTOFx8E1XQKeuaPnFdg6VbXQn/ssXVd4jAJQ8KCvKppIdXjuOJ4LoGr2OsCkrY3NLw== spamdiagnosticoutput: 1:22 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a786312-56e8-4093-afde-08d5efc53e37 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2018 11:21:17.2975 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4987 Subject: Re: [dpdk-dev] [PATCH v2 0/6] net/mlx5: add support for switch flow rules 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: Sun, 22 Jul 2018 11:21:25 -0000 Hi Adrien, Friday, July 13, 2018 12:41 PM, Adrien Mazarguil: > Subject: [PATCH v2 0/6] net/mlx5: add support for switch flow rules >=20 > This series adds support for switch flow rules, that is, rte_flow rules a= pplied > to mlx5 devices at the switch level. >=20 > It allows applications to offload traffic redirection between DPDK ports = in > hardware, while optionally modifying it (e.g. performing encap/decap). >=20 > For this to work, involved DPDK ports must be part of the same switch > domain, as is the case with port representors, and the transfer attribute > must be requested on flow rules. >=20 > Also since the mlx5 switch is controlled through Netlink instead of Verbs= , and > given how tedious formatting Netlink messages is, a new dependency is > added to mlx5: libmnl. See relevant patch. There are some checkpatch[1] warning, but those are safe to ignore.=20 Adrien, one thing which is missing is a documentation update for mlx5 doc o= n the new dependency of libmnl.=20 Just like rdma-core: how to get it, how to install it, version required.. I won't postpone the series acceptance due to this (since I want to avoid b= ig changes after the rc2), but we must have such doc before 18.08 release.= =20 Series applied to next-net-mlx, thanks! [1] ### net/mlx5: add framework for switch flow rules ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in paren= theses #307: FILE: drivers/net/mlx5/mlx5_nl_flow.c:60: +#define PATTERN_COMMON \ + ITEM_VOID, ACTIONS ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in paren= theses #309: FILE: drivers/net/mlx5/mlx5_nl_flow.c:62: +#define ACTIONS_COMMON \ + ACTION_VOID, END total: 2 errors, 0 warnings, 0 checks, 537 lines checked ### net/mlx5: add fate actions to switch flow rules ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in paren= theses #55: FILE: drivers/net/mlx5/mlx5_nl_flow.c:68: +#define ACTIONS_FATE \ + ACTION_PORT_ID, ACTION_DROP ERROR:ASSIGN_IN_IF: do not use assignment in if condition #136: FILE: drivers/net/mlx5/mlx5_nl_flow.c:277: + if (!mnl_attr_put_check(buf, size, TCA_MIRRED_PARMS, ERROR:ASSIGN_IN_IF: do not use assignment in if condition #159: FILE: drivers/net/mlx5/mlx5_nl_flow.c:300: + if (!mnl_attr_put_check(buf, size, TCA_GACT_PARMS, total: 3 errors, 0 warnings, 0 checks, 134 lines checked ### net/mlx5: add VLAN item and actions to switch flow rules ERROR:ASSIGN_IN_IF: do not use assignment in if condition #367: FILE: drivers/net/mlx5/mlx5_nl_flow.c:930: + if (!mnl_attr_put_check(buf, size, TCA_VLAN_PARMS, total: 1 errors, 0 warnings, 0 checks, 358 lines checked >=20 > v2 changes: >=20 > - Mostly compilation fixes for missing Netlink definitions on older syste= ms. > - Reduced stack consumption. > - Adapted series to rely on mlx5_dev_to_port_id() instead of > mlx5_dev_to_domain_id(). > - See relevant patches for more information. >=20 > Adrien Mazarguil (6): > net/mlx5: lay groundwork for switch offloads > net/mlx5: add framework for switch flow rules > net/mlx5: add fate actions to switch flow rules > net/mlx5: add L2-L4 pattern items to switch flow rules > net/mlx5: add VLAN item and actions to switch flow rules > net/mlx5: add port ID pattern item to switch flow rules >=20 > drivers/net/mlx5/Makefile | 142 ++++ > drivers/net/mlx5/mlx5.c | 32 + > drivers/net/mlx5/mlx5.h | 28 + > drivers/net/mlx5/mlx5_flow.c | 111 +++ > drivers/net/mlx5/mlx5_nl_flow.c | 1247 > ++++++++++++++++++++++++++++++++++ > mk/rte.app.mk | 2 +- > 6 files changed, 1561 insertions(+), 1 deletion(-) create mode 100644 > drivers/net/mlx5/mlx5_nl_flow.c >=20 > -- > 2.11.0