From patchwork Mon Apr 29 18:14:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 10922385 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1CBD92A for ; Mon, 29 Apr 2019 18:14:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B200820856 for ; Mon, 29 Apr 2019 18:14:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5FDD23F88; Mon, 29 Apr 2019 18:14:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C19220856 for ; Mon, 29 Apr 2019 18:14:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729089AbfD2SOv (ORCPT ); Mon, 29 Apr 2019 14:14:51 -0400 Received: from mail-eopbgr80082.outbound.protection.outlook.com ([40.107.8.82]:17742 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729084AbfD2SOt (ORCPT ); Mon, 29 Apr 2019 14:14:49 -0400 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=jxEu1NVagfQYa54U3DuoiOJliiFncwQPEnyi1vGr3V4=; b=KCoNxcI5meDKdCE+WLhtCs7y35xgamJQNnOlYiJJzEAVyGNHrflW7u7nEJh5K3+wpb63TztMyOKh3DK1lZE3BxPlM2/WhnqH71Mubf8lm6KZRP1Yh8PxGoRwXJXcnKm9363uoy0AoLoDln83IyRCLO4xjjJkK4UyAVSr9fDb2B4= Received: from DB8PR05MB5898.eurprd05.prod.outlook.com (20.179.9.32) by DB8PR05MB6619.eurprd05.prod.outlook.com (20.179.12.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Mon, 29 Apr 2019 18:14:18 +0000 Received: from DB8PR05MB5898.eurprd05.prod.outlook.com ([fe80::ed24:8317:76e4:1a07]) by DB8PR05MB5898.eurprd05.prod.outlook.com ([fe80::ed24:8317:76e4:1a07%4]) with mapi id 15.20.1835.018; Mon, 29 Apr 2019 18:14:18 +0000 From: Saeed Mahameed To: Saeed Mahameed , Leon Romanovsky CC: Jason Gunthorpe , "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Yevgeny Kliteynik , Oz Shlomo Subject: [PATCH V2 mlx5-next 10/11] net/mlx5: Geneve, Add basic Geneve encap/decap flow table capabilities Thread-Topic: [PATCH V2 mlx5-next 10/11] net/mlx5: Geneve, Add basic Geneve encap/decap flow table capabilities Thread-Index: AQHU/rdcwXq20UzPyEW8bH9Xde2ulQ== Date: Mon, 29 Apr 2019 18:14:18 +0000 Message-ID: <20190429181326.6262-11-saeedm@mellanox.com> References: <20190429181326.6262-1-saeedm@mellanox.com> In-Reply-To: <20190429181326.6262-1-saeedm@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.20.1 x-originating-ip: [209.116.155.178] x-clientproxiedby: BYAPR04CA0033.namprd04.prod.outlook.com (2603:10b6:a03:40::46) To DB8PR05MB5898.eurprd05.prod.outlook.com (2603:10a6:10:a4::32) authentication-results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 558702cf-418a-41c7-c3a7-08d6ccce7ed7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:DB8PR05MB6619; x-ms-traffictypediagnostic: DB8PR05MB6619: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3044; x-forefront-prvs: 0022134A87 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(366004)(39860400002)(136003)(376002)(396003)(189003)(199004)(6636002)(316002)(66066001)(386003)(6506007)(7736002)(68736007)(36756003)(305945005)(54906003)(110136005)(6512007)(102836004)(186003)(26005)(99286004)(76176011)(14454004)(52116002)(478600001)(8936002)(85306007)(81156014)(8676002)(81166006)(1076003)(2906002)(5660300002)(86362001)(107886003)(6116002)(71200400001)(71190400001)(66946007)(450100002)(73956011)(4326008)(6436002)(97736004)(66556008)(66446008)(66476007)(64756008)(486006)(476003)(2616005)(25786009)(53936002)(6486002)(3846002)(50226002)(11346002)(446003)(256004);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR05MB6619;H:DB8PR05MB5898.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: DWD3Fj+MlMVBV6H75iRKt+V6cUtdVeqMpGIihhyDpioW68s/31rv62KxDVfPUvViiiIx0fzuEMuFb2NbYiJU1JRJa/GzCRx1hCqRb9SrDOlhWKyMLTWaZTCqMAikW8nIvhkp03YEzayaI4a2xFzjgbrm4pvMgR0stdTagsHrbK8FgT79QYcoSfUsXHg/hljPXw+bVMpL1av0+BLvWk/zLLcm4L0fyyxONv5lEHsGMLkZnABrhMkrFq4Pg6l+jW6a/F7aAY+zN+oT6w2HkeahXPkepj76t7nhcsx/5pUWr4bv5B4vzybacVqQHIustKVOKZXva8DW2G1M5oWJtydvflhlzrmBQ4q4GZtcaKoBhId7WzxgGSQKj7J7pZyiAfWpsSJ/TIAdRzNPLK6LUfDPKZH7s6jm5j/GbE4Hy8XMpFo= MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 558702cf-418a-41c7-c3a7-08d6ccce7ed7 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Apr 2019 18:14:18.5694 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR05MB6619 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yevgeny Kliteynik Introduce support for Geneve flow specification and allow the creation of rules that are matching on basic Geneve protocol fields: VNI, OAM bit, protocol type, options length. Reviewed-by: Oz Shlomo Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed --- include/linux/mlx5/mlx5_ifc.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 7d9264b282d1..268ac126b3bb 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h @@ -307,7 +307,11 @@ struct mlx5_ifc_flow_table_fields_supported_bits { u8 outer_gre_protocol[0x1]; u8 outer_gre_key[0x1]; u8 outer_vxlan_vni[0x1]; - u8 reserved_at_1a[0x5]; + u8 outer_geneve_vni[0x1]; + u8 outer_geneve_oam[0x1]; + u8 outer_geneve_protocol_type[0x1]; + u8 outer_geneve_opt_len[0x1]; + u8 reserved_at_1e[0x1]; u8 source_eswitch_port[0x1]; u8 inner_dmac[0x1]; @@ -480,7 +484,9 @@ struct mlx5_ifc_fte_match_set_misc_bits { u8 vxlan_vni[0x18]; u8 reserved_at_b8[0x8]; - u8 reserved_at_c0[0x20]; + u8 geneve_vni[0x18]; + u8 reserved_at_d8[0x7]; + u8 geneve_oam[0x1]; u8 reserved_at_e0[0xc]; u8 outer_ipv6_flow_label[0x14]; @@ -488,7 +494,11 @@ struct mlx5_ifc_fte_match_set_misc_bits { u8 reserved_at_100[0xc]; u8 inner_ipv6_flow_label[0x14]; - u8 reserved_at_120[0x28]; + u8 reserved_at_120[0xa]; + u8 geneve_opt_len[0x6]; + u8 geneve_protocol_type[0x10]; + + u8 reserved_at_140[0x8]; u8 bth_dst_qp[0x18]; u8 reserved_at_160[0x20]; u8 outer_esp_spi[0x20];