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 54F8345BCC; Wed, 30 Oct 2024 23:15:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2872B4348C; Wed, 30 Oct 2024 23:15:49 +0100 (CET) Received: from egress-ip42a.ess.de.barracuda.com (egress-ip42a.ess.de.barracuda.com [18.185.115.201]) by mails.dpdk.org (Postfix) with ESMTP id 572D14348B for ; Wed, 30 Oct 2024 23:15:48 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2168.outbound.protection.outlook.com [104.47.17.168]) by mx-outbound11-85.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Oct 2024 22:15:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=e1qKrhMkdEphALdKnTxT0HrLZFl4piQBwcdJHwhMDBrhonFBvr8/Sn2j7UhC5U9SW7lfKbJ96kbdGOReEx6oEHJGyczH+xRDFkoREN2WQcYlnnSAo7GXlQLy+T7XhxgoZ8UEC1qKP07DmkcG5FRusipxVJHF4JEypxhI2mR7ZQuiuESjqSpImg87UDiCDkBqpQcZUhJb9k52uEuip16wMQj5AbzXiip1oTkNgEi0CKumgQez26ewMo1PSIaSJs2s0E/58n1u9u83BIQju+23XeUcH2FZ5jRVbJGh/l9XxcHItX6DwG15m6ysgpgWF23ziFNgMXVIF4/KbXg/B2Pk0A== 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=A9Fu89M8+WAN9lHgNiDF1EAyTKsBHpwTREIBIfUXPnY=; b=e/MhfskJNEN9XX29GU+RLfAwlAfjWrBYVU54usSxUOqdMAukCZ+uokKYTLxwp2O2Vy8sI1ftzU3EtH6E5ORGXy0LtAJvFUoFufUPRrjAkvwfRFpS28emsyQhUYAQt2QwuUhxLGQde6Qldz76QoEnvTQtobJUeRNc+SGNQ+ujYYcpqkKuUna8lKlAANXdfye2nHn4N/NcJ8yQDu/XAGCvjeZrLpyQDBWZmMD+pnpWsJ0nRJQPMzjyWrs/ypnSganjnVopY0zV/Qbq5UBg/oZ+2SoxegF7a7EB8Y1IEyr/bBmHq9Cn8IwhtL9xoDXEJTzltO68efu/bX5iJPg6C85hDg== 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=A9Fu89M8+WAN9lHgNiDF1EAyTKsBHpwTREIBIfUXPnY=; b=fwsEtbGSawkReJ057VdwgFa75fIbcET0yk7Fhn74eg96NuNeQDvDniIGs19Vs7hSQxuPm7yxFI6Re+ViZYqMjUfKL/98NOt7QI5d5MqterskwxBsTfK4uSIP26hEWcoMHrP7ZuW2Xi2tB470pQpEGlSTMNE2eCC8UoB10Nckp8o= Received: from DUZPR01CA0007.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::11) by VE1P190MB0877.EURP190.PROD.OUTLOOK.COM (2603:10a6:800:1ac::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Wed, 30 Oct 2024 21:40:48 +0000 Received: from DU2PEPF00028D13.eurprd03.prod.outlook.com (2603:10a6:10:3c3:cafe::74) by DUZPR01CA0007.outlook.office365.com (2603:10a6:10:3c3::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20 via Frontend Transport; Wed, 30 Oct 2024 21:40:48 +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 DU2PEPF00028D13.mail.protection.outlook.com (10.167.242.27) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Wed, 30 Oct 2024 21:40:47 +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, stephen@networkplumber.org, Danylo Vodopianov Subject: [PATCH v5 57/80] net/ntnic: added flm stat interface Date: Wed, 30 Oct 2024 22:39:04 +0100 Message-ID: <20241030213940.3470062-58-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241030213940.3470062-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241030213940.3470062-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D13:EE_|VE1P190MB0877:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: abcfe051-faec-4731-2ece-08dcf92b8478 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026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?Q?RM1yoEvUjRjS60ADEZOIB+axAkFpeTBKZPTD5t/SKmfRJdx3qxA0TnAO+Gin?= =?us-ascii?Q?1ZGCyZ0CgVaSc1vVyv3aj4TH9vwqToJ1YSttiDftt2cnRf/va4P+tfLA2WiA?= =?us-ascii?Q?rGwoAuSqMNyVv/f241nOflEizvXXR+iKh+c02Ddtb/Is/AL0lLj+H0GYZs7l?= =?us-ascii?Q?DWH3BAzLLzUEn3alRBnJ6Gay7Rb1cOtMEzdYEKYfFLwv8RUvAXKBZt3sgl65?= =?us-ascii?Q?agGS+tx8yXqIBD7ZdB/fyRo0gaVju1K/xJd8hFCuOLRheLWTKdTlP8gCPlHr?= =?us-ascii?Q?EDPN5RKIdQN7hexjTc7k5jCZqTJMv+Z24iKdAbTCljFr4UJ5qpjgNjRvioaI?= =?us-ascii?Q?PntO/zDfGM+ZaaLDsH8fuJHeFpuiR1h6SzI6XNKRu5EC8DyPlCOYIwjTiQHb?= =?us-ascii?Q?2eD6ddeX4OPH+8E+r5gI+gCFMWSUfHtchP0Q/ZUIdN25tJd6nqYON91ASfPm?= =?us-ascii?Q?jopQOYJGBLk40CnyYl1/hfZUo++ADxUilnB9ifhWUVci810tum0C/pg/Db5/?= =?us-ascii?Q?fifA5xmpgOE9wVjyzc90QHstXB5nE7Ax8LNzhvsmd4wq+CTCuA=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)(376014)(36860700013)(1800799024)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: QFb/wUM93S8MSgs8N1ZBA53daD+IH9PUdFFW+vMHwjahsG5/Nxj4v+sN6M6MwnmTGkDbtvHQsEeMfJ/yeGaZBsm5TV5Xp/IEad1F9hM299HQ0m5NqITjrV0hnBRwJNx08sWuEQb2OumDsr0613kuRRqh7R/uIxwF3gzCfzRF91LPNhLkyH8fiB1hkgZUOAK6Mjv2hXauafvgQ8fMqTrdHBvlnROE/ekBp0jWC5U6sjQco0+44y1y6RVsBy04Kv+EjG2ie/HEq/NgQ+fIWcH3NQJRgIif8lAk8BizYwp6SvyuvUX+YCcBvVeSH7nfphlFaPi936KoOxNie6qahd7EyfECsWbAafgPPexpP9QvOF1GGG85z218ZDsdPtsYAO9L8Wjbyb/U06MgIr3Kuvk+Zhjl4VrO82wAFYgVcqtWHDtj/OOm00jvW2VKQhnrucaBiqzx/u3BkNhvIb+mL/WWuHpUrPeSgx65re5gXJQYyjwnUrw0a2EeHaSUEn6wCq4KRQanF5dhtzxmmhVyGJ3W6xoToQKsoqfYb8By6qSCM/DvNe9t5SsBDywxm5mCZAk5AvSgItNlwaOhv1K1IwpL3CEvv0Iala/oa2XPUGqp/I43nZ/6Bv3vRnk0+GFDlzVEmRFKw6OT8itMd99wNUJXZwrv52bE/lfGRsr6394Hmto= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 21:40:47.8177 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: abcfe051-faec-4731-2ece-08dcf92b8478 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: DU2PEPF00028D13.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1P190MB0877 X-OriginatorOrg: napatech.com X-BESS-ID: 1730326545-302901-12794-44830-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.168 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkYWppZAVgZQ0NzQ3DzVINHQMN Us1dDYyDDVwDApKSnR3CA5ydTSwMBYqTYWAGzQG1dBAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260092 [from cloudscan20-80.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 84ab811369..d5a4b0b10c 100644 --- a/drivers/net/ntnic/nthw/flow_api/flow_api.c +++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c @@ -1014,6 +1014,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, @@ -1028,6 +1038,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