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 2E95F431FC; Wed, 25 Oct 2023 14:34:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13A7F402DC; Wed, 25 Oct 2023 14:34:56 +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 1CB4E402D4 for ; Wed, 25 Oct 2023 14:34: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=1698237294; x=1729773294; h=from:to:cc:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:subject; bh=v6NNQV9DqI5XDUDQMEWvdJoI/3igrSSWhkt4YMg4i9I=; b=RjFc4ct+DM2neuE8aPShbb8awmXiZqtC8BZBZvLMWlji/TZvsBHAlO/F 0zzxbU5cdfaxgu6bnl87CuzvLbFaG7wFgd5zU1NcIUw5xrR9VB151o6Up 7rh+akVqXuAwvmPUJ3k2u8TqiP00Zsa7CrO8byF298y/IL6siGsDpBDeP g=; X-IronPort-AV: E=Sophos;i="6.03,250,1694736000"; d="scan'208";a="358887528" 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-pdx-2c-m6i4x-5eae960a.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 12:34:51 +0000 Received: from smtpout.prod.us-west-2.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-5eae960a.us-west-2.amazon.com (Postfix) with ESMTPS id 38DB340D5E; Wed, 25 Oct 2023 12:34:50 +0000 (UTC) Received: from EX19MTAEUC002.ant.amazon.com [10.0.43.254:16686] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.0.200:2525] with esmtp (Farcaster) id b08ff16a-99ab-4311-b494-88b4b936d770; Wed, 25 Oct 2023 12:34:49 +0000 (UTC) X-Farcaster-Flow-ID: b08ff16a-99ab-4311-b494-88b4b936d770 Received: from EX19D023EUA003.ant.amazon.com (10.252.50.101) by EX19MTAEUC002.ant.amazon.com (10.252.51.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Wed, 25 Oct 2023 12:34:46 +0000 Received: from EX19D007EUA002.ant.amazon.com (10.252.50.68) by EX19D023EUA003.ant.amazon.com (10.252.50.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Wed, 25 Oct 2023 12:34:45 +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; Wed, 25 Oct 2023 12:34:45 +0000 From: "Brandes, Shai" To: Stephen Hemminger CC: "ferruh.yigit@amd.com" , "dev@dpdk.org" , Michal Krawczyk , "Schmeilin, Evgeny" , "Chauskin, Igor" , "Beider, Ron" , "Atrash, Wajeeh" , "Brandes, Shai" , "Bernstein, Amit" Thread-Index: AQHaBmPvGkqx5OrQoEiJTDtRfbIP/bBZEC+AgAAE0nCAAVydMA== Date: Wed, 25 Oct 2023 12:34:45 +0000 Message-ID: <07b676edca5a46f9ac17eac10cd5c6f2@amazon.com> References: <20231024102128.16832-1-shaibran@amazon.com> <20231024102128.16832-5-shaibran@amazon.com> <20231024082639.1dbb7638@hermes.local> <3e4c84831b074d92897576fab8894865@amazon.com> In-Reply-To: <3e4c84831b074d92897576fab8894865@amazon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.106.83.33] 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. Hi, I checked it with pahole and both ways provide same structure size and = overall same padding size (14B): uint64_t metrics_stats[6] __attribute__((__aligne= d__(64))); /* 181952 48 */ uint16_t metrics_num; /* 182000 2 */ /* XXX 14 bytes hole, try to pack */ /* --- cacheline 2844 boundary (182016 bytes) --- */ struct ena_stats_srd srd_stats __attribute__((__aligned__(64)= )); /* 182016 40 */ /* size: 182080, cachelines: 2845, members: 40 */ /* sum members: 181910, holes: 9, sum holes: 146 */ Vs: uint16_t metrics_num __attribute__((__aligned__(6= 4))); /* 181952 2 */ /* XXX 6 bytes hole, try to pack */ uint64_t metrics_stats[6]; /* 181960 48 */ /* XXX 8 bytes hole, try to pack */ /* --- cacheline 2844 boundary (182016 bytes) --- */ struct ena_stats_srd srd_stats __attribute__((__aligned__(64)= )); /* 182016 40 */ /* size: 182080, cachelines: 2845, members: 40 */ /* sum members: 181910, holes: 10, sum holes: 146 */