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 C7D1D431EF; Tue, 24 Oct 2023 12:22:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E70FB40ED8; Tue, 24 Oct 2023 12:21:55 +0200 (CEST) Received: from smtp-fw-6001.amazon.com (smtp-fw-6001.amazon.com [52.95.48.154]) by mails.dpdk.org (Postfix) with ESMTP id 822FA4111C for ; Tue, 24 Oct 2023 12:21:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1698142915; x=1729678915; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=v/bYiicxGaz5mvPhBhhGqHEEnt8TVk7qf1AB+y7Srac=; b=hoW5sy4/c7OIiwW5sMFdtaoMVGRPbuBoFng7Lm72AfEc3hMFbJeXODUx 6+Xku25zFmsDjKGKbhpQAhgsI+0GiqI+mVJSb404wC6Q59FKrqXVr6Zx8 yi8Mu5DCp7U42ninl941mH3ju+LhbJE3B+AD6fshYwrszu1D4M04o1QQL c=; X-IronPort-AV: E=Sophos;i="6.03,247,1694736000"; d="scan'208";a="366000737" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-pdx-2c-m6i4x-d2040ec1.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-6001.iad6.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2023 10:21:54 +0000 Received: from smtpout.prod.us-east-1.prod.farcaster.email.amazon.dev (pdx2-ws-svc-p26-lb5-vlan2.pdx.amazon.com [10.39.38.66]) by email-inbound-relay-pdx-2c-m6i4x-d2040ec1.us-west-2.amazon.com (Postfix) with ESMTPS id 25EDF40D9B; Tue, 24 Oct 2023 10:21:53 +0000 (UTC) Received: from EX19MTAEUA002.ant.amazon.com [10.0.10.100:26284] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.24.96:2525] with esmtp (Farcaster) id 81a75e8d-b47a-45fd-b71f-798273505ee5; Tue, 24 Oct 2023 10:21:51 +0000 (UTC) X-Farcaster-Flow-ID: 81a75e8d-b47a-45fd-b71f-798273505ee5 Received: from EX19D017EUA001.ant.amazon.com (10.252.50.71) by EX19MTAEUA002.ant.amazon.com (10.252.50.126) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Tue, 24 Oct 2023 10:21:51 +0000 Received: from EX19MTAUWB001.ant.amazon.com (10.250.64.248) by EX19D017EUA001.ant.amazon.com (10.252.50.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Tue, 24 Oct 2023 10:21:50 +0000 Received: from HFA15-CG15235BS.amazon.com (10.85.143.172) by mail-relay.amazon.com (10.250.64.254) with Microsoft SMTP Server id 15.2.1118.39 via Frontend Transport; Tue, 24 Oct 2023 10:21:48 +0000 From: To: CC: , Shai Brandes , Michal Krawczyk , Evgeny Schemeilin , Igor Chauskin , Ron Beider Subject: [PATCH 3/5] net/ena: report Rx overrun errors in xstats Date: Tue, 24 Oct 2023 13:21:26 +0300 Message-ID: <20231024102128.16832-4-shaibran@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231024102128.16832-1-shaibran@amazon.com> References: <20231024102128.16832-1-shaibran@amazon.com> MIME-Version: 1.0 Content-Type: text/plain 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: Shai Brandes RX overrun error occur when a packet arrives but there are not enough free buffers in the RX ring to receive it. The driver publishes the extended statistics with the RX buffer overrun errors as reported by the device. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- doc/guides/rel_notes/release_23_11.rst | 1 + drivers/net/ena/ena_ethdev.c | 4 ++++ drivers/net/ena/ena_ethdev.h | 1 + 3 files changed, 6 insertions(+) diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst index eefbcc08fe..f622d93384 100644 --- a/doc/guides/rel_notes/release_23_11.rst +++ b/doc/guides/rel_notes/release_23_11.rst @@ -148,6 +148,7 @@ New Features * Upgraded ENA HAL to latest version. * Added support for connection tracking allowance utilization metric. + * Added support for reporting rx overrun errors in xstats. * **Updated Solarflare net driver.** diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index daec7f7d16..b3ebda6049 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -90,6 +90,7 @@ static const struct ena_stats ena_stats_global_strings[] = { ENA_STAT_GLOBAL_ENTRY(dev_start), ENA_STAT_GLOBAL_ENTRY(dev_stop), ENA_STAT_GLOBAL_ENTRY(tx_drops), + ENA_STAT_GLOBAL_ENTRY(rx_overruns), }; /* @@ -3894,15 +3895,18 @@ static void ena_keep_alive(void *adapter_data, struct ena_admin_aenq_keep_alive_desc *desc; uint64_t rx_drops; uint64_t tx_drops; + uint64_t rx_overruns; adapter->timestamp_wd = rte_get_timer_cycles(); desc = (struct ena_admin_aenq_keep_alive_desc *)aenq_e; rx_drops = ((uint64_t)desc->rx_drops_high << 32) | desc->rx_drops_low; tx_drops = ((uint64_t)desc->tx_drops_high << 32) | desc->tx_drops_low; + rx_overruns = ((uint64_t)desc->rx_overruns_high << 32) | desc->rx_overruns_low; adapter->drv_stats->rx_drops = rx_drops; adapter->dev_stats.tx_drops = tx_drops; + adapter->dev_stats.rx_overruns = rx_overruns; } /** diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h index 9268d44dde..3f29764ca6 100644 --- a/drivers/net/ena/ena_ethdev.h +++ b/drivers/net/ena/ena_ethdev.h @@ -219,6 +219,7 @@ struct ena_stats_dev { * As a workaround it is being published as an extended statistic. */ u64 tx_drops; + u64 rx_overruns; }; struct ena_stats_metrics { -- 2.17.1