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 B905A43A1B; Wed, 7 Feb 2024 03:19:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0A1F402EA; Wed, 7 Feb 2024 03:19:39 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2050.outbound.protection.outlook.com [40.107.237.50]) by mails.dpdk.org (Postfix) with ESMTP id ADDB940151 for ; Wed, 7 Feb 2024 03:19:38 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z4eU9/apFsiDYKQrZvK9FYiFGLpfp4XM/McZHqKYH4fPHKR+RrL7xYoYCJZ196FOYgNGxcgirhy2GuLYjAqHOOfDFQ+HtAiiGyBhXNPkapqqbZJMkjRyRlgtkX/16m5HmR5sJqopLRYR8PdLwBEXRzJ//5tV4kd4+Blfukc6/jYVUxEyK6jwyNudaf/KDx+p4i9HNGpxAS4EXfY5QgKjxHx0JttxriRWDdYqvN/xLzp20GNYyIhs3zpgZeck6Bsnh/qg/zEhtLSizzPekE9sH25RKbaaHy2Lk/7/NRwlmcnIdnDbTVJ28ZgJ8ODtKVa74/IV8VlyLDSWvwZS5eUYRQ== 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=SMi86L29PzJjRD4fko3OcuUAUVK3x6scnoobMKWgHodCmkcI9j4ZbHLplBriGJewV132NAguy4VBXLJMM/fdOye/vIohwf0bQdqRn/gZYurAurZLPGVi/IlViscwN248jErUEcCCCfHahAP/mcr8Ks0NuTdEpliiVbmW2L+pM5nZrSaU/DjJUj7JvrwxNY9xtN/Q0q4EPz+Hc6Xn85yzjnQSPxsFxoV/1z+XXSqMdaGk0oPFCgvi8wtc2HmbnmdzPDqSTkpj0/TvHjLl3BWzULmfLOO7lGYpxd5c0vMY5Vd/jjIpsDRoJe1yQvB16KxiDRWcgWddj3/d//gQ2lWORA== 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=c1xCKhkSr49WGFgwnrQRTfhkFITYCQqbukXzBL8kyldjZKpqvWhbpUHJQQW5Gh5t179xJOcNPgRArS6zZoJxy3mEfsm+n/NGt0vOppFDPfBK/Eo0UU/mZFKuvFIdCMAyxD5p4Rstw5y7nA3DbL1sNCsb7YAodOvnOvqtGTVVae0= Received: from PR3PR09CA0003.eurprd09.prod.outlook.com (2603:10a6:102:b7::8) by CH0PR12MB5137.namprd12.prod.outlook.com (2603:10b6:610:bc::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Wed, 7 Feb 2024 02:19:36 +0000 Received: from SA2PEPF000015CC.namprd03.prod.outlook.com (2603:10a6:102:b7:cafe::11) by PR3PR09CA0003.outlook.office365.com (2603:10a6:102:b7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36 via Frontend Transport; Wed, 7 Feb 2024 02:19:33 +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 SA2PEPF000015CC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Wed, 7 Feb 2024 02:19:32 +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; Tue, 6 Feb 2024 20:19:31 -0600 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v2 01/13] net/ionic: add stat for completion queue entries processed Date: Tue, 6 Feb 2024 18:18:37 -0800 Message-ID: <20240207021849.52988-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CC:EE_|CH0PR12MB5137:EE_ X-MS-Office365-Filtering-Correlation-Id: aa553522-8575-45ed-1f71-08dc278338ef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RiBBFFcC4gJjAJWZxOPy+cui9ZStYdCUnYxykm7zz44ilfkTAYWZVCqpcmXtgUhsUxfqXqmjBl8ttopDoT88R1GaPnOYUHHOBQX5ySgMkstWCx1ifcEYtEUxF/OptA+zdaY55ylzfhOjJN7OZEFt75Mwfv5t8YYKw0q2MVjAP4Mo4XZycwG1gzcJ9/ssB6z3SiJuXzY1GcmFrO02ViXfiNV5vhHgd+ZX88kIYZGvYO9U9VukE/pqzf/lxyhzl0svQeHz/BQHy/6gMwy+FNlhPEARi1MdvgpXufSbdpxtvTyOM+6tMJ+k1wi+AqzotuEdkxL44h2Rd7Mzbj2xINiutXa9B2Z9YqyN7b+esnCRzkDL4l5n/SzlIy5iWj9USBdljN306yXbiKhD4YLp7UaKAZsJRx6ask45sp78PzJzxEsUpbEpS+NGROLGR6QH3H5O8EPLrIBioFHgE16hPN0E3konAT/nVBnKzGF526FxO27Tx8P9FNdi1LVsGrG+aj9twZilJDEdk8sYI9AZ6uKCpy6vC2S/dRbOn4+vQ+gtdtgIyBgSnUoiGTgwa2oL8xHAuOn7iTG6DsegascQLB5D1MgmV+9NPjRk/uK9fYLwZB5rHUcuBOPpn/uzXoFk6TJCl+rtmKRieI2/uKZRImFZAv12SZjxF6ddmW217GtqKMpJfxsDXQ4LIPZuhd9ohbL2H0ganpllJwVy1UadPuLa8Zep0lyEHzWQglbyCIVzV1g5TDE86GAYrKZsY8wQ5c5FnTPVkmFh2SSDwO+q3P9q5w== 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)(396003)(136003)(376002)(346002)(39860400002)(230922051799003)(451199024)(64100799003)(82310400011)(186009)(1800799012)(40470700004)(36840700001)(46966006)(40460700003)(40480700001)(86362001)(26005)(41300700001)(2906002)(36756003)(44832011)(1076003)(16526019)(82740400003)(81166007)(356005)(36860700001)(316002)(47076005)(6916009)(8676002)(478600001)(336012)(70586007)(8936002)(5660300002)(70206006)(426003)(2616005)(4326008)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 02:19:32.6505 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa553522-8575-45ed-1f71-08dc278338ef 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: SA2PEPF000015CC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5137 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