DPDK patches and discussions
 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>,
	"Brandes, Shai" <shaibran@amazon.com>,
	"Atrash, Wajeeh" <atrwajee@amazon.com>
Subject: RE: [PATCH 4/5] net/ena: add support for ena-express metrics
Date: Tue, 24 Oct 2023 15:55:21 +0000	[thread overview]
Message-ID: <3e4c84831b074d92897576fab8894865@amazon.com> (raw)
In-Reply-To: <20231024082639.1dbb7638@hermes.local>


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.
Thank you for the review! My reasoning was that the metrics_num should reside in the same cache line as the metrics_stats (metrics_stats can contain up to 6 metrics so its max length is 48B).
In addition, the  struct ena_stats_srd was added in a later patch, so I will run pahole and verify which order of these three fields gives the best results.
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 definitely get modified later.

  reply	other threads:[~2023-10-24 15:55 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 [this message]
2023-10-25 12:34       ` Brandes, Shai
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=3e4c84831b074d92897576fab8894865@amazon.com \
    --to=shaibran@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).