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 8C8DD431DD; Tue, 24 Oct 2023 17:55:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FB52402C5; Tue, 24 Oct 2023 17:55:28 +0200 (CEST) Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) by mails.dpdk.org (Postfix) with ESMTP id CDD334021D for ; Tue, 24 Oct 2023 17:55:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1698162927; x=1729698927; h=from:to:cc:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:subject; bh=2bP5+N6Bz2JcRL4ja7d/nrVv4cfgqb4GOUB5vnEVHvU=; b=cIqBGjtPUyQk38DkIHhsqxx0sxn1mQK9yJuyV0SvB5vDszWxUKqwnhnK v7TMrSXeFnvuu6yC3+Bi6s+HM/tYhHVQJmDi4Q02JzY9bxdf9LpLQwVkW IBwSpvLGBmmjdm/QIPCNV0pqoCgDaH3FRePsvSNi5FNennIFTGeK1MRz/ E=; X-IronPort-AV: E=Sophos;i="6.03,248,1694736000"; d="scan'208";a="358663769" Subject: RE: [PATCH 4/5] net/ena: add support for ena-express metrics Thread-Topic: [PATCH 4/5] net/ena: add support for ena-express metrics Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1e-m6i4x-3554bfcf.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2023 15:55:25 +0000 Received: from smtpout.prod.us-east-1.prod.farcaster.email.amazon.dev (iad7-ws-svc-p70-lb3-vlan2.iad.amazon.com [10.32.235.34]) by email-inbound-relay-iad-1e-m6i4x-3554bfcf.us-east-1.amazon.com (Postfix) with ESMTPS id E077A80D77; Tue, 24 Oct 2023 15:55:23 +0000 (UTC) Received: from EX19MTAEUC002.ant.amazon.com [10.0.17.79:14064] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.35.121:2525] with esmtp (Farcaster) id 65107fbd-a18e-488b-9e56-c779118e32f8; Tue, 24 Oct 2023 15:55:22 +0000 (UTC) X-Farcaster-Flow-ID: 65107fbd-a18e-488b-9e56-c779118e32f8 Received: from EX19D017EUA001.ant.amazon.com (10.252.50.71) by EX19MTAEUC002.ant.amazon.com (10.252.51.245) 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 15:55:22 +0000 Received: from EX19D007EUA002.ant.amazon.com (10.252.50.68) 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 15:55:21 +0000 Received: from EX19D007EUA002.ant.amazon.com ([fe80::1295:20d9:141e:47cc]) by EX19D007EUA002.ant.amazon.com ([fe80::1295:20d9:141e:47cc%3]) with mapi id 15.02.1118.039; Tue, 24 Oct 2023 15:55:21 +0000 From: "Brandes, Shai" To: Stephen Hemminger CC: "ferruh.yigit@amd.com" , "dev@dpdk.org" , Michal Krawczyk , "Schmeilin, Evgeny" , "Chauskin, Igor" , "Beider, Ron" , "Brandes, Shai" , "Atrash, Wajeeh" Thread-Index: AQHaBmPvGkqx5OrQoEiJTDtRfbIP/bBZEC+AgAAE0nA= Date: Tue, 24 Oct 2023 15:55:21 +0000 Message-ID: <3e4c84831b074d92897576fab8894865@amazon.com> References: <20231024102128.16832-1-shaibran@amazon.com> <20231024102128.16832-5-shaibran@amazon.com> <20231024082639.1dbb7638@hermes.local> In-Reply-To: <20231024082639.1dbb7638@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.85.143.172] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 On Tue, 24 Oct 2023 13:21:27 +0300 wrote: >> struct ena_offloads { >> uint32_t tx_offloads; >> uint32_t rx_offloads; >> @@ -329,6 +346,7 @@ struct ena_adapter { >> */ >> uint64_t metrics_stats[ENA_MAX_CUSTOMER_METRICS] __rte_cache_align= ed; >> uint16_t metrics_num; >> + struct ena_stats_srd srd_stats __rte_cache_aligned; >> }; > If metrics_num was before the metrics_stats[] you would save some space. Thank you for the review! My reasoning was that the metrics_num should resi= de in the same cache line as the metrics_stats (metrics_stats can contain u= p to 6 metrics so its max length is 48B). In addition, the struct ena_stats_srd was added in a later patch, so I wil= l run pahole and verify which order of these three fields gives the best re= sults. BTW, we are starting a cache optimization task now that should address all = these issues, this is indeed one of our main structures, so it will definit= ely get modified later.