From: Stephen Hemminger <stephen@networkplumber.org>
To: Nawal Kishor <nkishor@marvell.com>
Cc: <dev@dpdk.org>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>,
Harman Kalra <hkalra@marvell.com>, <jerinj@marvell.com>,
<asekhar@marvell.com>
Subject: Re: [PATCH v4 1/2] common/cnxk: add support for halos
Date: Thu, 19 Feb 2026 09:19:38 -0800 [thread overview]
Message-ID: <20260219091938.3593270c@phoenix.local> (raw)
In-Reply-To: <20260217103932.679806-2-nkishor@marvell.com>
On Tue, 17 Feb 2026 16:09:21 +0530
Nawal Kishor <nkishor@marvell.com> wrote:
> +int
> +roc_idev_npa_halo_ena_get(void)
> +{
> + struct idev_cfg *idev;
> + int halo_ena;
> +
> + idev = idev_get_cfg();
> + halo_ena = 0;
> + if (idev != NULL)
> + halo_ena = __atomic_load_n(&idev->halo_ena, __ATOMIC_ACQUIRE);
Do not use __atomic_load_n, DPDK has migrated to rte_atomic_load_explicit
> diff --git a/drivers/common/cnxk/roc_idev_priv.h b/drivers/common/cnxk/roc_idev_priv.h
> index 98b6286bfe..dde555535b 100644
> --- a/drivers/common/cnxk/roc_idev_priv.h
> +++ b/drivers/common/cnxk/roc_idev_priv.h
> @@ -30,6 +30,7 @@ struct idev_cfg {
> struct npa_lf *npa;
> uint16_t npa_refcnt;
> uint32_t max_pools;
> + int halo_ena;
Using int for a flag value is legacy C code style.
Use bool to save space and have some type safety.
> + if (roc_feature_npa_has_halo() && roc_nix->sqb_halo_ena) {
> + struct npa_cn20k_halo_s halo;
> +
> + memset(&halo, 0, sizeof(struct npa_cn20k_halo_s));
> + halo.nat_align = 1;
> + halo.fc_ena = 1;
> + halo.fc_stype = 0x3; /* STSTP */
> + halo.fc_addr = (uint64_t)sq->fc;
> + halo.fc_hyst_bits = 0; /* Store count on all updates */
> + halo.unified_ctx = 1;
Using structure initialization is preferred over memset and individual values.
next prev parent reply other threads:[~2026-02-19 17:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 6:51 [PATCH 0/2] cnxk: Add HALO support for CN20K mempool Nawal Kishor
2025-12-04 6:51 ` [PATCH 1/2] common/cnxk: add support for halos Nawal Kishor
2025-12-05 5:51 ` [PATCH v2 0/2] cnxk: add HALO support for CN20K mempool Nawal Kishor
2025-12-05 5:51 ` [PATCH v2 1/2] common/cnxk: add support for halos Nawal Kishor
2025-12-05 5:51 ` [PATCH v2 2/2] mempool/cnxk: add halo support in mempool Nawal Kishor
2026-02-17 5:34 ` [PATCH v3 0/2] Add HALO support for CN20K mempool Nawal Kishor
2026-02-17 5:34 ` [PATCH v3 1/2] common/cnxk: add support for halos Nawal Kishor
2026-02-17 5:34 ` [PATCH v3 2/2] mempool/cnxk: add halo support in mempool Nawal Kishor
2026-02-17 8:43 ` [PATCH v3 0/2] Add HALO support for CN20K mempool Jerin Jacob
2026-02-17 10:39 ` [PATCH v4 " Nawal Kishor
2026-02-17 10:39 ` [PATCH v4 1/2] common/cnxk: add support for halos Nawal Kishor
2026-02-19 17:19 ` Stephen Hemminger [this message]
2026-02-17 10:39 ` [PATCH v4 2/2] mempool/cnxk: add halo support in mempool Nawal Kishor
2026-02-19 17:33 ` Stephen Hemminger
2026-01-14 6:04 ` [PATCH v2 0/2] cnxk: add HALO support for CN20K mempool Stephen Hemminger
2026-01-14 7:52 ` Morten Brørup
2026-01-19 5:21 ` [EXTERNAL] " Nawal Kishor
2025-12-04 6:51 ` [PATCH 2/2] mempool/cnxk: add halo support in mempool Nawal Kishor
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=20260219091938.3593270c@phoenix.local \
--to=stephen@networkplumber.org \
--cc=asekhar@marvell.com \
--cc=dev@dpdk.org \
--cc=hkalra@marvell.com \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=nkishor@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@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