From: Stephen Hemminger <stephen@networkplumber.org>
To: Megha Ajmera <megha.ajmera@intel.com>
Cc: dev@dpdk.org, john.mcnamara@intel.com, jasvinder.singh@intel.com,
cristian.dumitrescu@intel.com, ferruh.yigit@intel.com,
sham.singh.thakur@intel.com
Subject: Re: [PATCH v1] sched: enable/disable TC OV at runtime
Date: Thu, 10 Mar 2022 12:23:25 -0800 [thread overview]
Message-ID: <20220310122325.2e928c7d@hermes.local> (raw)
In-Reply-To: <20220310195426.4121953-1-megha.ajmera@intel.com>
On Thu, 10 Mar 2022 19:54:26 +0000
Megha Ajmera <megha.ajmera@intel.com> wrote:
> diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
> index ec74bee939..1d05089d00 100644
> --- a/lib/sched/rte_sched.c
> +++ b/lib/sched/rte_sched.c
> @@ -155,6 +155,7 @@ struct rte_sched_subport {
> uint64_t tc_credits[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
>
> /* TC oversubscription */
> + uint8_t is_tc_ov_enabled;
> uint64_t tc_ov_wm;
> uint64_t tc_ov_wm_min;
> uint64_t tc_ov_wm_max;
Putting the field there creates a hole in the structure.
Put it after tc_ov and fill an existing hole.
This is pahole of current code, looks like this struct could
use some work to be better packed and aligned.
struct rte_sched_port {
uint32_t n_subports_per_port; /* 0 4 */
uint32_t n_pipes_per_subport; /* 4 4 */
uint32_t n_pipes_per_subport_log2; /* 8 4 */
uint16_t pipe_queue[13]; /* 12 26 */
uint8_t pipe_tc[16]; /* 38 16 */
uint8_t tc_queue[16]; /* 54 16 */
/* XXX 2 bytes hole, try to pack */
/* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */
uint32_t n_subport_profiles; /* 72 4 */
uint32_t n_max_subport_profiles; /* 76 4 */
uint64_t rate; /* 80 8 */
uint32_t mtu; /* 88 4 */
uint32_t frame_overhead; /* 92 4 */
int socket; /* 96 4 */
/* XXX 4 bytes hole, try to pack */
uint64_t time_cpu_cycles; /* 104 8 */
uint64_t time_cpu_bytes; /* 112 8 */
uint64_t time; /* 120 8 */
/* --- cacheline 2 boundary (128 bytes) --- */
struct rte_reciprocal inv_cycles_per_byte; /* 128 8 */
/* XXX last struct has 2 bytes of padding */
uint64_t cycles_per_byte; /* 136 8 */
struct rte_mbuf * * pkts_out; /* 144 8 */
uint32_t n_pkts_out; /* 152 4 */
uint32_t subport_id; /* 156 4 */
struct rte_sched_subport_profile * subport_profiles; /* 160 8 */
/* XXX 24 bytes hole, try to pack */
/* --- cacheline 3 boundary (192 bytes) --- */
struct rte_sched_subport * subports[] __attribute__((__aligned__(64))); /* 192 0 */
/* size: 192, cachelines: 3, members: 22 */
/* sum members: 162, holes: 3, sum holes: 30 */
/* paddings: 1, sum paddings: 2 */
/* forced alignments: 1, forced holes: 1, sum forced holes: 24 */
} __attribute__((__aligned__(64)));
next prev parent reply other threads:[~2022-03-10 20:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 19:54 Megha Ajmera
2022-03-10 20:23 ` Stephen Hemminger [this message]
2022-03-11 6:24 ` Ajmera, Megha
2022-03-11 17:13 ` Stephen Hemminger
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=20220310122325.2e928c7d@hermes.local \
--to=stephen@networkplumber.org \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jasvinder.singh@intel.com \
--cc=john.mcnamara@intel.com \
--cc=megha.ajmera@intel.com \
--cc=sham.singh.thakur@intel.com \
/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).