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 3B04E43C5B; Wed, 6 Mar 2024 13:25:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4268642E17; Wed, 6 Mar 2024 13:25:07 +0100 (CET) Received: from smtp-fw-9105.amazon.com (smtp-fw-9105.amazon.com [207.171.188.204]) by mails.dpdk.org (Postfix) with ESMTP id 6431442DFC for ; Wed, 6 Mar 2024 13:25:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1709727905; x=1741263905; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=4dZAtYkiE6lhOaDbHE5ce8hRE0FEhRd8KKXOL80impg=; b=KPjXZKKby5wzOs6MbGknBU0XedMrjyv5ghLvEpsTKddNBLZgL1nYY0A3 76YE7sBja5pY++W4FSsqecpfwbGXIMnSUPwDDG3pGGXz8WLSkdQW8Dqc7 /xSg6rZ7k7oYJn4WcVMnXkY1QYY62I0VAwrjGD+IuEYajQ0+US24MLJUH k=; X-IronPort-AV: E=Sophos;i="6.06,208,1705363200"; d="scan'208";a="709678920" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.210]) by smtp-border-fw-9105.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2024 12:24:58 +0000 Received: from EX19MTAEUB001.ant.amazon.com [10.0.10.100:30623] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.11.111:2525] with esmtp (Farcaster) id c189c232-240d-47f6-bfaf-63e38b92f549; Wed, 6 Mar 2024 12:24:56 +0000 (UTC) X-Farcaster-Flow-ID: c189c232-240d-47f6-bfaf-63e38b92f549 Received: from EX19D007EUA001.ant.amazon.com (10.252.50.133) by EX19MTAEUB001.ant.amazon.com (10.252.51.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 6 Mar 2024 12:24:56 +0000 Received: from EX19MTAUWA001.ant.amazon.com (10.250.64.204) by EX19D007EUA001.ant.amazon.com (10.252.50.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 6 Mar 2024 12:24:55 +0000 Received: from HFA15-CG15235BS.amazon.com (10.1.213.21) by mail-relay.amazon.com (10.250.64.204) with Microsoft SMTP Server id 15.2.1258.28 via Frontend Transport; Wed, 6 Mar 2024 12:24:53 +0000 From: To: CC: , Shai Brandes Subject: [PATCH v3 03/33] net/ena: update imissed stat with Rx overruns Date: Wed, 6 Mar 2024 14:24:15 +0200 Message-ID: <20240306122445.4350-4-shaibran@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240306122445.4350-1-shaibran@amazon.com> References: <20240306122445.4350-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 879bb4944c..fb66d67d32 100644 --- a/doc/guides/rel_notes/release_24_03.rst +++ b/doc/guides/rel_notes/release_24_03.rst @@ -101,6 +101,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