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 9BED043A2A; Wed, 7 Feb 2024 04:14:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8995E42D90; Wed, 7 Feb 2024 04:14:19 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2075.outbound.protection.outlook.com [40.107.94.75]) by mails.dpdk.org (Postfix) with ESMTP id 3AE1340274 for ; Wed, 7 Feb 2024 04:14:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ss+cIWu7HXWzmNyxIbKtB+kMWCjUCQm13uYX49c+jkoj3Z6bVgjP+6U6rsK+TeYKJcefDiXwJnsXBuK2dWLJd7+m/ocXBM9p65oyIiz6Hfwo/xaH7J3/VuFA1HABKLlS0O9edSFb7kcgOsOyeI7KtaRjre+H1ukpDQrxprvy3wk2e1fZVaACeIwpxhpJWWOVSe1UwN9s4JqntdC2zc2FcxnE1R7yNhFMTMhxb3clhL+QWi0lO+rKfwbll+kqE89wqgMmUEcFGaNYfR5H80CbpsAudHUCLc547LxdyR5k2PhrIdqTDQmBUz7OQesNRXKj/r/yJm3zRh47aE4fb2Z1NQ== 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=jle5j8LXCAJhJNzD1bwJk7z5aYacUEDwFHN8RrVUMuC/ISmnIi0N15FB0w1FIsyaawoCmaC5oSlivSjjB+P/E/rzdbx2ATPPpVw+0fp3CciUsX/OiIQIF0AG92y8tyqtmVMelSYgVzyuoJhbzzaNVW4lZ6Il/UCKU37nikI1DvvqHnNSZbkoet7rOkuXuusYiF1rcG0Q3f3DN5P9E4ApRscVB/9B+U1F5MrxQDukiuaFjnWXdQ9dRd/NaeO4Oh6ZjusybEWtE4Ph7i5afr9jIi3nEQ0APP5th3PKudLVQZTAsbBeDlgzF+VHs1ok4TuQ5RwOUdHnMQEYHiOixUBoiA== 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=VRKEJDCtyex69PLPfAIvZ/hp+O4AGhBI/CvH3SHCLzJ/yQGvoYCY3sJa8qPXaVBQ9HiNGEnt8/aceq+MbtBHeyJ1DT86BdFPtbIYrBO2oWW1K/IY9XMGANe6igwL+d7JrF07kmyzvzYNllF+0H9fJp/Xt5PYLsmRuJmIKBeqib8= Received: from DM6PR02CA0055.namprd02.prod.outlook.com (2603:10b6:5:177::32) by BL0PR12MB4993.namprd12.prod.outlook.com (2603:10b6:208:17e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.16; Wed, 7 Feb 2024 03:14:15 +0000 Received: from CO1PEPF000044FB.namprd21.prod.outlook.com (2603:10b6:5:177:cafe::97) by DM6PR02CA0055.outlook.office365.com (2603:10b6:5:177::32) 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 03:14:15 +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 CO1PEPF000044FB.mail.protection.outlook.com (10.167.241.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.0 via Frontend Transport; Wed, 7 Feb 2024 03:14:14 +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 21:13:52 -0600 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v3 01/13] net/ionic: add stat for completion queue entries processed Date: Tue, 6 Feb 2024 19:13:05 -0800 Message-ID: <20240207031317.32293-2-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240207031317.32293-1-andrew.boyer@amd.com> References: <20240202193238.62669-1-andrew.boyer@amd.com> <20240207031317.32293-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: CO1PEPF000044FB:EE_|BL0PR12MB4993:EE_ X-MS-Office365-Filtering-Correlation-Id: e31a182e-d1fb-4adb-cd7d-08dc278add38 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y9o+SSzirr8Ut4BS3CCOSY/q8wMPUo7n83gpA8bcBY+q5FQ+1EIXxpmrsh8qs4Btv+xUN960JG49mKbsoJfsSgEZ9OLWw+n2pjgy9keuf1Jg78raBrwf1yztzn5toGeKmGQ5CNfXqgdiex8hipnkr2jn7ntrdc/+P/mwNRDfM2lt+EYstoR6u/hWWUM/+cteuByz3uM8ko5uolhg6mLPnH4BIWQVVFkbbGndjTwWBVTV87uJWi//v8zUgfA8RyOYJmb+MORqFDGtG3dm4JGRJ7XIsi3yDP/6OQU83OyTqjd9XFoLDbRZoW5FSiJnQEIpcw2y010B4sWOT9rNoT1O9+ENMgB7Xmhwob/8MWfoFm3apy1BRNusRGKvuETQXXIeo1Xg6r1eig6eFU/M9cZkyhrM1zPOVOQzOPiHuVox60mncKnvMDBiefGWMFtGH7S23eXj7MJQ1CW8lYTT1P8kVDiUzaizGk8yKK4BrHUvGySo5Esjlzj+rbDIeRzKUAyBo9KS6DPdsbQI/XIu0QkbXffp8qaSn/MidpnUgOReULPwBNwTrDFjthXdoWbYAzvaoWw4M6jyTjk/kv0uFTbr0qIpe3mjzAmaX/dK/FKm4M2k5Jl0m9wb7rk7yLEzG6efhZ4c7IeQlQXWbyOAQsewEEiRbUGJWFJ+d2o5cJLDnjD8JGw/OmB0Nbo6XvJ7ekDT9+wJ0t7O4gUrGPkthF2psUUU9mEpphoh/xucg0FNnlHSOpF2dN/Q5+uUcytLrDUeL7fxPxh7jN4FDBgEKO45Bg== 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)(39860400002)(376002)(346002)(136003)(396003)(230922051799003)(82310400011)(186009)(451199024)(1800799012)(64100799003)(40470700004)(36840700001)(46966006)(41300700001)(44832011)(47076005)(70586007)(8676002)(8936002)(70206006)(2906002)(5660300002)(86362001)(4326008)(6916009)(316002)(36756003)(36860700001)(356005)(82740400003)(478600001)(81166007)(6666004)(26005)(2616005)(16526019)(426003)(1076003)(336012)(40460700003)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 03:14:14.8819 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e31a182e-d1fb-4adb-cd7d-08dc278add38 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: CO1PEPF000044FB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4993 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