All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Brandes, Shai" <shaibran@amazon.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "ferruh.yigit@amd.com" <ferruh.yigit@amd.com>,
	"dev@dpdk.org" <dev@dpdk.org>, Michal Krawczyk <mk@semihalf.com>,
	"Schmeilin, Evgeny" <evgenys@amazon.com>,
	"Chauskin, Igor" <igorch@amazon.com>,
	"Beider, Ron" <rbeider@amazon.com>,
	"Atrash, Wajeeh" <atrwajee@amazon.com>,
	"Brandes, Shai" <shaibran@amazon.com>,
	"Bernstein, Amit" <amitbern@amazon.com>
Subject: RE: [PATCH 4/5] net/ena: add support for ena-express metrics
Date: Wed, 25 Oct 2023 12:34:45 +0000	[thread overview]
Message-ID: <07b676edca5a46f9ac17eac10cd5c6f2@amazon.com> (raw)
In-Reply-To: <3e4c84831b074d92897576fab8894865@amazon.com>

On Tue, 24 Oct 2023 13:21:27 +0300
<shaibran@amazon.com> 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_aligned;
>>       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__((__aligned__(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__(64))); /* 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 */

  reply	other threads:[~2023-10-25 12:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 10:21 [PATCH 0/5] net/ena: v2.8.0 driver release shaibran
2023-10-24 10:21 ` [PATCH 1/5] net/ena: hal upgrade shaibran
2023-10-24 10:21 ` [PATCH 2/5] net/ena: add support for connection tracking metric shaibran
2023-10-24 10:21 ` [PATCH 3/5] net/ena: report Rx overrun errors in xstats shaibran
2023-10-24 10:21 ` [PATCH 4/5] net/ena: add support for ena-express metrics shaibran
2023-10-24 15:26   ` Stephen Hemminger
2023-10-24 15:55     ` Brandes, Shai
2023-10-25 12:34       ` Brandes, Shai [this message]
2023-10-24 10:21 ` [PATCH 5/5] net/ena: update ena version to 2.8.0 shaibran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07b676edca5a46f9ac17eac10cd5c6f2@amazon.com \
    --to=shaibran@amazon.com \
    --cc=amitbern@amazon.com \
    --cc=atrwajee@amazon.com \
    --cc=dev@dpdk.org \
    --cc=evgenys@amazon.com \
    --cc=ferruh.yigit@amd.com \
    --cc=igorch@amazon.com \
    --cc=mk@semihalf.com \
    --cc=rbeider@amazon.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.