DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Konstantin Ananyev" <konstantin.v.ananyev@yandex.ru>, <dev@dpdk.org>
Subject: RE: rte_ring_elem_pvt historical question
Date: Tue, 5 Jul 2022 15:40:45 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D871A9@smartserver.smartshare.dk> (raw)
In-Reply-To: <3fefdb57-1b62-71d7-48f1-6d2332dd423f@yandex.ru>

> From: Konstantin Ananyev [mailto:konstantin.v.ananyev@yandex.ru]
> Sent: Tuesday, 5 July 2022 10.55
> 
> 04/07/2022 12:35, Morten Brørup пишет:
> > Does anyone here remember why the
> __rte_ring_enqueue/dequeue_elems_64/128() functions support unaligned
> object arrays, when the __rte_ring_enqueue/dequeue_elems_32() functions
> require 4 byte aligned object arrays?
> 
> As I remember, we added 'unaligned' to be able to use rte_ring with
> elements that might have smaller alignment.

Was there a use case behind this, or just trying to future proof the ring library?

Using arrays of unaligned objects seems quite exotic to me.

> For 32 - as I remember we never explicitly require 4B aligned
> objects for the rings ... Am I missing something here?

Not related to my question; I was only referring to 32 to show the difference for the 64/128 functions.

> My guess, we just never hit such problem so it gets unnoticed.
> Probably worth updating 32-bit version too with explicit 'unaligned'
> type.

I would suggest doing the opposite, i.e. removing unaligned from 64/128, unless there is a real use case requiring unaligned elements.

Either way, we agree that it should be consistent across the 32-bit version too.

> >
> > I'm wondering if the compiler could do better with a simpler
> implementation than the manually implemented loop unrolls, and if the
> unalignment silliness would stand in the way.
> >
> > Med venlig hilsen / Kind regards,
> > -Morten Brørup
> >
> 


      reply	other threads:[~2022-07-05 13:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 11:35 Morten Brørup
2022-07-05  8:54 ` Konstantin Ananyev
2022-07-05 13:40   ` Morten Brørup [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=98CBD80474FA8B44BF855DF32C47DC35D871A9@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    /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).