From: Bruce Richardson <bruce.richardson@intel.com>
To: Dhanya Pillai <dhanya.r.pillai@intel.com>
Cc: Anatoly Burakov <anatoly.burakov@intel.com>, <dev@dpdk.org>,
"Lukasz Krakowiak" <lukaszx.krakowiak@intel.com>
Subject: Re: [PATCH v3 04/10] net/ice/base: set speculative execution barrier
Date: Wed, 28 May 2025 15:59:06 +0100 [thread overview]
Message-ID: <aDckum8YiGEObYUL@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <aDcKjfSrOShfJE1b@bricha3-mobl1.ger.corp.intel.com>
On Wed, May 28, 2025 at 02:07:25PM +0100, Bruce Richardson wrote:
> On Tue, May 27, 2025 at 01:17:23PM +0000, Dhanya Pillai wrote:
> > From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
> >
> > Fix issues related to SPECULATIVE_EXECUTION_DATA_LEAK.
> > This changes set speculative execution barrier to functions:
> >
> > * ice_sched_add_vsi_child_nodes,
> > * ice_sched_add_vsi_support_nodes,
> > * ice_sched_move_vsi_to_agg,
> > * ice_prof_has_mask_idx,
> > * ice_alloc_prof_mask.
> >
> > Also, Added memfence definitions.
> >
> > Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
> > Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
> > ---
> > drivers/net/intel/ice/base/ice_flex_pipe.c | 2 ++
> > drivers/net/intel/ice/base/ice_osdep.h | 6 ++++++
> > drivers/net/intel/ice/base/ice_sched.c | 3 +++
> > 3 files changed, 11 insertions(+)
> >
> > diff --git a/drivers/net/intel/ice/base/ice_flex_pipe.c b/drivers/net/intel/ice/base/ice_flex_pipe.c
> > index 6dd5588f85..dc8c92e203 100644
> > --- a/drivers/net/intel/ice/base/ice_flex_pipe.c
> > +++ b/drivers/net/intel/ice/base/ice_flex_pipe.c
> > @@ -1280,6 +1280,7 @@ ice_prof_has_mask_idx(struct ice_hw *hw, enum ice_block blk, u8 prof, u16 idx,
> > if (hw->blk[blk].masks.masks[i].in_use &&
> > hw->blk[blk].masks.masks[i].idx == idx) {
> > found = true;
> > + ice_memfence_read();
> > if (hw->blk[blk].masks.masks[i].mask == mask)
> > match = true;
> > break;
> > @@ -1648,6 +1649,7 @@ ice_alloc_prof_mask(struct ice_hw *hw, enum ice_block blk, u16 idx, u16 mask,
> > /* if mask is in use and it exactly duplicates the
> > * desired mask and index, then in can be reused
> > */
> > + ice_memfence_read();
> > if (hw->blk[blk].masks.masks[i].mask == mask &&
> > hw->blk[blk].masks.masks[i].idx == idx) {
> > found_copy = true;
> > diff --git a/drivers/net/intel/ice/base/ice_osdep.h b/drivers/net/intel/ice/base/ice_osdep.h
> > index ad6cde9896..7588ad3dbc 100644
> > --- a/drivers/net/intel/ice/base/ice_osdep.h
> > +++ b/drivers/net/intel/ice/base/ice_osdep.h
> > @@ -203,6 +203,12 @@ struct __rte_packed_begin ice_virt_mem {
> > #define ice_memset(a, b, c, d) memset((a), (b), (c))
> > #define ice_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
> >
> > +/* Memory fence barrier */
> > +#define ice_memfence_read()
> > +#define ice_memfence_read_write()
> > +#define ice_memfence_write()
> > +
>
> I suspect rather than removing this, they would be better defined as
> rte_smp_* barriers. As in:
>
> #define ice_memfence_read() rte_smp_rmb()
>
Correcting my own suggestion - since this is a NIC driver, we probably want
to use rte_io_* barriers, not the rte_smp_* ones.
/Bruce
next prev parent reply other threads:[~2025-05-28 14:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 13:17 [PATCH v3 00/10] Update ice base code Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 01/10] net/ice/base: fix type conversion Dhanya Pillai
2025-05-27 16:54 ` Bruce Richardson
2025-05-27 13:17 ` [PATCH v3 02/10] net/ice/base: fix typo in media type check Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 03/10] net/ice/base: fix integer overflow issue Dhanya Pillai
2025-05-27 17:06 ` Bruce Richardson
2025-05-27 13:17 ` [PATCH v3 04/10] net/ice/base: set speculative execution barrier Dhanya Pillai
2025-05-28 13:07 ` Bruce Richardson
2025-05-28 14:59 ` Bruce Richardson [this message]
2025-05-28 17:55 ` Pillai, Dhanya R
2025-05-27 13:17 ` [PATCH v3 05/10] net/ice/base: fix typo in desc for dev ID 579F Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 06/10] net/ice/base: ptp minimal refactoring Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 07/10] net/ice/base: support for MAC rule with own filter flags Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 08/10] net/ice/base: configure PHY FEC error in logs for GNRD Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 09/10] net/ice/base: increase reset timeout to 20 seconds Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 10/10] net/ice/base: update version info Dhanya Pillai
2025-05-29 8:29 ` [PATCH v3 00/10] Update ice base code Bruce Richardson
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=aDckum8YiGEObYUL@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=dhanya.r.pillai@intel.com \
--cc=lukaszx.krakowiak@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).