From: Joyce Kong <Joyce.Kong@arm.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "jerinj@marvell.com" <jerinj@marvell.com>,
"stable@dpdk.org" <stable@dpdk.org>, Gavin Hu <Gavin.Hu@arm.com>,
Konstantin Ananyev <konstantin.ananyev@intel.com>,
Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
Ola Liljedahl <Ola.Liljedahl@arm.com>,
Sunil Kumar Kori <skori@marvell.com>,
David Marchand <david.marchand@redhat.com>
Subject: RE: [PATCH v4 1/7] eal: fix header build with C++
Date: Mon, 14 Feb 2022 09:30:52 +0000 [thread overview]
Message-ID: <DU2PR08MB728791569D979A4CE06EF6F892339@DU2PR08MB7287.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20220210154239.587185-2-bruce.richardson@intel.com>
<snip>
> Subject: [PATCH v4 1/7] eal: fix header build with C++
>
> C++ files could not include some headers because:
>
> * "new" is a keyword in C++, so can't be a variable name
> * there is no automatic casting to/from void *
>
> Fixes: 184104fc6121 ("ticketlock: introduce fair ticket based locking")
> Fixes: 032a7e5499a0 ("trace: implement provider payload")
> Cc: joyce.kong@arm.com
> Cc: jerinj@marvell.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Joyce Kong <joyce.kong@arm.com>
> ---
> lib/eal/include/generic/rte_ticketlock.h | 14 +++++++-------
> lib/eal/include/rte_trace_point.h | 2 +-
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/lib/eal/include/generic/rte_ticketlock.h
> b/lib/eal/include/generic/rte_ticketlock.h
> index c1b8808f51..693c67b517 100644
> --- a/lib/eal/include/generic/rte_ticketlock.h
> +++ b/lib/eal/include/generic/rte_ticketlock.h
> @@ -91,13 +91,13 @@ rte_ticketlock_unlock(rte_ticketlock_t *tl) static
> inline int rte_ticketlock_trylock(rte_ticketlock_t *tl) {
> - rte_ticketlock_t old, new;
> - old.tickets = __atomic_load_n(&tl->tickets, __ATOMIC_RELAXED);
> - new.tickets = old.tickets;
> - new.s.next++;
> - if (old.s.next == old.s.current) {
> - if (__atomic_compare_exchange_n(&tl->tickets, &old.tickets,
> - new.tickets, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED))
> + rte_ticketlock_t oldl, newl;
> + oldl.tickets = __atomic_load_n(&tl->tickets, __ATOMIC_RELAXED);
> + newl.tickets = oldl.tickets;
> + newl.s.next++;
> + if (oldl.s.next == oldl.s.current) {
> + if (__atomic_compare_exchange_n(&tl->tickets, &oldl.tickets,
> + newl.tickets, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED))
> return 1;
> }
>
> diff --git a/lib/eal/include/rte_trace_point.h
> b/lib/eal/include/rte_trace_point.h
> index e226f073f7..0f8700974f 100644
> --- a/lib/eal/include/rte_trace_point.h
> +++ b/lib/eal/include/rte_trace_point.h
> @@ -370,7 +370,7 @@ do { \
> do { \
> if (unlikely(in == NULL)) \
> return; \
> - rte_strscpy(mem, in, __RTE_TRACE_EMIT_STRING_LEN_MAX); \
> + rte_strscpy((char *)mem, in, __RTE_TRACE_EMIT_STRING_LEN_MAX);
> \
> mem = RTE_PTR_ADD(mem, __RTE_TRACE_EMIT_STRING_LEN_MAX);
> \ } while (0)
>
> --
> 2.32.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
next prev parent reply other threads:[~2022-02-14 9:31 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 17:42 [PATCH 0/7] Verify C++ compatibility of public headers Bruce Richardson
2022-02-04 17:42 ` [PATCH 1/7] eal: fix header build with C++ Bruce Richardson
2022-02-04 17:42 ` [PATCH 2/7] eventdev: " Bruce Richardson
2022-02-07 9:40 ` Jerin Jacob
2022-02-04 17:42 ` [PATCH 3/7] graph: add explicit cast to allow C++ build Bruce Richardson
2022-02-04 18:12 ` Stephen Hemminger
2022-02-07 9:41 ` Jerin Jacob
2022-02-04 17:42 ` [PATCH 4/7] ipsec: " Bruce Richardson
2022-02-04 17:42 ` [PATCH 5/7] table: add explicit casts for C++ compatibility Bruce Richardson
2022-02-04 17:42 ` [PATCH 6/7] vhost: remove non-C++ compatible includes Bruce Richardson
2022-02-04 18:18 ` Bruce Richardson
2022-02-09 9:10 ` Wang, Xiao W
2022-02-09 9:21 ` Bruce Richardson
2022-02-04 17:42 ` [PATCH 7/7] buildtools/chkincs: test headers for C++ compatibility Bruce Richardson
2022-02-10 12:02 ` [PATCH v2 0/7] Verify C++ compatibility of public headers Bruce Richardson
2022-02-10 12:02 ` [PATCH v2 1/7] eal: fix header build with C++ Bruce Richardson
2022-02-10 12:57 ` David Marchand
2022-02-10 14:07 ` Bruce Richardson
2022-02-10 12:02 ` [PATCH v2 2/7] eventdev: " Bruce Richardson
2022-02-10 12:02 ` [PATCH v2 3/7] graph: fix missing explicit cast for C++ build Bruce Richardson
2022-02-10 12:02 ` [PATCH v2 4/7] ipsec: " Bruce Richardson
2022-02-10 12:42 ` Ananyev, Konstantin
2022-02-10 12:02 ` [PATCH v2 5/7] table: fix missing explicit casts " Bruce Richardson
2022-02-10 12:02 ` [PATCH v2 6/7] vhost: fix incompatible header includes for C++ Bruce Richardson
2022-02-10 12:02 ` [PATCH v2 7/7] buildtools/chkincs: test headers for C++ compatibility Bruce Richardson
2022-02-10 14:03 ` [PATCH v3 0/7] Verify C++ compatibility of public headers Bruce Richardson
2022-02-10 14:03 ` [PATCH v3 1/7] eal: fix header build with C++ Bruce Richardson
2022-02-10 14:03 ` [PATCH v3 2/7] eventdev: " Bruce Richardson
2022-02-10 14:03 ` [PATCH v3 3/7] graph: fix missing explicit cast for C++ build Bruce Richardson
2022-02-10 14:03 ` [PATCH v3 4/7] ipsec: " Bruce Richardson
2022-02-10 14:03 ` [PATCH v3 5/7] table: fix missing explicit casts " Bruce Richardson
2022-02-10 14:03 ` [PATCH v3 6/7] vhost: fix incompatible header includes for C++ Bruce Richardson
2022-02-10 14:03 ` [PATCH v3 7/7] buildtools/chkincs: test headers for C++ compatibility Bruce Richardson
2022-02-10 14:37 ` David Marchand
2022-02-10 15:21 ` Bruce Richardson
2022-02-10 15:42 ` [PATCH v4 0/7] Verify C++ compatibility of public headers Bruce Richardson
2022-02-10 15:42 ` [PATCH v4 1/7] eal: fix header build with C++ Bruce Richardson
2022-02-14 9:30 ` Joyce Kong [this message]
2022-02-10 15:42 ` [PATCH v4 2/7] eventdev: " Bruce Richardson
2022-02-10 15:42 ` [PATCH v4 3/7] graph: fix missing explicit cast for C++ build Bruce Richardson
2022-02-10 15:42 ` [PATCH v4 4/7] ipsec: " Bruce Richardson
2022-02-10 15:42 ` [PATCH v4 5/7] table: fix missing explicit casts " Bruce Richardson
2022-02-10 15:42 ` [PATCH v4 6/7] vhost: fix incompatible header includes for C++ Bruce Richardson
2022-02-10 15:42 ` [PATCH v4 7/7] buildtools/chkincs: test headers for C++ compatibility Bruce Richardson
2022-02-10 21:58 ` Thomas Monjalon
2022-02-11 10:31 ` Bruce Richardson
2022-02-11 10:57 ` Bruce Richardson
2022-02-11 17:22 ` Thomas Monjalon
2022-02-10 22:07 ` [PATCH v4 0/7] Verify C++ compatibility of public headers Thomas Monjalon
2022-02-11 11:36 ` [PATCH v5 0/2] " Bruce Richardson
2022-02-11 11:36 ` [PATCH v5 1/2] buildtools/chkincs: remove unnecesary linkage Bruce Richardson
2022-02-11 11:36 ` [PATCH v5 2/2] buildtools/chkincs: test headers for C++ compatibility Bruce Richardson
2022-02-12 13:27 ` [PATCH v5 0/2] Verify C++ compatibility of public headers Thomas Monjalon
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=DU2PR08MB728791569D979A4CE06EF6F892339@DU2PR08MB7287.eurprd08.prod.outlook.com \
--to=joyce.kong@arm.com \
--cc=Gavin.Hu@arm.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Ola.Liljedahl@arm.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=konstantin.ananyev@intel.com \
--cc=skori@marvell.com \
--cc=stable@dpdk.org \
/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).