DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	David Marchand <david.marchand@redhat.com>, <dev@dpdk.org>,
	<onar.olsen@ericsson.com>, <Honnappa.Nagarahalli@arm.com>,
	<nd@arm.com>, <konstantin.ananyev@intel.com>,
	<mb@smartsharesystems.com>, <hofors@lysator.liu.se>,
	Chengwen Feng <fengchengwen@huawei.com>,
	Ola Liljedahl <ola.liljedahl@arm.com>
Subject: Re: [PATCH v9] eal: add seqlock
Date: Tue, 31 May 2022 15:45:36 -0700	[thread overview]
Message-ID: <20220531154536.52f57bf6@hermes.local> (raw)
In-Reply-To: <20220523142346.366902-1-mattias.ronnblom@ericsson.com>

On Mon, 23 May 2022 16:23:46 +0200
Mattias Rönnblom <mattias.ronnblom@ericsson.com> wrote:

> +/**
> + * The RTE seqcount type.
> + */
> +typedef struct {
> +	uint32_t sn; /**< A sequence number for the protected data. */
> +} rte_seqcount_t;

Don't need structure for only one element.

typedef uint32_t rte_seqcount_t;

+	if (unlikely(begin_sn != end_sn))
+		return true;
+
+	return false;

Prefer to avoid conditional if possible (compiler will optimize it as):

        return begin_sn == end_sn;

  parent reply	other threads:[~2022-05-31 22:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220513103820.3e34fcb9@hermes.local>
2022-05-15 12:24 ` [PATCH v7] " Mattias Rönnblom
2022-05-15 12:39   ` Mattias Rönnblom
2022-05-15 15:19     ` Morten Brørup
2022-05-15 17:54       ` Mattias Rönnblom
2022-05-16  8:30         ` Morten Brørup
2022-05-15 15:23     ` Morten Brørup
2022-05-20  6:02     ` Mattias Rönnblom
2022-05-23 11:31       ` [PATCH v8] " Mattias Rönnblom
2022-05-23 14:23         ` [PATCH v9] " Mattias Rönnblom
2022-05-31 11:52           ` David Marchand
2022-06-01  9:01             ` Mattias Rönnblom
2022-06-01  9:10               ` Morten Brørup
2022-05-31 22:45           ` Stephen Hemminger [this message]
2022-06-01  6:07             ` Morten Brørup
2022-06-01  8:19             ` Mattias Rönnblom
2022-06-01 16:15               ` Stephen Hemminger
2022-06-01 19:33                 ` Mattias Rönnblom
2022-05-31 22:49           ` Stephen Hemminger
2022-05-31 22:57             ` Honnappa Nagarahalli
2022-06-07  9:25           ` David Marchand

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=20220531154536.52f57bf6@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=hofors@lysator.liu.se \
    --cc=konstantin.ananyev@intel.com \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=mb@smartsharesystems.com \
    --cc=nd@arm.com \
    --cc=ola.liljedahl@arm.com \
    --cc=onar.olsen@ericsson.com \
    --cc=thomas@monjalon.net \
    /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).