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 5645543A53; Fri, 2 Feb 2024 20:33:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A626140A7A; Fri, 2 Feb 2024 20:33:15 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2078.outbound.protection.outlook.com [40.107.244.78]) by mails.dpdk.org (Postfix) with ESMTP id B34CC40268 for ; Fri, 2 Feb 2024 20:33:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WfFAnIdykCjN7gpc9OavAXFkk7b8BWlAzR4O1JnX3qIi2R8JYUAGXDClMGha0TYxaaqwQPmltsOlxhdlMiDgBy9Ot38EBNger+lVyjz55HssQ+U6sBkor+0irKinfganzOvGmUM7D8kYfm0Xv4sE5QhiRDF6eT2qKjMki0NBsaQNVyE/tY+Qs8nDVshrsj2ZjXGSLAwd3UVTxJjQYdYog/hjWbTBBi7ywnlLoJuiIYVBEj2YQ1HOOu4s/VYl2K+hUlRqkdiZFM4pYKlLiuP19gLBYy8W8YOcWBQVu9VLAt7IxoU6wquNEmR0ICNT428InSODJ+v0RWhwHtvKDuBehg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=VnjUuTNvh3P1kmLlB8IDpihoHlmAO5FwR2yDIWgbrWY=; b=hmAg1iVUUeRoimtpiaoE8L8GuFQ+Rd3pDEaBZdQWOlI/9BBcBIDk6trU42kYGeprwEFOgqkx3e4ANznTdmRSw60b5jhFw1D9bV0VkLjLxSABAoFWU++gnEmdQZ/4LS6/jonMDZ9N4SX+n4Z2eDDjS+pG/IOowi6AqpoqEzUV5SyR26LHcs8LPqydumFiTCJSOEoNVSOABRDmp/ne5fIkd7neCPDuV/FjCCD/bT399YuQRkuYQQOQiGM/OE0zBDKdLGO5ZUD9HU5Fdj/Oqjyg8qNMmA5XQMd2dTLvKVSijzAsBI6SE/Xn2l3IuxITfmYo7X2l9QY6Yv5yqUNLM1IZKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VnjUuTNvh3P1kmLlB8IDpihoHlmAO5FwR2yDIWgbrWY=; b=L+NeP8giMyZmGonS1FokdFV2avIADFMI4eR4nSak6AfBk/7x/a7yP3I8KLQGblLbYV6tG4U2Dwik5hlJQqMOllLx6Yc/k//pTO7u84duxGOlBmxIVOtfAmwyKvybpNqNqpZ93DrxrghE1zinHzXmYq76MSVQtITIa+j25UT9AKM= Received: from DM6PR03CA0059.namprd03.prod.outlook.com (2603:10b6:5:100::36) by SJ0PR12MB5423.namprd12.prod.outlook.com (2603:10b6:a03:301::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.12; Fri, 2 Feb 2024 19:33:07 +0000 Received: from DS1PEPF00017092.namprd03.prod.outlook.com (2603:10b6:5:100:cafe::ff) by DM6PR03CA0059.outlook.office365.com (2603:10b6:5:100::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.24 via Frontend Transport; Fri, 2 Feb 2024 19:33:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF00017092.mail.protection.outlook.com (10.167.17.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Fri, 2 Feb 2024 19:33:07 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 2 Feb 2024 13:33:04 -0600 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH 01/13] net/ionic: add stat for completion queue entries processed Date: Fri, 2 Feb 2024 11:32:26 -0800 Message-ID: <20240202193238.62669-2-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240202193238.62669-1-andrew.boyer@amd.com> References: <20240202193238.62669-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017092:EE_|SJ0PR12MB5423:EE_ X-MS-Office365-Filtering-Correlation-Id: dc297743-a0f5-4d9c-9eb4-08dc2425c852 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ND8JMWENcPq2UgXm5UXUhfs0YsnxGRkMNfrNhraDl1ShIIQFsA5SKPGltYmnZYisDkTwtNtTQafFRyBM3BUsPQT62l9CVNDolVraYKjqV5yOb+R3ERj3e04/LejtHStzon9Pzqtm5x42hjXHjRH2miuCZjxRpl+CkZ1aSiKDMFTiuSCl2F6lIAbRcpnfKCTMoqfzovfcs3ILF/dbPOx5Ku4dECYoBt8a0YUCZLtMtEXx2vlAaq47INFuyDvvJq+wKOnIkcE1SnK2/o97GPkM59EKw52FU+WGjJFoWy20kM8ZzWNZezqGfM8LZ8w401Bec99KJ+yHGI/XteNHvHo9YBA8sbq2NIBdztC9fzBtIhtJwsJdhLqXpMVnid3BPeH19uBgSKq3Z6WUB2t9jgzHbNJCrTjXzSIvswNy8n8mA61sZqesQ2pf2pbiakzKPsCmZc9xeF5Tbs4DCcZvBHAqT5u1gAzk2Lp8Y6N1aEqV+MLqCWSvB6jVKp+/571igc3KQOLWOiLHquFbHc1ybgsrOdy+NYMrx7pDfPvJZjaeAp62TMfrpWs4QXaGHRBw4lNMMIbDIgkhlL6by35qp1gfE3A07hryqNoq5wbB2bzh7OI65O/ySsldRhBxJfKPC5u/qtUTnX8JWky1WiirjT3uq+6wecoqFbou5vTvt6oqGDgmiRX96w+ujYRbCaly5ugCsa0nPfq2r++ALK4hldBTjypq1fZ5A/aKHTxi2qMXITVQwor0vrmr+f2nAIMyH8+nPgzuTG47OnrNbVYAHJXxog== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(346002)(39860400002)(396003)(136003)(376002)(230922051799003)(186009)(64100799003)(82310400011)(451199024)(1800799012)(40470700004)(36840700001)(46966006)(40480700001)(40460700003)(41300700001)(86362001)(36756003)(478600001)(356005)(2616005)(81166007)(1076003)(16526019)(47076005)(26005)(2906002)(4326008)(36860700001)(5660300002)(82740400003)(6666004)(316002)(426003)(336012)(44832011)(6916009)(8936002)(70586007)(70206006)(8676002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 19:33:07.2234 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dc297743-a0f5-4d9c-9eb4-08dc2425c852 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017092.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5423 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 When completion coalescing is turned on in the FW, there will be fewer CQE than Tx packets. Expose the stat through debug logging. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_lif.h | 1 + drivers/net/ionic/ionic_rxtx.c | 3 +++ drivers/net/ionic/ionic_rxtx_sg.c | 2 ++ drivers/net/ionic/ionic_rxtx_simple.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/drivers/net/ionic/ionic_lif.h b/drivers/net/ionic/ionic_lif.h index 36b3bcc5a9..cac7a4583b 100644 --- a/drivers/net/ionic/ionic_lif.h +++ b/drivers/net/ionic/ionic_lif.h @@ -32,6 +32,7 @@ struct ionic_tx_stats { uint64_t packets; uint64_t bytes; + uint64_t comps; uint64_t drop; uint64_t stop; uint64_t no_csum; diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index b9e73b4871..d92b231f8f 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -117,6 +117,9 @@ ionic_dev_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id) stats = &txq->stats; IONIC_PRINT(DEBUG, "TX queue %u pkts %ju tso %ju", txq->qcq.q.index, stats->packets, stats->tso); + IONIC_PRINT(DEBUG, "TX queue %u comps %ju (%ju per)", + txq->qcq.q.index, stats->comps, + stats->comps ? stats->packets / stats->comps : 0); return 0; } diff --git a/drivers/net/ionic/ionic_rxtx_sg.c b/drivers/net/ionic/ionic_rxtx_sg.c index ab8e56e91c..6c028a698c 100644 --- a/drivers/net/ionic/ionic_rxtx_sg.c +++ b/drivers/net/ionic/ionic_rxtx_sg.c @@ -26,6 +26,7 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq) { struct ionic_cq *cq = &txq->qcq.cq; struct ionic_queue *q = &txq->qcq.q; + struct ionic_tx_stats *stats = &txq->stats; struct rte_mbuf *txm; struct ionic_txq_comp *cq_desc, *cq_desc_base = cq->base; void **info; @@ -72,6 +73,7 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq) } cq_desc = &cq_desc_base[cq->tail_idx]; + stats->comps++; } } diff --git a/drivers/net/ionic/ionic_rxtx_simple.c b/drivers/net/ionic/ionic_rxtx_simple.c index 5f81856256..5969287b66 100644 --- a/drivers/net/ionic/ionic_rxtx_simple.c +++ b/drivers/net/ionic/ionic_rxtx_simple.c @@ -26,6 +26,7 @@ ionic_tx_flush(struct ionic_tx_qcq *txq) { struct ionic_cq *cq = &txq->qcq.cq; struct ionic_queue *q = &txq->qcq.q; + struct ionic_tx_stats *stats = &txq->stats; struct rte_mbuf *txm; struct ionic_txq_comp *cq_desc, *cq_desc_base = cq->base; void **info; @@ -67,6 +68,7 @@ ionic_tx_flush(struct ionic_tx_qcq *txq) } cq_desc = &cq_desc_base[cq->tail_idx]; + stats->comps++; } } -- 2.17.1