DPDK patches and discussions
 help / color / mirror / Atom feed
From: Daniel Gregory <daniel.gregory@bytedance.com>
To: Stanislaw Kardach <stanislaw.kardach@gmail.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>,
	dev@dpdk.org, Liang Ma <liangma@liangbit.com>,
	Punit Agrawal <punit.agrawal@bytedance.com>
Subject: Re: [PATCH 2/2] eal/riscv: add support for zicbop extension
Date: Fri, 31 May 2024 09:49:51 +0100	[thread overview]
Message-ID: <20240531084951.GA4018256@ste-uk-lab-gw> (raw)
In-Reply-To: <20240530171948.19763-3-daniel.gregory@bytedance.com>

On Thu, May 30, 2024 at 06:19:48PM +0100, Daniel Gregory wrote:
> + * The RTE_RISCV_ZICBOP option controls whether we emit them manually for older
> + * compilers that may not have the support to assemble them.
> + */
>  static inline void rte_prefetch0(const volatile void *p)
>  {
> -	RTE_SET_USED(p);
> +#ifndef RTE_RISCV_ZICBOP
> +	/* by default __builtin_prefetch prepares for a read */
> +	__builtin_prefetch((const void *)p);

This cast causes warnings (which are treated as errors by the 0-day
Robot) due to it discarding the 'volatile' on p. 

Removing the volatile from the definition of rte_prefetch0 causes build
failures in some drivers (txgbe_rxtx.c:1809, ixgbe_rxtx.c:2174,
enic_rxtx.c:127, ...).

rte_prefetch0_write takes its argument as 'const void *' and so can use
__builtin_prefetch().

      reply	other threads:[~2024-05-31  8:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 17:19 [PATCH 0/2] eal/riscv: implement prefetch using zicbop Daniel Gregory
2024-05-30 17:19 ` [PATCH 1/2] eal: add flag to hide generic prefetch_write Daniel Gregory
2024-05-30 17:19 ` [PATCH 2/2] eal/riscv: add support for zicbop extension Daniel Gregory
2024-05-31  8:49   ` Daniel Gregory [this message]

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=20240531084951.GA4018256@ste-uk-lab-gw \
    --to=daniel.gregory@bytedance.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=liangma@liangbit.com \
    --cc=punit.agrawal@bytedance.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=stanislaw.kardach@gmail.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).