From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60060.outbound.protection.outlook.com [40.107.6.60]) by dpdk.org (Postfix) with ESMTP id 3A0A11B146 for ; Tue, 23 Oct 2018 12:04:13 +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=kBCXJjOUyxjyrrLdmoj+vfCBQbkkuFLR0NVbwq06n04=; b=OdNM6aM24Aiyva+eoso2XVxtVxAmZvg4qoKpczuqTIK/wRXZGZlR3/9QQ2fkoNPVZBKzYuVAI4eRerYRicv7kuPnEcDcL8JpEXW6NS1a86lMy6F+YAgLz2U88xolrLPongYn43v0zFEPmgc7SLMn0tbPe9R+NOo63bggqS6R1YY= 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:12 +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:12 +0000 From: Slava Ovsiienko To: Slava Ovsiienko CC: "dev@dpdk.org" Thread-Topic: [PATCH v4 3/8] net/mlx5: introduce new flow counters configuration macro Thread-Index: AQHUare/A/o5TOk+okGNWqaWOTkY8Q== Date: Tue, 23 Oct 2018 10:04:12 +0000 Message-ID: <1540289032-29628-4-git-send-email-viacheslavo@mellanox.com> References: <1539962470-10950-1-git-send-email-viacheslavo@mellanox.com> <1540289032-29628-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1540289032-29628-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:pSQcL4cyvs2klcB8Koh1ggzRSLruFcqRclJqjB9n1ayXVeksbRpwDbqyD0B1ixD+nyx6UbFohbHPnKnKe22bh/62uI+U6PMnIJ/0Ee4Y5cqbQSAiGGlKgJWwBfjCq+O8sJhpIoUKSNU1QmIPvWZ2LyW2V6atrBMxCTumC5Ll0co6fNv70nf6qlsoYUoOnVjnL2RAvyh2gisOXoisnEaoCVoitP8MslR1l4+G884+GNu8HQ0dnhGviB5ZAG8cTMvBIGp5m9hDU56R6JPdfnpznS3t15L9DUagxMtEwmW9v0cHEgvu4Tlsyoduo0Nr+Ou9HfEoZ/tJlXrNfpRapxG6WLCq/+H5gIt6/cbkp0Eapmo9xY72YlVqKd+X6uUJ2FEYGXzg4moJNRDNLAg8GVfE26xN8tmUPny8nIL53oPKZ8gYrQP0RoA9ZZO1U2xYbBlSl3k1rxYPMG9tdHMmH+AvxA==; 5:qglIBZmBPJwJWRSAaDmgg3hYySPlB74id5qumv786M6JtDszcHxtstfdG0m/9T+USUrDtpuzWA1rV0+NvTFsDVf7io8FKMO++ea7mUANttHpiBoNNpTqwvEquixr7nXjrlWjK4KYBDEmZVbvfvaoP5QQ3sjcNmH6QP2gXv2vDzU=; 7:UP8AZGUMUPNY2+5/ayb9+2dXhQ5N4nH+dtd28TLuav6TNkWNxaApe+tCbS8dlzcK3qB4JgQTC4z3Q8acqCKsI3e02Zj/UKqwi1UGM+R+DSutJiPDwHPTQQh7me0GcSfAT90BCi3MRIaqF+z9vmjOTb0zcLZngsfhaTiIvyQITtY4hh/8JKwjKGvj1QROk10NKPqZLJh+qNBKX95Sa5XnK2xKmUwSu7Z0GkVXCkj2k+mOdEohvl/qH628gFcOrrf6 x-ms-office365-filtering-correlation-id: 8d168d40-7cb0-4121-3061-08d638cee189 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)(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)(36756003)(2900100001)(5250100002)(7736002)(305945005)(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: u6EUcXpl0LcCdJCna79fYVINPgQL5S2PC8kMDY7mZAf7aS7LC4Pblb7TWcCupagu1SZkjjgMzw3YuQj50nMpCTOLr3nOlmcgW7GdUR5GJwe6ZZ99E8Zlwm4uSOL/lIXAIfKManjcTiVRaM1+3QqLVESxFnUanWaG9gA+jOh2BeInviwN2fbEMIYKQ2y+6uIcVHVEQJwY6X2WhvLzoEqt9L2KrlSYknmk+xziAKs3zRfrJF9N7BG/mqMfSHAwo/gabsAkOU5CZzRPCrLXW+RSPYL/jdK19UqSLrgRHLJ7YAs5tMs+vMyon4tRzHthZFJvu/XebqjHV+RZsOeK0LBnz7gfGkThW9CWyK5l6CxNPQo= 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: 8d168d40-7cb0-4121-3061-08d638cee189 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2018 10:04:12.2369 (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] [PATCH v4 3/8] net/mlx5: introduce new flow counters configuration macro 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:13 -0000 The new configuration macro HAVE_IBV_DEVICE_COUNTERS_SET_V45 is introduced. Both makefile and meson.build are changed. Flow counter support code depends on the following configuration macros: - HAVE_IBV_DEVICE_COUNTERS_SET_V42 - is defined if system supports the "old" flow counters functionality, MLNX_OFED version from 4.2 to 4.4 is required. - HAVE_IBV_DEVICE_COUNTERS_SET_V45 - is defined if system supports the "new" flow counters functionality, MLNX_OVED 4.5 (or higher) or Linux rdma-core v19 (or higher) is required. Neither HAVE_IBV_DEVICE_COUNTERS_SET_V42 nor HAVE_IBV_DEVICE_COUNTERS_SET_V45 is defined if there is no counters support. Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/Makefile | 5 +++++ drivers/net/mlx5/meson.build | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 124ee4e..fecb57c 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -162,6 +162,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config= -h.sh type 'struct ibv_counter_set_init_attr' \ $(AUTOCONF_OUTPUT) $Q sh -- '$<' '$@' \ + HAVE_IBV_DEVICE_COUNTERS_SET_V45 \ + infiniband/verbs.h \ + type 'struct ibv_counters_init_attr' \ + $(AUTOCONF_OUTPUT) + $Q sh -- '$<' '$@' \ HAVE_RDMA_NL_NLDEV \ rdma/rdma_netlink.h \ enum RDMA_NL_NLDEV \ diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index e613a21..e8cbe3e 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -81,6 +81,8 @@ if build 'struct mlx5dv_sw_parsing_caps', 'sw_parsing_offloads' ], [ 'HAVE_IBV_DEVICE_COUNTERS_SET_V42', 'infiniband/verbs.h', 'struct ibv_counter_set_init_attr', 'counter_set_id' ], + [ 'HAVE_IBV_DEVICE_COUNTERS_SET_V45', 'infiniband/verbs.h', + 'struct ibv_counters_init_attr', 'comp_mask' ], ] # input array for meson symbol search: # [ "MACRO to define if found", "header for the search", --=20 1.8.3.1