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 97F2F45A68; Tue, 22 Oct 2024 20:30:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F80140272; Tue, 22 Oct 2024 20:30:52 +0200 (CEST) Received: from egress-ip11a.ess.de.barracuda.com (egress-ip11a.ess.de.barracuda.com [18.184.203.234]) by mails.dpdk.org (Postfix) with ESMTP id ED30F40272 for ; Tue, 22 Oct 2024 20:30:49 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2104.outbound.protection.outlook.com [104.47.18.104]) by mx-outbound15-54.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 Oct 2024 18:30:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=spHT8dyPLtOFUOX+sWUE4CVnBzYqlQUaHLZr635iW4iNVRce64gXACYxUb8FDqyoW8vxGaHr+F5oKdvS9zpvV3Ls/vMdpyG1tcwtqLl6TR3hB4lNKNaGBpHVAC8QcNf0sCWO9C8sO3uagZwHhDKqlTeI2oIeSeIW4SIwOPdJ+7TLu4/+pidK59j8HilCl2CdqmhNhdQGtSDgbnXlQLvnR3eWpiKy0B8ysGjs8es3yycHz9yPbZOsPIokN8wOZgPxIruGayFe03EDyF1EMy9+uYS0O/LqRltw+Dk9sBjbYTBJWg8yhgeT0Wr05FZQuaZgjbqQVx0YR8EWmGj74qiyPQ== 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=VDMUj3SrKhgvbxddnNbLLTYCB/IBqgrA1WVrxmElvpRVekmkvS3L/E04VPh+Z7lj3WzvKxPAvAifphzuGgmEvdLmBqsMREXmswYuod+jHvutiW+UTGQjvtA4DV8JT30GdSWRhl4IiV7G8TQRhGtEcfPLdi5xwAK29amMwptH1ujPcHb9Hax7KO3grg7SP8UsN+vWAcBNFoP84aCy7xgLMFFsIJGuyu3zDTfrApsqKFn/5KLDMxiGSO9LTMjKXsEJGSxPIuUHs2nAK0frAs6bJtKUbT3kyXnuOmvwP+uoMj7WjvGH6EaKREfPntDqGUlZWFmeR+v3MIy5fheI7CW1fA== 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=VOIZJH+2bU8OAN6E1c90cgOQ0woR4QRTtDrxWcXMyseviCWPxiD0T+xVkHU8oHOLYRANEUiqSST47dOVPaKeHFpkTuQcL9/N4w7Kl47Dr7eaPGzN/BxcF3CO3CfyhE4JvaJaY4iFcaadU/n3NSZJCS3zk7e+yYv8tpbMAZWyWww= Received: from DB9PR06CA0007.eurprd06.prod.outlook.com (2603:10a6:10:1db::12) by AM9P190MB1123.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:271::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Tue, 22 Oct 2024 16:57:05 +0000 Received: from DU2PEPF0001E9C2.eurprd03.prod.outlook.com (2603:10a6:10:1db:cafe::91) by DB9PR06CA0007.outlook.office365.com (2603:10a6:10:1db::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Tue, 22 Oct 2024 16:57:05 +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 DU2PEPF0001E9C2.mail.protection.outlook.com (10.167.8.71) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Tue, 22 Oct 2024 16:57:05 +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 v2 57/73] net/ntnic: added flm stat interface Date: Tue, 22 Oct 2024 18:55:14 +0200 Message-ID: <20241022165541.3186140-58-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241022165541.3186140-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241022165541.3186140-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9C2:EE_|AM9P190MB1123:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 6011f2b1-ee45-49f6-3bdf-08dcf2ba8ef3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?bUlrIrXJdjnzmq/T/prCqy4slGEqnEkr/YKruUHXM8VtBis1IOyPHosfuTLC?= =?us-ascii?Q?IaS8UdLHd3q59S0d/423Jc9E1pEzCTOAs+QgdDMzDHXTWqgZBEEG11kyPkOe?= =?us-ascii?Q?3UBA5lVZqCnfM01gUCR3mIj0emBDy7rfxvWtBJOhWI4Lbfv03P9D5KFZpVrG?= =?us-ascii?Q?Vz3jvQdoRoyOV1dnxUy3whuVB+hm5dS11LTbpgfXTtD6C3bsy+IhOOYyTqSY?= =?us-ascii?Q?pbicksJx5qfuc0r8V0cY/AmWMR6eyQLQuVT9euVuvVfjRmeXRP3fQlUut2n/?= =?us-ascii?Q?qn+RyBwJvGSIoaxnPtLAMS9Gb1sH1ICr2u8gad4VkSE9APnVQ376ugug6ads?= =?us-ascii?Q?riDGHEGa/4ano26m3cdHMEVq3KbNJ0rCgdB+NCe9PuSsBDDVK0DRTBf/inb+?= =?us-ascii?Q?0uVprHzj9BLK3QmDCR0D0qy9QgXYdoTZkwrtUvCT5nSYv+TLltnUanEE4M1j?= =?us-ascii?Q?OHpjBC1DFgiGQlCEQKLQX4hJz4z9bZ6UU4PGRjeI1O3TptfvBs02K9gx0LGI?= =?us-ascii?Q?3d2d467ToMpkuhSfitKr1HcQxGSIiRBTlRBtRcm1rcg3fPM0nc7u61uUEpKP?= =?us-ascii?Q?XypcU3d7SG1mV/h755EZUwC/Q3dEl9H3fvHrUuMIZnfqb1HrFsNbxeIhBAXV?= =?us-ascii?Q?aydLc13HoGiPT1IepUsLTxlEPuLllRPyYl+odkXQXFVjWsQUT3RylyUPZ6uo?= =?us-ascii?Q?IewL49VYYz/NrUWekGou1sWTSdUnO+mt5/gvcWw9sNhWex/kAaGl71kzsnar?= =?us-ascii?Q?4KjbF2cfDh2zc/o82c840o2BqQWqA21zUEOZMsPUpWvcW3qxqh+5C/htCzIo?= =?us-ascii?Q?u3vyrjMW5JLZ9QQZf7s+NfuF0kwY2xB/v0A1fe9TajeVo/OvQARMLfkQhsTh?= =?us-ascii?Q?SgUIZwQX87ydztQJYf6bsVwy56+OUEwop2dPiiARdEeWRE8OtSVDtP/SQbbB?= =?us-ascii?Q?8/MZSsroPxg6HdUDxdl79LxIFLn6ZbCovEDahgEUkAgVIrBXS799VgegWTC6?= =?us-ascii?Q?V/P6tPxakGGjZJ9L7wDKdBpesjpe6wXWiiEalNcYvSWEpyqOWc+bW8f0vrmb?= =?us-ascii?Q?H1vBwOr4u+jPkWX5jlxT+Rleesg4CiOhEUYYi7zycC22pAKeylpaG2UiHlzh?= =?us-ascii?Q?iJVeisW/t8Yu5mhtBLg4O0ieLfOHF49aI77F2ZIDR00PFfAXziLyqOWZYU1A?= =?us-ascii?Q?Q6F33SwdTV4ktvipQsl5oTjKrtzGxkhPNE456RIS7lWGttCoDoj/LZGE4doi?= =?us-ascii?Q?7MdGq3O8r/M30rFrMSQ/Ldppo3A+/9+yiF3Zoz4HYVphcURF8vHAidpGf4TD?= =?us-ascii?Q?9hX6RKUBTWbBfrIvgEjvjUjuQBejsEEY0MbBvvpwCpinOsyODAS/4POrnwZQ?= =?us-ascii?Q?2V4j4Wr3HoY6YihpXy1XTiLzJWlVAL7wK+TlqOblLsV18o8rTw=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)(82310400026)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: HHEzXAdJrsLrh149Nn7O4NSlGiXo7ba2witBs9sn0de4tWIT4GGJALCiDJenpA4nKOFuVqEHBxAvee28LPahs7rQ9YhdsXTvmlzBs7vaJQo6GSjww6jMMlosN6ekyw+32a6nLnsfXAb0rrlnpBhM7MRK6itEQ9tRJ9lrjyma7nZRwOYVEv34DcDHd+3q+xAQQSNcDUawl41Pw9p8VUOyWX8dMm4SZkglM/oYth35Lch62k7inJo2I/67r6eKdHfoieIGmaLol/+Nyz/sFfZ/rl90J1SiLPmamHppkRBsimdEaC/+BgSZyKvKoUjzQp1Vg8Mdc0N1a/+7aWuMz6wIpG5sw3nEY4PjB8dEpG2Hxwfu0XHITO/Gwzy0RhQF0MM3Hp8acX3sSjAYXMerIcnNVuWQXkgJ6m7IFO/M49HxrmZMveGz3NMBFEewrPc8juvASa7Jkp5QEBkG2GtGQ5InLsTrzD9iwBSJ7AoJHQ0bk6SKDPoACfSRaF4sd1Nd/9tR/CwzZ4dbnti6gfVcN1BAv59jabfffpc+lULt/xskMtDKBwWRweuMvWTa+H2st2jP4ntg3P2lQnTXlnBi0w0wzXp6FyDPlpp4MYvGKW4C53fGYaTBoXjukoI/g3ivT7NxV5DB0NLl3QEA05uImhLetxUXV1HCfTCNrqYrJjZXEmE= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 16:57:05.2005 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6011f2b1-ee45-49f6-3bdf-08dcf2ba8ef3 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: DU2PEPF0001E9C2.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P190MB1123 X-OriginatorOrg: napatech.com X-BESS-ID: 1729621849-303894-12663-17554-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.18.104 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.259903 [from cloudscan10-0.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