From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Tyler Retzlaff" <roretzla@linux.microsoft.com>,
"Thomas Monjalon" <thomas@monjalon.net>
Cc: <dev@dpdk.org>, <david.marchand@redhat.com>
Subject: RE: [PATCH v2 1/2] eal: provide leading and trailing zero bit count abstraction
Date: Thu, 5 Jan 2023 22:34:55 +0100 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8762B@smartserver.smartshare.dk> (raw)
In-Reply-To: <20230105205746.GA15559@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
> From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com]
> Sent: Thursday, 5 January 2023 21.58
>
> On Thu, Jan 05, 2023 at 09:27:12AM -0800, Tyler Retzlaff wrote:
> > On Thu, Jan 05, 2023 at 09:23:49AM -0800, Tyler Retzlaff wrote:
> > > > > oh! not a problem. i'm very keen to catch any mistakes, thought
> i had
> > > > > missed something.
> > > >
> > > > I think we should move all bit-related functions together.
> > > > Please could you add another patch to your series
> > > > moving "ms1b"/"bsf"/"fls" functions in this file?
> > > >
> > > >
> > >
> > > okay, so there is already a rte_bitops.h. i guess everything should
> go
> > > there including the leading/trailing count functions instead of
> adding a
> > > new header.
> > >
> > > i'll introduce a new patch to the series that gathers the existing
> > > functions into rte_bitops.h and place the new functions there too.
> > >
> > > thanks
> >
> > just as a further follow up, you do understand that this is
> technically
> > an api break?
> >
> > moving functions from rte_common.h to rte_bitops.h will make
> translation
> > units that included only rte_common.h but used these functions will
> > fail to compile without being updated to include rte_bitops.h.
> >
> > anyway, i'll submit v3 with this change anyway.
>
> so when attempting to do this it became immediately obvious that moving
> just the bit op functions out is going to create a circular dependency
> between rte_common.h, rte_bitops.h
>
> once the bit ops are moved out of common there are still other inline
> functions that remain in comman that require bringing bitops back in,
> but bitops depends on common.
>
> my compromise will be to break log2 and pow2 inline functions into
> their
> own files to break the cycle (common no longer depends on bitops). i'll
> submit patches for this but it ends up touching a lot more of the
> tree to add back includes for log/pow inline use.
>
> alternatively i can just not move the remaining bit manipulation
> functions, let me know which is preferred.
It seems that no perfect solution exists, so we will have to live with a compromise. Here is another proposal for a compromise, for yours and Thomas's consideration:
I noticed that rte_bitops.h is mainly for setting/getting bits, used for accessing hardware.
Your functions are mathematical functions, and so are the similar functions in rte_common.h (which is why it makes sense to keep them together with yours). If we cannot clean up rte_common.h by moving them out, perhaps we should accept the current situation (until we find a way to move them out) and just add your mathematical functions where the existing mathematical functions reside, i.e. in rte_common.h.
This proposal only makes the existing mess slightly larger; it doesn't create a new kind of mess.
-Morten
next prev parent reply other threads:[~2023-01-05 21:34 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 22:14 [PATCH 0/2] eal: provide leading and trailing zero bit count Tyler Retzlaff
2022-11-23 22:14 ` [PATCH 1/2] eal: provide leading and trailing zero bit count abstraction Tyler Retzlaff
2023-04-03 21:46 ` Mattias Rönnblom
2022-11-23 22:14 ` [PATCH 2/2] test/bitcount: add bitcount tests Tyler Retzlaff
2022-11-23 23:43 ` [PATCH v2 0/2] eal: provide leading and trailing zero bit count Tyler Retzlaff
2022-11-23 23:43 ` [PATCH v2 1/2] eal: provide leading and trailing zero bit count abstraction Tyler Retzlaff
2022-11-24 10:17 ` Morten Brørup
2022-11-28 17:13 ` Tyler Retzlaff
2022-11-28 17:22 ` Morten Brørup
2022-11-28 17:27 ` Tyler Retzlaff
2023-01-05 9:04 ` Thomas Monjalon
2023-01-05 17:23 ` Tyler Retzlaff
2023-01-05 17:27 ` Tyler Retzlaff
2023-01-05 20:57 ` Tyler Retzlaff
2023-01-05 21:34 ` Morten Brørup [this message]
2023-01-05 22:06 ` Tyler Retzlaff
2023-01-05 23:10 ` Morten Brørup
2023-01-06 1:04 ` Tyler Retzlaff
2023-01-06 10:09 ` Thomas Monjalon
2023-01-06 10:00 ` Thomas Monjalon
2023-01-05 7:09 ` Morten Brørup
2023-01-05 9:01 ` Thomas Monjalon
2023-01-05 17:21 ` Tyler Retzlaff
2023-01-06 0:32 ` Stephen Hemminger
2023-01-06 11:48 ` Bruce Richardson
2023-01-06 12:41 ` Morten Brørup
2023-01-06 13:40 ` Thomas Monjalon
2023-01-06 18:58 ` Tyler Retzlaff
2023-01-06 20:51 ` Thomas Monjalon
2023-01-10 9:18 ` Ferruh Yigit
2023-01-06 18:47 ` Tyler Retzlaff
2023-01-09 8:50 ` Bruce Richardson
2023-04-04 21:23 ` Tyler Retzlaff
2023-04-05 8:44 ` Bruce Richardson
2023-04-05 15:22 ` Tyler Retzlaff
2023-04-05 15:51 ` Bruce Richardson
2023-04-05 17:25 ` Tyler Retzlaff
2022-11-23 23:43 ` [PATCH v2 2/2] test/bitcount: add bitcount tests Tyler Retzlaff
2023-01-04 23:46 ` [PATCH v2 0/2] eal: provide leading and trailing zero bit count Tyler Retzlaff
2023-01-09 17:36 ` [PATCH v4 0/2] eal: provide leading and trailing zero bit count abstraction Tyler Retzlaff
2023-01-09 17:36 ` [PATCH v4 1/2] eal: move bit operation functions from common to bitops header Tyler Retzlaff
2023-01-10 13:56 ` Ferruh Yigit
2023-01-09 17:36 ` [PATCH v4 2/2] eal: provide leading and trailing zero bit count abstraction Tyler Retzlaff
2023-01-10 13:55 ` Ferruh Yigit
2023-01-10 17:34 ` Tyler Retzlaff
2023-01-10 18:37 ` Tyler Retzlaff
2023-01-10 13:56 ` [PATCH v4 0/2] " Ferruh Yigit
2023-01-06 22:01 ` [PATCH v3 0/3] eal: provide leading and trailing zero bit count Tyler Retzlaff
2023-01-06 22:01 ` [PATCH v3 1/3] eal: move bit functions from common to bitops header Tyler Retzlaff
2023-01-06 22:01 ` [PATCH v3 2/3] eal: provide leading and trailing zero bit count abstraction Tyler Retzlaff
2023-01-06 22:01 ` [PATCH v3 3/3] test/bitcount: add bitcount tests Tyler Retzlaff
2023-01-07 8:15 ` Thomas Monjalon
2023-01-09 16:57 ` Tyler Retzlaff
2023-01-09 17:26 ` Tyler Retzlaff
2023-01-07 13:40 ` Morten Brørup
2023-01-09 8:51 ` [PATCH v3 0/3] eal: provide leading and trailing zero bit count Bruce Richardson
2023-01-10 19:38 ` [PATCH v5 0/2] eal: provide leading and trailing zero bit count abstraction Tyler Retzlaff
2023-01-10 19:38 ` [PATCH v5 1/2] eal: move bit operation common to bitops header Tyler Retzlaff
2023-01-10 19:38 ` [PATCH v5 2/2] eal: provide leading and trailing zero bit count abstraction Tyler Retzlaff
2023-01-10 19:46 ` [PATCH v6 0/2] " Tyler Retzlaff
2023-01-10 19:46 ` [PATCH v6 1/2] eal: move bit operation common to bitops header Tyler Retzlaff
2023-01-10 19:46 ` [PATCH v6 2/2] eal: provide leading and trailing zero bit count abstraction Tyler Retzlaff
2023-01-20 22:14 ` [PATCH v6 0/2] " Tyler Retzlaff
2023-02-02 9:14 ` David Marchand
2023-02-02 10:56 ` David Marchand
2023-02-02 15:57 ` Tyler Retzlaff
2023-02-03 9:14 ` David Marchand
2023-02-02 15:56 ` Tyler Retzlaff
2023-02-03 9:21 ` David Marchand
2023-04-01 0:45 ` [PATCH v7 0/4] eal: provide abstracted bit counting functions Tyler Retzlaff
2023-04-01 0:45 ` [PATCH v7 1/4] eal: move bit count functions to bitops header Tyler Retzlaff
2023-04-01 0:45 ` [PATCH v7 2/4] eal: provide abstracted bit count functions Tyler Retzlaff
2023-04-01 0:45 ` [PATCH v7 3/4] pipeline: add include of bitops Tyler Retzlaff
2023-04-01 0:45 ` [PATCH v7 4/4] maintainers: add bitcount test under EAL API and common code Tyler Retzlaff
2023-04-01 7:08 ` [PATCH v7 0/4] eal: provide abstracted bit counting functions Morten Brørup
2023-04-04 0:11 ` [PATCH v8 0/3] " Tyler Retzlaff
2023-04-04 0:11 ` [PATCH v8 1/3] eal: move bit count functions to bitops header Tyler Retzlaff
2023-04-04 0:11 ` [PATCH v8 2/3] eal: provide abstracted bit count functions Tyler Retzlaff
2023-04-04 0:11 ` [PATCH v8 3/3] maintainers: add bitcount test under EAL API and common code Tyler Retzlaff
2023-04-04 8:27 ` [PATCH v8 0/3] eal: provide abstracted bit counting functions Bruce Richardson
2023-08-25 8:41 ` 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=98CBD80474FA8B44BF855DF32C47DC35D8762B@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=roretzla@linux.microsoft.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).