From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1CD345BB5; Wed, 23 Oct 2024 20:33:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6AEE342FA9; Wed, 23 Oct 2024 20:33:41 +0200 (CEST) Received: from egress-ip42b.ess.de.barracuda.com (egress-ip42b.ess.de.barracuda.com [18.185.115.246]) by mails.dpdk.org (Postfix) with ESMTP id 275AD42FA3 for ; Wed, 23 Oct 2024 20:33:39 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03lp2239.outbound.protection.outlook.com [104.47.51.239]) by mx-outbound21-18.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 Oct 2024 18:33:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RH3CHhkNyCkc6wAPE6Xyvjtp5G9MTeXhAyaAnvhC1UTUMp7vDdt7xMRQvla8nKyx4FBZ+kpvGpv9/GEYE/Snydyj4kIZO8clnV9cMEiUgSE9iG39XfcgJ3rc+yDg/ms7Ax5mR9Jr/7Myk9+Umv2XrLlI9H+dgndr7lnTEXFD5YRPmJ5GXwLooEUC8ALdScROPIiyxc303wCpKoAsKiiUHeLSFYrPXX4nQfqBJ0Rn2msuNSgDB2aRg3OVthuEgATYiMxAddCxoPuUcbIdhjRllRJDb9aQIxmK2+0AA9TYmmfm15IEPEDhJcouBc4jgz/jX/Cu7vmV69qrjjwk35x/0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mnt4NloyXCrG5mi27i2yCaywzu3gOz8ogC2UHuQ28RQ=; b=jDdk3fKVsY2FDeAN1Tlcysqu7mBZ/paVLA3msbIZjTlMcMUJsy9rW9lLR8tHSmSpzLbxd+NX7l8cNZoQ94udZKnS7FTUcrWCvKUt3VfOe/K9Ond3kRL59MFxVrQ5KlsizrAiRiAtlbUlxFWmvCqfNcK9oBDJjcZYiJxzpo5V5IrdZFN2/uXhoWtq/9kPIIs4kRjHdHEhBM4HJbO7RYd2nr+BtOG2Lqt0R9r+1CJvaL8gW094sK67Hq9Brx1oL1QTicAvAjy24lwd7Jd72GTJdasrcSm/q8uoRHYKxZyCHC06gPK9V0V9iEUC+5Ra3+wzIb+s2uE9qrPIsAieNfRZZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mnt4NloyXCrG5mi27i2yCaywzu3gOz8ogC2UHuQ28RQ=; b=XFT9D1LG+qc7vx5ENtNqpaCY3maB6/QX0yJqt9wWdKOFQFl+X7mnAzbyVkVgnIviSdc+JAIOBeTXNLlO10pnm2viqTahr2VjwVknW5PaZh8q94H5tOOkg5EmCx3awsidBVIn2K33g8rT6HBhVgdPmjSWmHU6FjYqx9Sn8hrkbdM= Received: from DU7PR01CA0021.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::9) by DB8P190MB0619.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:12e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.18; Wed, 23 Oct 2024 17:01:34 +0000 Received: from DB5PEPF00014B9E.eurprd02.prod.outlook.com (2603:10a6:10:50f:cafe::19) by DU7PR01CA0021.outlook.office365.com (2603:10a6:10:50f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.17 via Frontend Transport; Wed, 23 Oct 2024 17:01:34 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by DB5PEPF00014B9E.mail.protection.outlook.com (10.167.8.171) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 17:01:33 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, Danylo Vodopianov Subject: [PATCH v3 57/73] net/ntnic: added flm stat interface Date: Wed, 23 Oct 2024 19:00:05 +0200 Message-ID: <20241023170032.314155-58-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241023170032.314155-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241023170032.314155-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B9E:EE_|DB8P190MB0619:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: a1feb613-b95a-4275-0926-08dcf3845972 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ptYLJb/NYZNb6GtIymcCRx5VmpEfuRPFPhyWtlsS0ZaooD7u2BsRZbZHliZj?= =?us-ascii?Q?VbKzC9JjjfT43KVHn3/3XXld+1ShXzBT+usdJOOcLoeKs3gbEhO9zZAav17p?= =?us-ascii?Q?gsPA5bHxte01BBB4g1BKTrrgPbVky7ea7+ufNSZzh4/onrBy0HvGFj06eKZS?= =?us-ascii?Q?JCHTNN0Z0QYKHUT+RNm+y5/g6Rp4ETC10DJlqAUg+rj+S6FQ7J6sC5b7u1sz?= =?us-ascii?Q?X6pcr0pgQni8tGTMkHmwoFIY1y7FcVmflK3B3cACOJiElDzr3ml0RCKx8AbZ?= =?us-ascii?Q?Xo7FjYJwq1mzIFS3UDr7NE6Fl3Ppm2PhsnCJTQoWcYqA2FWsIFFK0VyKTAgo?= =?us-ascii?Q?r4d2f9lD9aEJYPk0OKUBZj7wxvmy+eJIeBPy3AwkPukUH6g7yzULlPveFYvA?= =?us-ascii?Q?cO+UBEV+v5gliOlYxFzZxGZ9rjNIUMCo9I523FjHK1/Bg30KCElN/c3POOH4?= =?us-ascii?Q?mVVxB9n2LHX6LhWRNmJF5UkSWqF+4BxS0LEo3zK/29AjPIzekbHrghgp0sYi?= =?us-ascii?Q?kG8jzSu1N/QfxLt8u+UtROVSc6oIHKRLRRRbLOhkCbUo+b7lBm4px/6x48vY?= =?us-ascii?Q?GDUTjjbRXsy1GSlv/5xLecYoQfoAVsi9h1lUuNbBUMeO/hfntYKVyBC1GLo1?= =?us-ascii?Q?FiJy1EXiHw3/optFM9I9tGpDzjbDemHxXv6EK3I2DLcTyWz/+OutVaZgjzkD?= =?us-ascii?Q?IJvtMKb0Su4GXLPydt7ConGuyg1v8RsA5Jxtr/vIkvseRY2+AufzEaUa6UY1?= =?us-ascii?Q?epF/JXWfWqEE882awjn6JtzDje92UsGj/ZxD8UKUFHZ8J9NsYzhH1pYGBYm2?= =?us-ascii?Q?LghjIO9wK7p+qMUHWP/BT7KQECSc4XConJ5QM3OMurG6MihazJLavGcVLZSs?= =?us-ascii?Q?e2cqE04qKfJUqKNVsrSrRgWAf5VtttPVj/V2/NXCpJbfGE9xb5Ua8fx/6grS?= =?us-ascii?Q?oSepqoUOFcODQFwSLi5Ly2tRuI4WCgBafiBKQNIGRkQWF3RKLUJQlggAyfKs?= =?us-ascii?Q?FTc0Pd7s56+PINmr6iegG0eoHryhZkNPLKCiE4BS7n/ZyckS9CDUpIV9+aYp?= =?us-ascii?Q?FqInjgKeew8oMFeJg6ZkLTyFOHjc4fcj2nQpV8PpKM9nAdb8k7Qun1TlHw4n?= =?us-ascii?Q?OqSOP1progv16tHaWSWKkU5jBrwzXgF5c1Bcb7lKBnDBdRLXPvJFokUGGSlQ?= =?us-ascii?Q?w15TIjyKxB7R9N+a6EW0UkqkvHb/Hlonejm2qpwnkoWM5xF6lg0uIuvMG+UJ?= =?us-ascii?Q?WxurNC+cVSdMywYZvlDY8L8Zcf/6IoYRj9XfQSDuZgCq9XlAlEClvZo/8/f3?= =?us-ascii?Q?ocJbdCa/vEtV9Xb4v2v7KpPdMBwC8zVcpTBnyYbXAkaYfI5t8bf55MHB4OFi?= =?us-ascii?Q?3bXGD83+Og0Ae5GcQ5pAJAoKA5tI91DUx+wD0R5fNG3x6FUHCw=3D=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(36860700013)(376014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: uvHvsKxa6HqGH0EhnTvsx2xKkf2vbHvlX7biyEy7jnnnXP/XJ4H/aMw3GFegcG6Mylr7J4dg1SxxmSerwLerosbRbtkA6TiT+SaWFsP8qzG3r40QdAF2ie2KS/fRq5EdAnwh4VRh6BRHBmBoL+lq3TPD8c5ED0vGg9qXHdga4+w9Ndf0d8U5NB1DXCxpkLdh1J1gRJ3/oRVxpOsF+x3Yyc9WM/pc2c6DybpOJaY0j79BIL28laBqO6KBFPBlI9v5mhWr9B5Zl6MClyTnMvcaHHqxu2ebh6tyJfUxrQTkknsou3M+t4k3f7OWD5oCd/JShwhtopcvoLmrx0DWopQhvwyU0NQOqDhQS6E8BX1y4Cgb3yeSEoXhMEccahWSjeIHny13LEEHkxlmpcUgxxQP+ewwkbdurz8nTAyu3+CSzMMIyJW1CZ/t59q4XHtOYM2YgUI9jzajB0pYj8KxMgDXNw9nOXdAsmV3wBpe8rERo4ldcKpG1hvQMot6sHok+1/PkthJ/JmjoRtWzzr1bqCAnXB6MKmsHms3+89/NEE224ILvqmR67clvbKgvBfgBLCeW/SYHVC4cgmWewD/L0fQcnAekJ54FL5+UNeRM3qA9vWMHC9I0Z39K9PToa6KOA8gU7d4jJNT1IG6CI7A4Zw2/Ls8hJDaBOU5Nw29uNWaToU= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 17:01:33.8989 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1feb613-b95a-4275-0926-08dcf3845972 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B9E.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P190MB0619 X-OriginatorOrg: napatech.com X-BESS-ID: 1729708418-305394-16203-17956-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.51.239 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkYWppZAVgZQ0MQw0cjS0sDU3N QkzTjZJNXcxNjcIjkx2cTSzDzNzMJUqTYWAIOWhk5BAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259926 [from cloudscan22-191.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Danylo Vodopianov flm stat module interface was added. Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/include/flow_api.h | 2 ++ drivers/net/ntnic/include/flow_filter.h | 1 + drivers/net/ntnic/nthw/flow_api/flow_api.c | 11 +++++++++++ drivers/net/ntnic/ntnic_mod_reg.h | 2 ++ 4 files changed, 16 insertions(+) diff --git a/drivers/net/ntnic/include/flow_api.h b/drivers/net/ntnic/include/flow_api.h index 4a1525f237..ed96f77bc0 100644 --- a/drivers/net/ntnic/include/flow_api.h +++ b/drivers/net/ntnic/include/flow_api.h @@ -233,4 +233,6 @@ int flow_nic_set_hasher(struct flow_nic_dev *ndev, int hsh_idx, enum flow_nic_ha int flow_nic_set_hasher_fields(struct flow_nic_dev *ndev, int hsh_idx, struct nt_eth_rss_conf rss_conf); +int flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t size); + #endif diff --git a/drivers/net/ntnic/include/flow_filter.h b/drivers/net/ntnic/include/flow_filter.h index d204c0d882..01777f8c9f 100644 --- a/drivers/net/ntnic/include/flow_filter.h +++ b/drivers/net/ntnic/include/flow_filter.h @@ -11,5 +11,6 @@ int flow_filter_init(nthw_fpga_t *p_fpga, struct flow_nic_dev **p_flow_device, int adapter_no); int flow_filter_done(struct flow_nic_dev *dev); +int flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t size); #endif /* __FLOW_FILTER_HPP__ */ diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c index aac3144cc0..e953fc1a12 100644 --- a/drivers/net/ntnic/nthw/flow_api/flow_api.c +++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c @@ -1048,6 +1048,16 @@ int flow_nic_set_hasher_fields(struct flow_nic_dev *ndev, int hsh_idx, return profile_inline_ops->flow_nic_set_hasher_fields_inline(ndev, hsh_idx, rss_conf); } +int flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t size) +{ + (void)ndev; + (void)data; + (void)size; + + NT_LOG_DBGX(DBG, FILTER, "Not implemented yet"); + return -1; +} + static const struct flow_filter_ops ops = { .flow_filter_init = flow_filter_init, .flow_filter_done = flow_filter_done, @@ -1062,6 +1072,7 @@ static const struct flow_filter_ops ops = { .flow_destroy = flow_destroy, .flow_flush = flow_flush, .flow_dev_dump = flow_dev_dump, + .flow_get_flm_stats = flow_get_flm_stats, /* * Other diff --git a/drivers/net/ntnic/ntnic_mod_reg.h b/drivers/net/ntnic/ntnic_mod_reg.h index 8b825d8c48..8703d478b6 100644 --- a/drivers/net/ntnic/ntnic_mod_reg.h +++ b/drivers/net/ntnic/ntnic_mod_reg.h @@ -336,6 +336,8 @@ struct flow_filter_ops { int (*flow_flush)(struct flow_eth_dev *dev, uint16_t caller_id, struct rte_flow_error *error); + int (*flow_get_flm_stats)(struct flow_nic_dev *ndev, uint64_t *data, uint64_t size); + /* * Other */ -- 2.45.0