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 BEACDA0524; Thu, 4 Feb 2021 21:00:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39461240820; Thu, 4 Feb 2021 20:59:38 +0100 (CET) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 6903B24081C for ; Thu, 4 Feb 2021 20:59:36 +0100 (CET) Received: by mail-pl1-f175.google.com with SMTP id u11so2312920plg.13 for ; Thu, 04 Feb 2021 11:59:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CDaqcuWJZC1AOHcxXuEh7cqS4JPeRNCGgf903xG3i2Q=; b=p5+6M5xdxp/y7MW+MIQIyr/a9lpjyQVsbioDJgcoZJ6Nqin1yD8R+oEICh+7kQcSxN mK0BQSTj9fPUYMMJ3i/VoFJU8rDG07Q847kvqIxlHHbkoa0N6DKmAEfTMfJuwDUUBLgI XJMzwMYWLy31rCoAnp2yiUMlgWiyz0O1tmIAywJ/JVWsS//w4xauqPXZmyRYUHCtqKXp FcFtm5VjKSQAL2mASHhqX5ixWIMUopNJTnRQTr4aey+/K6Rj50P/6zV+wfo0eURGjsxu HoQ5zWiWgIPnw9GJNZh1tmflTQvIylgGzGnsj+q/6rqBMUexnUEWMl9WKH9r/9E+TWxb uHAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CDaqcuWJZC1AOHcxXuEh7cqS4JPeRNCGgf903xG3i2Q=; b=c1sjzwgPfBH541G6FRc0xvrl6DfOmSXDTHP7bxR39ga3QtLCbAohkfSjnZUUiUTu5Q srMhrauUg87/2k9+vOcrAZmeIdShSrGA8eEcJYGS4NWjxcngBpQMS9VJhOuueIx14J3k lCmnELcmlY9SoSrCKm8oAhWdHEha/DILGDoKrAWZGH5hWyMtUXAgnY6/YxtC+pLw2DDW L83iM3WjD7rlOSPpunm+j8RfjIRya+FecYXkTeONdLNQ9iw1/0luyvmPBl+sTrHg0s1M BrKzc9Q+GT4OcAJTuOXP2xe/4FbWBTlnwry1r4kipx0/1wES3MKX5Cytr/AqtWI5hXZf CJZg== X-Gm-Message-State: AOAM531+scNLtUGMO82v6wnyXgjprO9ALaLJejYHdAxW1Pm4/1eUP0YW OsC4n4eggZ9ShlOfaRkzjAIL8V32RaleeQ== X-Google-Smtp-Source: ABdhPJzHu27crelNK1uGdCsnNY04I7iwQSuzFWWvicptrIlnVYLDSjoVxvkYnsBNeVR6fzoLZIpnXw== X-Received: by 2002:a17:90a:c798:: with SMTP id gn24mr577315pjb.161.1612468775489; Thu, 04 Feb 2021 11:59:35 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id r14sm7757915pgi.27.2021.02.04.11.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 11:59:35 -0800 (PST) From: Andrew Boyer To: dev@dpdk.org Cc: Alfredo Cardigliano , Andrew Boyer Date: Thu, 4 Feb 2021 11:58:48 -0800 Message-Id: <20210204195853.13411-10-aboyer@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210204195853.13411-1-aboyer@pensando.io> References: <20210204195853.13411-1-aboyer@pensando.io> Subject: [dpdk-dev] [PATCH 09/14] net/ionic: log queue counters when tearing down 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 Sender: "dev" This improves debuggability. To see the logs, use EAL arg: --log-level=pmd.net.ionic,debug While here, stop counting fragments, but start counting mtods. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_lif.h | 2 +- drivers/net/ionic/ionic_rxtx.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/ionic/ionic_lif.h b/drivers/net/ionic/ionic_lif.h index ba1471b6e9..5885aa1546 100644 --- a/drivers/net/ionic/ionic_lif.h +++ b/drivers/net/ionic/ionic_lif.h @@ -34,7 +34,6 @@ struct ionic_tx_stats { uint64_t stop; uint64_t no_csum; uint64_t tso; - uint64_t frags; }; struct ionic_rx_stats { @@ -44,6 +43,7 @@ struct ionic_rx_stats { uint64_t bad_cq_status; uint64_t no_room; uint64_t bad_len; + uint64_t mtods; }; #define IONIC_QCQ_F_INITED BIT(0) diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 0565cea603..9d0df2a098 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -123,9 +123,13 @@ void __rte_cold ionic_dev_tx_queue_release(void *tx_queue) { struct ionic_tx_qcq *txq = tx_queue; + struct ionic_tx_stats *stats = &txq->stats; IONIC_PRINT_CALL(); + IONIC_PRINT(DEBUG, "TX queue %u pkts %ju tso %ju", + txq->qcq.q.index, stats->packets, stats->tso); + ionic_lif_txq_deinit(txq); ionic_qcq_free(&txq->qcq); @@ -410,7 +414,6 @@ ionic_tx_tso(struct ionic_tx_qcq *txq, struct rte_mbuf *txm, offset = 0; data_iova = rte_mbuf_data_iova(txm_seg); left = txm_seg->data_len; - stats->frags++; while (left > 0) { next_addr = rte_cpu_to_le_64(data_iova + offset); @@ -508,7 +511,6 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm, while (txm_seg != NULL) { elem->len = txm_seg->data_len; elem->addr = rte_cpu_to_le_64(rte_mbuf_data_iova(txm_seg)); - stats->frags++; elem++; txm_seg = txm_seg->next; } @@ -657,12 +659,18 @@ void __rte_cold ionic_dev_rx_queue_release(void *rx_queue) { struct ionic_rx_qcq *rxq = rx_queue; + struct ionic_rx_stats *stats; if (!rxq) return; IONIC_PRINT_CALL(); + stats = &rxq->stats; + + IONIC_PRINT(DEBUG, "RX queue %u pkts %ju mtod %ju", + rxq->qcq.q.index, stats->packets, stats->mtods); + ionic_rx_empty(rxq); ionic_lif_rxq_deinit(rxq); @@ -887,6 +895,7 @@ ionic_rx_clean(struct ionic_rx_qcq *rxq, pkt_type = RTE_PTYPE_L2_ETHER_ARP; else pkt_type = RTE_PTYPE_UNKNOWN; + stats->mtods++; break; } } -- 2.17.1