From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70055.outbound.protection.outlook.com [40.107.7.55]) by dpdk.org (Postfix) with ESMTP id 2616F5F28 for ; Tue, 23 Oct 2018 12:04:11 +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=Ye4P26YBvlQihv8x6M/c4KY3T5k4gAuYUaFckk/97Ps=; b=SOMKv8WnijUXgRXcpTGu68z2wi9/KC/Nk9+mOuGMjGAv9o1CscXQJ1dSpE/3QYLVHVb7Tuk8psf1NsHjMiTpi6dcfz/TTLaeeXkUq4h/LqirlhSKAtjSdxC5Lpl2WE2hc9xn4IBvJ7s0RIzlIdSgu51B2rHiwjFzncZ3S0FlgjA= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.186.150) by AM4PR05MB3380.eurprd05.prod.outlook.com (10.171.187.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Tue, 23 Oct 2018 10:04:09 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::477:2091:24b4:439f]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::477:2091:24b4:439f%4]) with mapi id 15.20.1250.028; Tue, 23 Oct 2018 10:04:09 +0000 From: Slava Ovsiienko To: Slava Ovsiienko CC: "dev@dpdk.org" Thread-Topic: net/mlx5: flow counters support for Linux-rdma v19 Thread-Index: AQHUare9C5H0QL7XZ0KSt1qw9FuCow== Date: Tue, 23 Oct 2018 10:04:09 +0000 Message-ID: <1540289032-29628-1-git-send-email-viacheslavo@mellanox.com> References: <1539962470-10950-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1539962470-10950-1-git-send-email-viacheslavo@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0442.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::22) To AM4PR05MB3265.eurprd05.prod.outlook.com (2603:10a6:205:4::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=viacheslavo@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB3380; 6:/88UAesyf9JIFBeKJRIPa9q1KOBkuOVkE+B1d8F2kiAHRGxVzZan3hEB4/GWZ8GRAkHQYFZdNW4NLozCJWimBjfGfafkfprAyb+JqHL1hSAIbrbpOBsNVWBhVp85jI1fEIwE/nX39eURoE4/RD5vTPM6MySZfwnWm2mSp7mvBlhMuwelvFfJQ+nGpVDBpUStUtY9gf4oio+EtPVlh0c63HOB/0CHHIj7R2OSt9PYpGbQ++/09Ks+lUI/mdUY3w4th/0o+wBYTDH74GShYuWH2dD9sMp9MDZc71FietAjSMXV0aF4Iy47Q8X5k9NlwfqcJZCcL+vxZykr9AjK5epKzS9nkYH+K2Ajo81nIPGDisyOEb8LQ3CLJ2OU/5i71zT3WnkZN25TCwET0+8KxmyarscY9KiJ4/+KYwJiTMIQmG9BLhZA/17ZQNFU25+MDk75ebo5wOfKUVg8JsM0eT4bZA==; 5:7g8gqLEkjM3NL0m9lquMsw64oyf3KjGcFuKzb8FeL+cLJ1zCbZ1xKf0aVKV9M4sHJXkrSC2BozSzzEuJl5W616iE1UJXZoV/T1CXeZeO0Sv3Mvmh0N3V1W4JcX6en43GOHm+m5mVAsYUdCjFinNyRGGArstarkvbXAttTQJg0M0=; 7:Kx8qzdvgfBcx95m835XEvZVf+IDHtFlycoh8cGjX7Ttow8YgEnFHxB7YqR7xS7EOtseIsegqUrC6HSPMaOGHRBr9Ef1lG36mcybFOiqazrMfZJ3JYHgsTiHSG89m6PPu0Gc2AryCjD/Xo8GWBJwYEL7Rqzenx6k9Uy2vFyGUkeUJynhzCKauebVajvGmc1r03ZsNHpyJZGQS3/BMRYEdOshupmRYXlaGMYQf66R1184CBs+KxeO3dnBAjCSg/Z7l x-ms-office365-filtering-correlation-id: 77619af5-2181-44b2-9113-08d638cedfe7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM4PR05MB3380; x-ms-traffictypediagnostic: AM4PR05MB3380: 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)(93006095)(93001095)(10201501046)(3231355)(944501410)(4982022)(52105095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:AM4PR05MB3380; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3380; x-forefront-prvs: 0834BAF534 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(346002)(39860400002)(376002)(366004)(199004)(189003)(71200400001)(6512007)(2906002)(478600001)(5660300001)(446003)(2616005)(14454004)(53936002)(6436002)(37006003)(3846002)(81156014)(6862004)(86362001)(966005)(6306002)(36756003)(2900100001)(5250100002)(7736002)(305945005)(14444005)(6116002)(6486002)(105586002)(7049001)(316002)(97736004)(68736007)(71190400001)(52116002)(102836004)(4326008)(476003)(25786009)(99286004)(66066001)(106356001)(8676002)(81166006)(256004)(76176011)(6506007)(386003)(486006)(11346002)(6200100001)(26005)(186003)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3380; H:AM4PR05MB3265.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: vrvqfqt7WHo+fJIGf0hy6KsYxuv2icaK0YXHOf53vEv5bAa5XZqTdEpyyzf4FEx6JdbMRQA5VJNQsNEGwcsJMpy6PTNLWbXHYRQw/KlN28tew7+VHRw5FmDAi7f6eJJyk5J7H8omZ76NvDD1JZqF2joJjb7SlNV73/5GOPbSadeO8UnAPUen/v4iVmcBmk8rn3yYSskZ3PNoNh3fr1EUBD/RkfBK7qRANgqLKfOZsMA9QU3J8A8rZ2H0ZXVUUgzwUyIa7yoKMvMPB3JPbjacTtMj+ii4HD74WDi0eY60yn2KKjQEIVxkLWAl9rnHl7qe3HdXU2Zj3ut/MXn4Rodfg2gjlGF3CDLVti7HgV7hC7E= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: 77619af5-2181-44b2-9113-08d638cedfe7 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2018 10:04:09.7112 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3380 Subject: [dpdk-dev] net/mlx5: flow counters support for Linux-rdma v19 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: Tue, 23 Oct 2018 10:04:11 -0000 Mellanox mlx5 PMD supports Flow counters via Verbs library. The current implementation is based on the Mellanox proprietary Verbs library included in MLNX OFED packages. The Flow counter support is recently added into linux-rdma release (v19), so the mlx5 PMD update is needed to provide Counter feature on the base of linux-rdma. mlx5 PMD can be compiled with MLNX OFED or linux-rdma v19+ and provide flow counters for both. Signed-off-by: Viacheslav Ovsiienko --- v4: - minor patcset parts reorganization - rewritten headlines to be more clear - ifdef blocks minor cleanups v3: - http://patches.dpdk.org/patch/47085/ - mlx5 glue issue resolved correctly - patch is reorganized info small isolated parts =20 v2: - http://patches.dpdk.org/patch/46989/ - rebased on top of master-net-mlx branch - new compilation flags are introduced: - HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT_V42, kernel/verbs library provides the flow counter support in style of MLNX_OFED_4.2 to MLNX_OFED_4.4 - HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT_V45, kernel/verbs library provides the flow counter support in style of MLNX_OFED_4.5 or higher v1: - http://patches.dpdk.org/patch/45972/ Viacheslav Ovsiienko (8): net/mlx5: fix flow counters creation net/mlx5: rename flow counter configuration macro net/mlx5: introduce new flow counters configuration macro net/mlx5: simplify flow counters support check net/mlx5: relocate flow counters query function net/mlx5: add new flow counter Verbs API to glue library net/mlx5: remove unnecessary structure initializers net/mlx5: support new flow counter API drivers/net/mlx5/Makefile | 7 +- drivers/net/mlx5/meson.build | 4 +- drivers/net/mlx5/mlx5.c | 12 +- drivers/net/mlx5/mlx5.h | 1 - drivers/net/mlx5/mlx5_flow.c | 8 +- drivers/net/mlx5/mlx5_flow.h | 4 + drivers/net/mlx5/mlx5_flow_tcf.c | 5 - drivers/net/mlx5/mlx5_flow_verbs.c | 236 ++++++++++++++++++++++++---------= ---- drivers/net/mlx5/mlx5_glue.c | 68 ++++++++++- drivers/net/mlx5/mlx5_glue.h | 19 ++- 10 files changed, 254 insertions(+), 110 deletions(-) --=20 1.8.3.1