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 B099E45B96; Mon, 21 Oct 2024 23:10:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A0F6410E7; Mon, 21 Oct 2024 23:06:39 +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 B96CE40DDA for ; Mon, 21 Oct 2024 23:06:07 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2110.outbound.protection.outlook.com [104.47.17.110]) by mx-outbound8-87.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 21 Oct 2024 21:06:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZcZc80lzo7dz5dnaaOIQzjgmb2NUQAWIAkaXLAoho4NrYMXOgdtJoB37bKVx6HpW5Ui07fRageOCGZ8BZejsijM3ENIAZedMfMZwFDTVic6Hhb4fBkuUevpm48HK+IJP2BsPnC9hp9NC3SKM+4qoWAm59Vx/lOAMUIjeK3oDatF5q5XBcL97R9DgFF4Jv6Hvf3nMUJKhgVD1uRY7R4qHk70Qx7tyK/ZF9I9t3nAWr07MU5SxmCY87mxoh3uSKlesT14fP+YjuCXNUyx0L9OobE75tIfaNdOqtAVAqgg4fj7F75yIFFMJcCo4xAkNz93z0No8lxay++dN80IPhbbi5g== 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=hZ/tH9hjW6WabsdVHEBmHz8cGd6wyfL7QFB3EiQ9N+0=; b=vYsqcypUQR2DI7+Nxarxl+7X4yhNd98b12ZIJO8HS12luzidOguEcSg09Ir1r5ID0DaEaLzMg55lztK9sdoBpau5Xx+jTVbYQ3dJwGTpJDKCDiiBRNQhYYrpBcc+xXDrREX69GXMCsEj910fx7HkAIws76N/ko6AIeY4STVGeyP450DIR/TqFEALjqstNgR7QhgYNiHBj8siAAHmHSDiTRs0whdlYUGong4VEcHWc6YS58uZljkp84/024So6gO9wFXUXwBzOGvT2PyzhmCWLVV/+nd7ZVPMiq9yuHZB0gPGchLwhrZfxnSJFfJrVbi6bxnPRBKAbW+JJ/HrhUBSVg== 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=hZ/tH9hjW6WabsdVHEBmHz8cGd6wyfL7QFB3EiQ9N+0=; b=bTcSLbDXuOXrLckCVAKP6FCujLDH4l+y7N2M917yllNBEH2YkGIpjPWdoigpcKNUREF68gb5JV+XU9zVCc5qT/BzK9zEFhAbeh4O38rkkLzvhOY6M7IPLnUofiP41eMS7WkBSJC6eLTr8pQBJtYRE1c6arfJyJScVRAD7Fv0RWw= Received: from AS9PR04CA0143.eurprd04.prod.outlook.com (2603:10a6:20b:48a::24) by DB9P190MB1746.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:324::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.27; Mon, 21 Oct 2024 21:06:04 +0000 Received: from AMS0EPF000001A8.eurprd05.prod.outlook.com (2603:10a6:20b:48a:cafe::a5) by AS9PR04CA0143.outlook.office365.com (2603:10a6:20b:48a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Mon, 21 Oct 2024 21:06:04 +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 AMS0EPF000001A8.mail.protection.outlook.com (10.167.16.148) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 21:06:04 +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, Oleksandr Kolomeiets Subject: [PATCH v1 46/73] net/ntnic: add MAC Tx module Date: Mon, 21 Oct 2024 23:04:48 +0200 Message-ID: <20241021210527.2075431-47-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241021210527.2075431-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001A8:EE_|DB9P190MB1746:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 1f70d42f-87fd-42e2-13ef-08dcf2142d0c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?zpxMkiogb3wUOw349p6xOu6vd7iq3RoteJZYy69G4ZuboKDQrEffFu70usGA?= =?us-ascii?Q?H/coJB+FAMb01hvL+jJ7EB2bC040qkbvSHgtuDYkDr/LYJQTmpBEXPXDCFxp?= =?us-ascii?Q?geurNSZO7VOWoWpqD15t4/i36JZt4HqGt4hFxanJLnSakjkf33b8SYE61BQ7?= =?us-ascii?Q?4rHUAZpblXmLEzOxZNX1j8jX/okF4HmU4kRzNCmpnU3r2Wxfx71pHEGHwco5?= =?us-ascii?Q?q+DuDzQDRoeTx7rC60mGG09h2x0bu+ykZwRiLbUVL1IKyUqQbd6xLNAqhFV9?= =?us-ascii?Q?2pQvUrioJGnIf8ez1XYtDn8zFH0rmkgkNze/nsLxGTAGX3cNuRxkKzbu4jTJ?= =?us-ascii?Q?GXHleSP3coPGJ5acpbRTt7oXdzGaogqezyvzhoYNie0mZm/AH2BBtuonJCxx?= =?us-ascii?Q?bRAEvdqkSowpHgEi63rO97kJcH9XmD06YI08/R5qmQEOYKce7icPmi1AxBdT?= =?us-ascii?Q?T45b4GkNS8Qow/1AJTOc81nR4tfEIcNR9mLOA2AUIrPWMpHnVaGH5w9FwSHg?= =?us-ascii?Q?z54GEnDkxrhu3tGE1V/SB9IyZLJLjsptM3vPYgDsweLlQFGVcIXBKU5dXAm7?= =?us-ascii?Q?pl44iYABWJV3Jufx9i85IC8NqA2GyObxTBJJ8fjyNpgdMysNQ1pGDJZubEUC?= =?us-ascii?Q?lxx8EUUBaJrormpAzT4+od8AhghPa+DS8F19lFC8iaI7fOYVlVMH60JnN3BB?= =?us-ascii?Q?V/p78PrXRnvvi9QtMNEzR1pd8wyMpoIpcYkx3p/w2wxI6q22SoDg5CBNz20Q?= =?us-ascii?Q?0UfDv5KBsoCPvtxHQWeftVOSLYhWcPpLS6pCa2a0/O20tilKfn8a3SWR1zO7?= =?us-ascii?Q?kCkdZ1muWgF82FLFAugGoz06cB0JzFc1RRmx6OdLzazIDrfsNXetqS7rBVjd?= =?us-ascii?Q?/3PEcQq6rdpaZdiVsL2nh2eUU58vdT2aWyrVUMk3YcY482Ic5a3L5Sc7VWi4?= =?us-ascii?Q?ZKCqcakXNTqRMbNLYa9ZZF5ClB9/7S33/waJlKf3kW8Y2zkkQVXA8mELab7L?= =?us-ascii?Q?dkb0MRU7o5HqAfy4aHL+Ix8T9JLhN0MJ5E6lUVCiOYFHZEDyejLwS51q86pq?= =?us-ascii?Q?wh5u8IvN0+2Wg/swMNRJhkkujoFZfor007iPrs/vi6JkHLE44x/8u0Wr4gpo?= =?us-ascii?Q?CQ4v0KDZQEsDFOJQv8WZZESQlV3KD/yJVr3vCT+ZVg6N0PTyth8Z93I8cyO5?= =?us-ascii?Q?MPitOOtJQpBJKhXkrZZB1TRk7hgsOTavhJhfc8LQ5EDevkZIdq/aPOw2fn8X?= =?us-ascii?Q?7Mt3QlDJi/Sw8pBrBCT5hHtocvZFozl0ap5LnPr+vIcXzg8bi565P6QgUuk1?= =?us-ascii?Q?dZdUtedpCVQBc6OrPibdXN8v7VvgQ5Jv7WMbDm+65IS+d8+RS5rCiAwkfGNT?= =?us-ascii?Q?TPXNQnLpZlb9QX6+OHBMZjVp9z3ze2Rjbk3mBPf6Y/z2TIuQkw=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)(376014)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: gc95sQzuMHAdHvTr4MX4h82Z9NClzJQZlXIKaAJ1gbKB1oQin3Cme3hd4OMauJCQDy30/eWt4URbMXodMUya1nfK2dV0YI2Zhu+d5igxth650oCe1/xwbER9RqBwnBNdZ5A2Z/HsfFwHQQps7pDnhME604xTyJ41slLE3/NPsS6b2WCGSY4chljxDxQPfjFKgKOSQQ9VAuedGJc9NmPbfb4lDfVzU8EOhPbDYZuzC+SevSu7tRZ/JWuy9mP7Z+t0GB6NasM850T55Pkvx7FWuX/ISQ4nla6QKrxAiCBVvUtWm9MTgs9rz0JR8oxgUdibJsXhCpxKZUtXi5nlxZs5lLWwkPgyGm5TuijWO825Hm+EAw0Tw5EPCHeMP0RbXrzGPA6XxgmmtIS/aogHKBO7vXFqGPDGdi83Qg+NbfbvsCt9jPMSgB0REO4cfZN6ZcCN9XV192ID1BcOO+dLOjbWe3KhqyJ44iSdqoZdPGI7jGuVe5yBcb467elDvKWpW6lwdDq2M8XjTzZzoJbey1f4xzgJRRo1jOoYEU7270iCX/rqWCqSk4eefBHOQ719EYqS+BH4ooj2VG/9qlnUbXBiP3ZZKVQ7xQB3i7t3Ha9XIKEu/++eF1BgQG2mqY8lPAlwrPYveoQDgl7Q2zxSDSnuUH4sR8gRBiUxaKsu5aul2Jk= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 21:06:04.7239 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f70d42f-87fd-42e2-13ef-08dcf2142d0c 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: AMS0EPF000001A8.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P190MB1746 X-BESS-ID: 1729544766-302135-12930-42829-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.110 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVqZmBoZAVgZQ0NAgzSzR1DLVIM XcwCTRItUgNSnZzMjEMjEp0dzSzCxVqTYWADbDt0pBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259883 [from cloudscan9-212.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=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: Oleksandr Kolomeiets The Media Access Control Transmit module contains counters that keep track on transmitted packets. Signed-off-by: Oleksandr Kolomeiets --- .../supported/nthw_fpga_9563_055_049_0000.c | 38 ++++++++++++++++++- .../ntnic/nthw/supported/nthw_fpga_mod_defs.h | 3 +- .../ntnic/nthw/supported/nthw_fpga_reg_defs.h | 1 + .../supported/nthw_fpga_reg_defs_mac_tx.h | 21 ++++++++++ 4 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_mac_tx.h diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c b/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c index eecd6342c0..7a2f5aec32 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c @@ -1831,6 +1831,40 @@ static nthw_fpga_register_init_s mac_rx_registers[] = { { MAC_RX_UNDERSIZE, 8, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, mac_rx_undersize_fields }, }; +static nthw_fpga_field_init_s mac_tx_packet_small_fields[] = { + { MAC_TX_PACKET_SMALL_COUNT, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s mac_tx_total_bytes_fields[] = { + { MAC_TX_TOTAL_BYTES_COUNT, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s mac_tx_total_good_bytes_fields[] = { + { MAC_TX_TOTAL_GOOD_BYTES_COUNT, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s mac_tx_total_good_packets_fields[] = { + { MAC_TX_TOTAL_GOOD_PACKETS_COUNT, 32, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s mac_tx_total_packets_fields[] = { + { MAC_TX_TOTAL_PACKETS_COUNT, 32, 0, 0x0000 }, +}; + +static nthw_fpga_register_init_s mac_tx_registers[] = { + { MAC_TX_PACKET_SMALL, 2, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, mac_tx_packet_small_fields }, + { MAC_TX_TOTAL_BYTES, 3, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, mac_tx_total_bytes_fields }, + { + MAC_TX_TOTAL_GOOD_BYTES, 4, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, + mac_tx_total_good_bytes_fields + }, + { + MAC_TX_TOTAL_GOOD_PACKETS, 1, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, + mac_tx_total_good_packets_fields + }, + { MAC_TX_TOTAL_PACKETS, 0, 32, NTHW_FPGA_REG_TYPE_RO, 0, 1, mac_tx_total_packets_fields }, +}; + static nthw_fpga_field_init_s pci_rd_tg_tg_ctrl_fields[] = { { PCI_RD_TG_TG_CTRL_TG_RD_RDY, 1, 0, 0 }, }; @@ -2182,6 +2216,8 @@ static nthw_fpga_module_init_s fpga_modules[] = { }, { MOD_MAC_RX, 0, MOD_MAC_RX, 0, 0, NTHW_FPGA_BUS_TYPE_RAB2, 10752, 9, mac_rx_registers }, { MOD_MAC_RX, 1, MOD_MAC_RX, 0, 0, NTHW_FPGA_BUS_TYPE_RAB2, 12288, 9, mac_rx_registers }, + { MOD_MAC_TX, 0, MOD_MAC_TX, 0, 0, NTHW_FPGA_BUS_TYPE_RAB2, 11264, 5, mac_tx_registers }, + { MOD_MAC_TX, 1, MOD_MAC_TX, 0, 0, NTHW_FPGA_BUS_TYPE_RAB2, 12800, 5, mac_tx_registers }, { MOD_PCI_RD_TG, 0, MOD_PCI_RD_TG, 0, 1, NTHW_FPGA_BUS_TYPE_RAB0, 2320, 6, pci_rd_tg_registers @@ -2353,5 +2389,5 @@ static nthw_fpga_prod_param_s product_parameters[] = { }; nthw_fpga_prod_init_s nthw_fpga_9563_055_049_0000 = { - 200, 9563, 55, 49, 0, 0, 1726740521, 152, product_parameters, 28, fpga_modules, + 200, 9563, 55, 49, 0, 0, 1726740521, 152, product_parameters, 30, fpga_modules, }; diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h index 5983ba7095..f4a913f3d2 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h @@ -30,6 +30,7 @@ #define MOD_KM (0xcfbd9dbeUL) #define MOD_MAC_PCS (0x7abe24c7UL) #define MOD_MAC_RX (0x6347b490UL) +#define MOD_MAC_TX (0x351d1316UL) #define MOD_PCIE3 (0xfbc48c18UL) #define MOD_PCI_RD_TG (0x9ad9eed2UL) #define MOD_PCI_WR_TG (0x274b69e1UL) @@ -44,7 +45,7 @@ #define MOD_TX_CPY (0x60acf217UL) #define MOD_TX_INS (0x59afa100UL) #define MOD_TX_RPL (0x1095dfbbUL) -#define MOD_IDX_COUNT (31) +#define MOD_IDX_COUNT (32) /* aliases - only aliases go below this point */ #endif /* _NTHW_FPGA_MOD_DEFS_H_ */ diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h index 5ebbec6c7e..7741aa563f 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h @@ -31,6 +31,7 @@ #include "nthw_fpga_reg_defs_km.h" #include "nthw_fpga_reg_defs_mac_pcs.h" #include "nthw_fpga_reg_defs_mac_rx.h" +#include "nthw_fpga_reg_defs_mac_tx.h" #include "nthw_fpga_reg_defs_pcie3.h" #include "nthw_fpga_reg_defs_pci_rd_tg.h" #include "nthw_fpga_reg_defs_pci_wr_tg.h" diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_mac_tx.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_mac_tx.h new file mode 100644 index 0000000000..6a77d449ae --- /dev/null +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_mac_tx.h @@ -0,0 +1,21 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2024 Napatech A/S + */ + +#ifndef _NTHW_FPGA_REG_DEFS_MAC_TX_ +#define _NTHW_FPGA_REG_DEFS_MAC_TX_ + +/* MAC_TX */ +#define MAC_TX_PACKET_SMALL (0xcfcb5e97UL) +#define MAC_TX_PACKET_SMALL_COUNT (0x84345b01UL) +#define MAC_TX_TOTAL_BYTES (0x7bd15854UL) +#define MAC_TX_TOTAL_BYTES_COUNT (0x61fb238cUL) +#define MAC_TX_TOTAL_GOOD_BYTES (0xcf0260fUL) +#define MAC_TX_TOTAL_GOOD_BYTES_COUNT (0x8603398UL) +#define MAC_TX_TOTAL_GOOD_PACKETS (0xd89f151UL) +#define MAC_TX_TOTAL_GOOD_PACKETS_COUNT (0x12c47c77UL) +#define MAC_TX_TOTAL_PACKETS (0xe37b5ed4UL) +#define MAC_TX_TOTAL_PACKETS_COUNT (0x21ddd2ddUL) + +#endif /* _NTHW_FPGA_REG_DEFS_MAC_TX_ */ -- 2.45.0