From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Subbaraya Sundeep <sbhatta@marvell.com>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<sgoutham@marvell.com>, <gakula@marvell.com>,
<bbhushan2@marvell.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Linu Cherian <lcherian@marvell.com>
Subject: Re: [net-next PATCH v5 1/4] octeontx2-af: npa: cn20k: Add NPA Halo support
Date: Thu, 9 Apr 2026 17:09:02 +0200 [thread overview]
Message-ID: <00fc6c1e-638a-4e80-b3c4-14e4dfa3651a@intel.com> (raw)
In-Reply-To: <1775728404-28451-2-git-send-email-sbhatta@marvell.com>
From: Subbaraya Sundeep <sbhatta@marvell.com>
Date: Thu, 9 Apr 2026 15:23:21 +0530
> From: Linu Cherian <lcherian@marvell.com>
>
> CN20K silicon implements unified aura and pool context
> type called Halo for better resource usage. Add support to
> handle Halo context type operations.
>
> Signed-off-by: Linu Cherian <lcherian@marvell.com>
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
[...]
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/struct.h b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/struct.h
> index 763f6cabd7c2..2364bafd329d 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/struct.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/struct.h
> @@ -377,4 +377,85 @@ struct npa_cn20k_pool_s {
>
> static_assert(sizeof(struct npa_cn20k_pool_s) == NIX_MAX_CTX_SIZE);
>
> +struct npa_cn20k_halo_s {
> + u64 stack_base : 64;
It's redundant to add : 64 to a 64-bit field.
Moreover, on 32-bit systems, the compilers sometimes complain on
bitfields > 32 bits.
> + u64 ena : 1;
> + u64 nat_align : 1;
> + u64 reserved_66_67 : 2;
> + u64 stack_caching : 1;
> + u64 reserved_69_71 : 3;
> + u64 aura_drop_ena : 1;
> + u64 reserved_73_79 : 7;
> + u64 aura_drop : 8;
> + u64 buf_offset : 12;
> + u64 reserved_100_103 : 4;
> + u64 buf_size : 12;
> + u64 reserved_116_119 : 4;
> + u64 ref_cnt_prof : 3;
> + u64 reserved_123_127 : 5;
> + u64 stack_max_pages : 32;
> + u64 stack_pages : 32;
> + u64 bp_0 : 7;
> + u64 bp_1 : 7;
> + u64 bp_2 : 7;
> + u64 bp_3 : 7;
> + u64 bp_4 : 7;
> + u64 bp_5 : 7;
> + u64 bp_6 : 7;
> + u64 bp_7 : 7;
> + u64 bp_ena_0 : 1;
> + u64 bp_ena_1 : 1;
> + u64 bp_ena_2 : 1;
> + u64 bp_ena_3 : 1;
> + u64 bp_ena_4 : 1;
> + u64 bp_ena_5 : 1;
> + u64 bp_ena_6 : 1;
> + u64 bp_ena_7 : 1;
> + u64 stack_offset : 4;
> + u64 reserved_260_263 : 4;
> + u64 shift : 6;
> + u64 reserved_270_271 : 2;
> + u64 avg_level : 8;
> + u64 avg_con : 9;
> + u64 fc_ena : 1;
> + u64 fc_stype : 2;
> + u64 fc_hyst_bits : 4;
> + u64 fc_up_crossing : 1;
> + u64 reserved_297_299 : 3;
> + u64 update_time : 16;
> + u64 reserved_316_319 : 4;
> + u64 fc_addr : 64;
> + u64 ptr_start : 64;
> + u64 ptr_end : 64;
> + u64 bpid_0 : 12;
> + u64 reserved_524_535 : 12;
> + u64 err_int : 8;
> + u64 err_int_ena : 8;
> + u64 thresh_int : 1;
> + u64 thresh_int_ena : 1;
> + u64 thresh_up : 1;
> + u64 reserved_555 : 1;
> + u64 thresh_qint_idx : 7;
> + u64 reserved_563 : 1;
> + u64 err_qint_idx : 7;
> + u64 reserved_571_575 : 5;
> + u64 thresh : 36;
> + u64 reserved_612_615 : 4;
> + u64 fc_msh_dst : 11;
> + u64 reserved_627_630 : 4;
> + u64 op_dpc_ena : 1;
> + u64 op_dpc_set : 5;
> + u64 reserved_637_637 : 1;
> + u64 stream_ctx : 1;
> + u64 unified_ctx : 1;
> + u64 reserved_640_703 : 64;
> + u64 reserved_704_767 : 64;
> + u64 reserved_768_831 : 64;
> + u64 reserved_832_895 : 64;
> + u64 reserved_896_959 : 64;
> + u64 reserved_960_1023 : 64;
> +};
> +
> +static_assert(sizeof(struct npa_cn20k_halo_s) == NIX_MAX_CTX_SIZE);
Now the main question:
Is mailbox's Endianness fixed (LE/BE)? Or is it always the same as the
host's ones (I doubt so)?
If not, these need to be __le{8,16,32,64} (or __be if it's Big Endian)
and you need to handle the conversions manually.
Thanks,
Olek
next prev parent reply other threads:[~2026-04-09 15:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 9:53 [net-next PATCH v5 0/4] octeontx2: CN20K NPA Halo context support Subbaraya Sundeep
2026-04-09 9:53 ` [net-next PATCH v5 1/4] octeontx2-af: npa: cn20k: Add NPA Halo support Subbaraya Sundeep
2026-04-09 15:09 ` Alexander Lobakin [this message]
2026-04-09 9:53 ` [net-next PATCH v5 2/4] octeontx2-af: npa: cn20k: Add DPC support Subbaraya Sundeep
2026-04-09 9:53 ` [net-next PATCH v5 3/4] octeontx2-af: npa: cn20k: Add debugfs for Halo Subbaraya Sundeep
2026-04-09 9:53 ` [net-next PATCH v5 4/4] octeontx2-pf: cn20k: Use unified Halo context Subbaraya Sundeep
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=00fc6c1e-638a-4e80-b3c4-14e4dfa3651a@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.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