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 0E42245BC0; Tue, 29 Oct 2024 18:19:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F643432F4; Tue, 29 Oct 2024 18:17:40 +0100 (CET) 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 3E8E843246 for ; Tue, 29 Oct 2024 18:17:32 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2172.outbound.protection.outlook.com [104.47.17.172]) by mx-outbound17-86.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Oct 2024 17:17:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mURWBNjZAeAxN7GgLpQryZUk9pQoYTgpu72WYQlPVwb4shGcnVbay3e3Qt5XaufHxcjiMu2bpC5RBHFQugzn1Wlq6pvmBe9F+BO9ma3CYK0IPoj8lxZEsFl3Lk/USeTqsjHvadr+Bpx2jc0/6IWfGNQLDW1s/30AuWGrUXP0eUnhoAaUFdAxojhzeikdJ1anVrKKskoTqDfnnVhKXJCLK/bAFtyLq7ybvq4o2q0WRSy16aG3al41iIhLLWHZHvr5eHEe2gpp4etpqRObzirhONzlinrxK2Wt6MRmcJ/3azUjc/HaKXhv7/U4VDfJLwRGRDn/WM8gFLMSTQsWTPOFNg== 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=lEkg0JIaHtA8FVcXYW6znpFpSwV6TPJw5pSfmWzlocRFR1OauLvdF1Emc1AUTYFiYNXZ8PTGSNSohmBUMYL4IJzZH9YPZJfDJdyW7fL4Ea+8pysR1GbYGyrDGeZIs80ZXDjgWzI+1KDVI2Gyn/7y+XJr51JLDQr3+WrOk0KQqRXxQK4hRZKddNK7CC8sM+HX1bi70rBVsInlzpteo1u3WIza7gJqlP0KHxj3tBvMTTs7Z0abtB6x0klkzGZcmxKAUnsvAriqIsnU+tZIFWuXxf8kpbU81YKPcbJQJn71nFRebGC7nTRdl8MOV7jAUBmbOn0ay266NS7XGHkGji/KWQ== 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=MhhKi2aIyWUZhVkEXzehdEiDkXYBx8ViYBYknMI+Izx6hVyiil7fOuVkfp7+ppaRfTvKdrnCdUngr76ZRRjIjowEZ3+KYlyFimK8hjMYaP5D5baoEApSSK3wZWmTNLyGwAZmjaOd/ZdJyDnPcfurFNt/vhr7PtcFbNTt5mdhGck= Received: from DUZPR01CA0196.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::23) by DU0P190MB1954.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:3ba::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Tue, 29 Oct 2024 16:43:49 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::41) by DUZPR01CA0196.outlook.office365.com (2603:10a6:10:4b6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.17 via Frontend Transport; Tue, 29 Oct 2024 16:43:49 +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 DU2PEPF00028D06.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Tue, 29 Oct 2024 16:43:49 +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 v4 57/86] net/ntnic: added flm stat interface Date: Tue, 29 Oct 2024 17:42:01 +0100 Message-ID: <20241029164243.1648775-58-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241029164243.1648775-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241029164243.1648775-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D06:EE_|DU0P190MB1954:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 8cc296ee-0518-4c0e-21ef-08dcf838dd7b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?wEfXBHyv0hIlX1fO2qQYPGyiw2ihA0gFzD+0XDU5ZoLAEfAI0HljLRVrsOet?= =?us-ascii?Q?3jVko+zA7DiqztvlijkGEUWl6zPj/iyLKFynl+65Msthw1fch1kgiwrcktZ1?= =?us-ascii?Q?e1g2Urpt1Zhm/oKbmRLNTVplztk03p2kCfBAS3ePRALsuYYQ2YArsACwTXxl?= =?us-ascii?Q?zPDHqHct2skSOfmTnfXGqcCE7mtZ5v/j3WWSZBFoROVoI+2kG3ieeTFlV6LR?= =?us-ascii?Q?VrE7glbc5AG4MS2fmXizV8WfVTGhjsM3Pi8S3Dzozg/eK9KREXTZMmn+gugB?= =?us-ascii?Q?KAcuf4mOPo9CwJ4vRoLIIkwEsSaBvScKHYrAELMVNjsRBbPjPHCRz1s3/nI8?= =?us-ascii?Q?Agbj2oZzLW68mRKV+Y7DhsghCqcYSrPBtF4/anCw17vNNCXUJSm5GeGZJFDt?= =?us-ascii?Q?8RzNcWnUY3+r4p4eAjOOwXXpK7W8BhlhlAN+p0OORPtQsLfXSnw7k+1cxVOL?= =?us-ascii?Q?D0HOetEOUWPzW39/od+zzRLcaJHweoGR+6suL8eC0vTu+gf2GBxAhKThAU80?= =?us-ascii?Q?bnTtkphVqOLFjRjJ+sV7GnNYwPry8fyNOdlZrT9RfwK+xoLcldr/rBVdKizT?= =?us-ascii?Q?sMti3Uk79ErbTqbu9rntlhZn+bePDEzm94/7LswPMo4Mo8cvERP+NPzZ5T+L?= =?us-ascii?Q?ffeFnX+qC0UZj03ONU9LpfRqEppAme7xH2lzq0MDX09k9xc9j9QyW9SYA+OY?= =?us-ascii?Q?3wTO8sKoYQU03q/eERlYdQbbmPmPRNkdb8SPdlMmcsATMoovQuJBQxE83ACG?= =?us-ascii?Q?oTx+MGHYyLmSKikHwe19wjsVEu8bMA1eXGSjtQpUHvV45BJn7AzBNlvjg0JE?= =?us-ascii?Q?Rl881zZU5qgIHKYRc/5VLHqompfu5fGZ+3JHD7cr9nmxFB6R6i3axh528i7F?= =?us-ascii?Q?GXrDv/COUr+WdeSh6hQ58IWLfp02tB05O0JmXkm8S7EJkJHAJaERUESnQdkk?= =?us-ascii?Q?tDrLbc0LdnKv2hSlooFvsIqwi4RQD24tRXElZUxgm0U8Va+b2UBD5HRCAxsN?= =?us-ascii?Q?zbe/+OERt+YTHKxCtrnJhWa35TIXm4gRGwwWZGb1pLf5YUEU8yuljAs9YTBy?= =?us-ascii?Q?FVgCqiDB9ms8/LGXwjlmPSI4FKS5j/ca4MJfBkCow/wJbvPchRG/OQSXOKEt?= =?us-ascii?Q?K2p2udN8FEc6kuw72wrMZ8WvGqUe9qtoJEzSBv6MXHbTdAduog5L3GDVYoay?= =?us-ascii?Q?gkwwO770/rl1AYb8fbn0vdGmCOlSy2vsz4kDyOhhUxYbteeW91juwXwWmCEN?= =?us-ascii?Q?TbwCfJOmyQe2LWCAcidBpeODi/Y2qKDseF7V2XUSLnYTVdk/SsV9bYz9sYSo?= =?us-ascii?Q?6EdqFvKV6nM7jj+cv1gd1QqFdQ/yqPbQx5+NhmxeycYW2680rwyrf1yTPKG9?= =?us-ascii?Q?8275zy5WC93JNsgYUhA/ZNg9TvYO1x02tvlVUgNUYGHrizSRKw=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)(36860700013)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: hkpEAaZbcW/cr5jc250Zp0UzI7yRe6nCOPflzvdMpfJ6ETGOEYjyAOpinHXoDgz2wdoMo4iKBP6xsMqtrJNqdvpIDjqtrE4+avssE5ApwhIUXBXt50aGkak6DQORK0zFmURWzJs0S65vtZl3zaJuULmemnU8KcAvTrD3AQ8O4WduPruSQP9yfRj0OX6bN3LuOCEZ4ZNk5dSap4fpTxFoIr4I9Fnwhv9CIzCzGVS3KbT1IWdUg1oRARGFsVODNDKZeMtPtkzp/o9Wf5RIwRom4l1S1/psZT/d4LSIF0DcJJV+hPu5QqJpc/Z5pKz7Jvar9wMrYPXigl1OUgMFvXpOtrN/RhkKZKK89JMngp0WS3fYU1KNn+Bk9INSoMaiJPmTKP8g6Knt1od8QBKoVvRg2hdNffLI19KdDZyiaNpSXDsOkEsOfnavZTrifqRvoTKM/KpBBENJyQvxnzdApTbhIAcmKpYYRVT1UJME4x9HYBbgkuA/ZC04XUuYX6chmljDqT7c4H0C5WJYh34msbutpPbplgxqGZl/912SHYbCEB+QFxDhZwqeXsoh3tU5o+fbnn1Pu0EWZBFOlcobvAg6H5EdoyWQJ/o12bf4XoXuKQijWlaLr7Pj+rE2V3DhCqolNDLvBU17QvVeMegpItKja2UWqKZuc2488qtGXevMlhk= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:43:49.4490 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8cc296ee-0518-4c0e-21ef-08dcf838dd7b 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: DU2PEPF00028D06.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0P190MB1954 X-OriginatorOrg: napatech.com X-BESS-ID: 1730222249-304438-12706-32049-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.172 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.260064 [from cloudscan10-180.eu-central-1a.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