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 66C1143C94; Tue, 12 Mar 2024 19:07:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AECE542DF7; Tue, 12 Mar 2024 19:07:36 +0100 (CET) Received: from smtp-fw-80007.amazon.com (smtp-fw-80007.amazon.com [99.78.197.218]) by mails.dpdk.org (Postfix) with ESMTP id 5439A42DE4 for ; Tue, 12 Mar 2024 19:07:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1710266855; x=1741802855; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=h9XSl5qGMjQmMxht+VT2/cVX6CehdutCO4yagmFilLs=; b=nDdQlZ8Xe6TlTARRX0mR4VyOjyOcY1HKIUpVQueEZrsSGe+jdptaTof3 lNqvIqLrXVFM7Cm0WedsG7nPiTWl0l+KjZ/FfBF4TAm7bLaKn2zTBJz4v 5tLYBns+LlrDRW7SMVQijHoY+05MJ5lajQYNewaDUKa03ZlqV5T/wTUdZ o=; X-IronPort-AV: E=Sophos;i="6.07,119,1708387200"; d="scan'208";a="280481482" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO smtpout.prod.us-east-1.prod.farcaster.email.amazon.dev) ([10.25.36.210]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2024 18:07:34 +0000 Received: from EX19MTAEUA002.ant.amazon.com [10.0.43.254:36784] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.24.76:2525] with esmtp (Farcaster) id c57af74d-7073-4232-a362-db3858f4cafb; Tue, 12 Mar 2024 18:07:32 +0000 (UTC) X-Farcaster-Flow-ID: c57af74d-7073-4232-a362-db3858f4cafb Received: from EX19D007EUA002.ant.amazon.com (10.252.50.68) by EX19MTAEUA002.ant.amazon.com (10.252.50.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Tue, 12 Mar 2024 18:07:32 +0000 Received: from EX19MTAUWA001.ant.amazon.com (10.250.64.204) by EX19D007EUA002.ant.amazon.com (10.252.50.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Tue, 12 Mar 2024 18:07:31 +0000 Received: from HFA15-CG15235BS.amazon.com (10.85.143.174) by mail-relay.amazon.com (10.250.64.204) with Microsoft SMTP Server id 15.2.1258.28 via Frontend Transport; Tue, 12 Mar 2024 18:07:30 +0000 From: To: CC: , Shai Brandes Subject: [PATCH v4 03/31] net/ena: update imissed stat with Rx overruns Date: Tue, 12 Mar 2024 20:06:48 +0200 Message-ID: <20240312180716.8515-4-shaibran@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240312180716.8515-1-shaibran@amazon.com> References: <20240312180716.8515-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 Depending on its acceleration support, the device updates a different statistic when an ingress packet is dropped because no buffers are available to hold it. - In AWS instance types from later generations 'rx_overruns' is updated. - Otherwise, in legacy instance types, 'rx_dropped_cnt' is updated. That is, there is no need to report rx_overruns separately as an xstat and the driver can simply sum up the two self-contained counters as the 'imissed' statistic. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- doc/guides/rel_notes/release_24_03.rst | 4 ++++ drivers/net/ena/ena_ethdev.c | 8 +++++--- drivers/net/ena/ena_ethdev.h | 1 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst index 932688ca4d..0fe8bc9739 100644 --- a/doc/guides/rel_notes/release_24_03.rst +++ b/doc/guides/rel_notes/release_24_03.rst @@ -103,6 +103,10 @@ New Features * ``rte_flow_template_table_resize_complete()``. Complete table resize. +* **Updated Amazon ena (Elastic Network Adapter) net driver.** + + * Removed the reporting of `rx_overruns` errors from xstats and instead updated `imissed` stat with its value. + * **Updated Atomic Rules' Arkville driver.** * Added support for Atomic Rules' TK242 packet-capture family of devices diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index b1e7de0541..d3f395a832 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -93,7 +93,6 @@ 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), }; /* @@ -4014,9 +4013,12 @@ static void ena_keep_alive(void *adapter_data, 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; + /* + * Depending on its acceleration support, the device updates a different statistic when + * Rx packet is dropped because there are no available buffers to accommodate it. + */ + adapter->drv_stats->rx_drops = rx_drops + rx_overruns; 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 4988fbffb5..20b8307836 100644 --- a/drivers/net/ena/ena_ethdev.h +++ b/drivers/net/ena/ena_ethdev.h @@ -219,7 +219,6 @@ 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