From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0057.outbound.protection.outlook.com [104.47.2.57]) by dpdk.org (Postfix) with ESMTP id AFD7E7D52 for ; Fri, 19 Oct 2018 17:21:45 +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=aLXbz26aJ5mogDE/8mDQgTDKJec9Tls0jUL8s+aGv3U=; b=CbJt7JdNMcExk7n4wjXA3PQDhczQJXqTtwD+pnAe8jTekYYvwba12j3v0794TrgZ0GrJYD052WByYfAFASJdwpbLH7ChcxQdGosXxdnOiHsNOaOBkUGlvaXtOAkZa6a6AkVkxBuVEQLzNw9IMfEjf3z2/iXOcpx86jeda20XGOE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=viacheslavo@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM4PR05MB3268.eurprd05.prod.outlook.com (2603:10a6:205:4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.31; Fri, 19 Oct 2018 15:21:44 +0000 From: Viacheslav Ovsiienko To: shahafs@mellanox.com, yskoh@mellanox.com Cc: dev@dpdk.org, Viacheslav Ovsiienko Date: Fri, 19 Oct 2018 15:21:06 +0000 Message-Id: <1539962470-10950-3-git-send-email-viacheslavo@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539962470-10950-1-git-send-email-viacheslavo@mellanox.com> References: <1539784438-29242-1-git-send-email-viacheslavo@mellanox.com> <1539962470-10950-1-git-send-email-viacheslavo@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: CWXP265CA0079.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:39::19) To AM4PR05MB3268.eurprd05.prod.outlook.com (2603:10a6:205:4::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 82447176-5139-4079-7a83-08d635d69452 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:AM4PR05MB3268; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3268; 3:CPNZXt4cogcAfxTB8JiAbFAoSVsuZ5B0jQztEic2OACWQk4jSC2P2NbfNgBb8+Kq0EDFTsDf1NMeTx2HnegoPg4H5tmBaJ0SNpJQv2W8bKI95IscEkcwApix5xpa4d3Vuj6aVkxr/KMDOY2+0q9oYzEhuMjXB9k/Vibvmq5FvahBIdaNQLo4quwA8JreqyrAsPVtHQdp0YPGI+VVEAGSa7KiGBbFIB2gwFxBP/2c2BldqdmqFnuCd4r2+gtrX0JW; 25:QJxUsIZ/Slu61hG4r0LCNEOAoGDUK3kiGkpXvR480OjDAaGEFMqkYy8pd2VSjraJWrPAK2/WGa0mlQo3y9OMubXwyzEoemDCnx7+znngYiKPsVDBQzmawd49kj5IlWLE8BJmmKNDpdsHvv3vzcGev+6+4dUk2kWz64NSfpY2tg3mwVGTyhWW2NxTAZKj3E/HraQGqmThiF9836VK7PiSH1UhDHq691q1JsGOzR/u/m7h246Ldz15GeJf3DZglPJBkwGtjRAaW3vZUzprAXBlILZFuZo8cqmacpZoqMcY6EyroFPCz5UR0SuU21swxVz1UfoXlEkXW4IF6DdJmX9aPg==; 31:EXGqQh6NlGMBMWkMYrQzldZwczuP+NAnklfgBSHRwQzs55RnffOp0Qe0kgAujn3zoVOpO/KNi0da/jyqYUP+b/Z3KYbOTEcMpuWpnWqsjaMvEVRFVADwrZBznwaxuSvscWi1yXzV6LqFE7RDyG3jvnF5CtzgUbBiDzVzQM0grnJAHmYLLqjmxaVDadlkH+XtkshUio071o5q1ySkRVxMsdHnUFtmRthtDSJ8JPXK7dk= X-MS-TrafficTypeDiagnostic: AM4PR05MB3268: X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3268; 20:cq5lbR1IGV+K3jYw4f6ID1bNaxmADt8U+FC/MD1gOdpE4YgTXexS7WJ2pLtGrA84ob/mEAx/AcHGnEmXAL4G4wEOc2vsvMkG9bBApKnvdyXwUNXNHVRtYAZiyhzhi16T/Kofh/6H05taL/vdx+VGaJ/8EWGwoo6el/B6sxaCwynOw3aSilYeIq7hFPp4MlZRV7Y2+obygVXK/NOhPMbpv8jzwHoOeIMhR1Numdph94HKEjTFtD2mN3VIGBTt5+KXhuzS5pyNzXJ/JRlIRek161FjL+NRHq5nbmKA9RXidbnRntrOOkPN4EuOuscAVWv6fi8t5ZAP4RXsfiIHNNCtR449wbqerbOVu6gyV2TH0KJfUTbeBhdXqpDl45fYORJwRemByDzzGjxg2lpLkz/0G1zWhp4hFrXCTdupn+B2LfgLpqoIY5M2LW0/uO13vkw9O/LGu8iGsgLv9noVDzm/4GAWBtMmIWdm/atx1TnU4n91hhFpwRu7qDYpY9x9MKrO; 4:gzj10QG6JMOLh14QR9hqOZE0vlTecGH9wmzS2jxIlV6lgs8ssZQO5l+qjiKudhJh7guOZf6+xChyKvhmaUbyXOdKznmxzb5lS49ZkGf/5SK4kZarMi74BNMG9vmNV3/f7Jwm74waxm+dIrCw1lBx3320/7ni7sS/MnQcYJBnQVtFfw829iVA9xg+MvFiEEnabMcAQkRDXa4gSzBlT3aY7mMZCdXBBkeyhr57VA2cIhyWuLNdW+nC27extz7xQmdhzYfsbdSe/gRK31d0zySwLg== 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)(10201501046)(93006095)(93001095)(3002001)(3231355)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:AM4PR05MB3268; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3268; X-Forefront-PRVS: 0830866D19 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39850400004)(376002)(366004)(136003)(396003)(199004)(189003)(2906002)(8676002)(50226002)(69596002)(33026002)(6116002)(3846002)(476003)(446003)(4326008)(11346002)(76176011)(19627235002)(7696005)(486006)(51416003)(386003)(186003)(956004)(81156014)(81166006)(8936002)(25786009)(2616005)(36756003)(105586002)(86362001)(66066001)(47776003)(97736004)(16526019)(26005)(316002)(575784001)(16586007)(52116002)(68736007)(50466002)(5660300001)(478600001)(48376002)(8886007)(55016002)(21086003)(4720700003)(6636002)(6666004)(106356001)(107886003)(53936002)(7736002)(85306007)(305945005)(309714004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3268; H:mellanox.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-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR05MB3268; 23:QIEJMtTzT5XDAnTsEt48xGsyEO8iIH9IVcVp4g5Zu?= =?us-ascii?Q?Htg2s2MeD2RDK0MijOKSVq0RKXodv8ZG+NNnAo/Y5lWledxeJui84G+mMv7n?= =?us-ascii?Q?e0YiksAR4QzTRdW2Jjynt8Tms1F5ylmopSjAdSKZ6jjJMxPuHLwb4uRDQ4im?= =?us-ascii?Q?WhUPeMg0am0DzA1AHplQYYhmWvzLSQ2xGBKVRgvzjsKUbQBm+WfP2+dz92d7?= =?us-ascii?Q?29dpPud+W3MWlnzEqp9czNj+IaTjxa9YTXa2jkbdi1krkFYJoBlduu+SmHBJ?= =?us-ascii?Q?QrFe98kan4/h+WTnR5WKx9VPmaywYW/Al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MJx5kmQrBm7xqE9Cs9EDjGkXSg5hhVGIFtBk6MkTLjc/ctKKweJkz8E0Q==; 5:4AwjZUAL2plsV/vSvSwaYHLPNgcPWcWgLKAZi+wd1lLF9hnzSv3w/eULWZkT+9bcjKBUUOexvKNXsh6wM5/XgsUFQMnQnNIsc/h74kfbNRBs/VC2e4qs31/H3vHUqtd27AsPSlrddXAAYkCX3s6XVa6Dpl7WCUVHcRchmMxEKm4=; 7:dJMFOR0QgGBzzl7NSIfnlMoxFvdec3MlUGqF/0fX3MAYtlAntAjlZNyQ+AOZLN4BMdufuAqO8nmNN+zAkxHsxPZK8h30uwRlABoJ0sL/Vtb74QVWeRzVJW6VaG7tPw/tKFxgGfQ7tJOn+DZm9cjgy5xST3AbtzLxqO0eCeNc57egN/Pjx3j13Laf5Or2YEk7qNL0vQML7CkKhUb7MTlGhyamXbpP4uBI0rl+Pusp1rfcRzItul/cewo98YIQ1bZG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2018 15:21:44.2210 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 82447176-5139-4079-7a83-08d635d69452 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3268 Subject: [dpdk-dev] [PATCH v3 2/6] net/mlx5: flow counters new configuration flags 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: Fri, 19 Oct 2018 15:21:45 -0000 In this part of patchset some modifications in compile configuration flags are done. The HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT is replaced with HAVE_IBV_DEVICE_COUNTERS_SET_V42. At this stage it is just flag renaming. The new HAVE_IBV_DEVICE_COUNTERS_SET_V45 flag is introduced. Both makefile and meson.build are changed, the flag modifications are grouped, no more build system files modifications are expected in this patchset, ones are grouped in this part. HAVE_IBV_DEVICE_COUNTERS_SET_V45 is just introduced, no code dependence in this part of pathset. 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 not HAVE_IBV_DEVICE_COUNTERS_SET_V45 is defined if there is no counters support. Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/Makefile | 9 +++++++-- drivers/net/mlx5/meson.build | 6 ++++-- drivers/net/mlx5/mlx5.c | 4 ++-- drivers/net/mlx5/mlx5_flow_verbs.c | 10 +++++----- drivers/net/mlx5/mlx5_glue.c | 8 ++++---- drivers/net/mlx5/mlx5_glue.h | 2 +- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 1e9c0b4..28547d3 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -157,9 +157,14 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh enum ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT \ $(AUTOCONF_OUTPUT) $Q sh -- '$<' '$@' \ - HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT \ + HAVE_IBV_DEVICE_COUNTERS_SET_V42 \ + infiniband/verbs.h \ + type 'struct ibv_counter_set_init_attr' \ + $(AUTOCONF_OUTPUT) + $Q sh -- '$<' '$@' \ + HAVE_IBV_DEVICE_COUNTERS_SET_V45 \ infiniband/verbs.h \ - type 'struct ibv_counter_set_init_attr' \ + type 'struct ibv_counters_init_attr' \ $(AUTOCONF_OUTPUT) $Q sh -- '$<' '$@' \ HAVE_RDMA_NL_NLDEV \ diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index c192d44..1c4ed30 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -79,8 +79,10 @@ if build has_member_args = [ [ 'HAVE_IBV_MLX5_MOD_SWP', 'infiniband/mlx5dv.h', 'struct mlx5dv_sw_parsing_caps', 'sw_parsing_offloads' ], - [ 'HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT', 'infiniband/verbs.h', - 'struct ibv_counter_set_init_attr', 'counter_set_id' ], + [ '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", diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 13f2fd4..bb19085 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -739,7 +739,7 @@ unsigned int mprq_max_stride_size_n = 0; unsigned int mprq_min_stride_num_n = 0; unsigned int mprq_max_stride_num_n = 0; -#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_V42 struct ibv_counter_set_description cs_desc = { .counter_type = 0 }; #endif struct ether_addr mac; @@ -1009,7 +1009,7 @@ config.hw_csum = !!(attr.device_cap_flags_ex & IBV_DEVICE_RAW_IP_CSUM); DRV_LOG(DEBUG, "checksum offloading is %ssupported", (config.hw_csum ? "" : "not ")); -#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_V42 config.flow_counter_en = !!attr.max_counter_sets; mlx5_glue->describe_counter_set(ctx, 0, &cs_desc); DRV_LOG(DEBUG, "counter type = %d, num of cs = %ld, attributes = %d", diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 6ddb13b..3d6fedb 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -60,7 +60,7 @@ cnt->ref_cnt++; return cnt; } -#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_V42 struct mlx5_flow_counter tmpl = { .shared = shared, @@ -938,7 +938,7 @@ { const struct rte_flow_action_count *count = action->conf; struct rte_flow *flow = dev_flow->flow; -#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_V42 unsigned int size = sizeof(struct ibv_flow_spec_counter_action); struct ibv_flow_spec_counter_action counter = { .type = IBV_FLOW_SPEC_ACTION_COUNT, @@ -957,7 +957,7 @@ " context."); } *action_flags |= MLX5_FLOW_ACTION_COUNT; -#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_V42 counter.counter_set_handle = flow->counter->cs->handle; flow_verbs_spec_add(dev_flow, &counter, size); #endif @@ -1222,7 +1222,7 @@ detected_actions |= MLX5_FLOW_ACTION_RSS; break; case RTE_FLOW_ACTION_TYPE_COUNT: -#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_V42 size += sizeof(struct ibv_flow_spec_counter_action); #endif detected_actions |= MLX5_FLOW_ACTION_COUNT; @@ -1665,7 +1665,7 @@ void *data __rte_unused, struct rte_flow_error *error) { -#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifdef HAVE_IBV_DEVICE_COUNTERS_SET_V42 if (flow->actions & MLX5_FLOW_ACTION_COUNT) { struct rte_flow_query_count *qc = data; uint64_t counters[2] = {0, 0}; diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c index 48590df..889e074 100644 --- a/drivers/net/mlx5/mlx5_glue.c +++ b/drivers/net/mlx5/mlx5_glue.c @@ -215,7 +215,7 @@ mlx5_glue_create_counter_set(struct ibv_context *context, struct ibv_counter_set_init_attr *init_attr) { -#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_V42 (void)context; (void)init_attr; return NULL; @@ -227,7 +227,7 @@ static int mlx5_glue_destroy_counter_set(struct ibv_counter_set *cs) { -#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_V42 (void)cs; return ENOTSUP; #else @@ -240,7 +240,7 @@ uint16_t counter_set_id, struct ibv_counter_set_description *cs_desc) { -#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_V42 (void)context; (void)counter_set_id; (void)cs_desc; @@ -254,7 +254,7 @@ mlx5_glue_query_counter_set(struct ibv_query_counter_set_attr *query_attr, struct ibv_counter_set_data *cs_data) { -#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_V42 (void)query_attr; (void)cs_data; return ENOTSUP; diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h index f6e4e38..adee972 100644 --- a/drivers/net/mlx5/mlx5_glue.h +++ b/drivers/net/mlx5/mlx5_glue.h @@ -23,7 +23,7 @@ #define MLX5_GLUE_VERSION "" #endif -#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT +#ifndef HAVE_IBV_DEVICE_COUNTERS_SET_V42 struct ibv_counter_set; struct ibv_counter_set_data; struct ibv_counter_set_description; -- 1.8.3.1