DPDK patches and discussions
 help / color / mirror / Atom feed
From: Arnon Warshavsky <arnon@qwilt.com>
To: "shesha Sreenivasamurthy (shesha)" <shesha@cisco.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Reshuffling of rte_mbuf structure.
Date: Mon, 2 Nov 2015 20:35:16 +0200	[thread overview]
Message-ID: <CAKy9EB2W9txt-w1MS-WUpZrefU+K9T7P3nMtnAr41EjEbzz+Pg@mail.gmail.com> (raw)
In-Reply-To: <D25CEB3B.24E0E%shesha@cisco.com>

If NO_TX_OFFLOAD only changes the layout in terms of relative field
location in cache lines, and does not eliminate the fields themselves
why should the using code be affected?

On Mon, Nov 2, 2015 at 8:30 PM, shesha Sreenivasamurthy (shesha) <
shesha@cisco.com> wrote:

> One issue I see with optimization config options such as NO_TX_OFFLOAD,
> NO_MULTISEG, NO_REFCOUNT is: It is not sufficient to have those “Ifdefs”
> inside mbuf structure, but should be sprinkled all over the code where
> corresponding fields are used. This may make the code messier.
>
> --
> *- Thanks*
> *char * (*shesha) (uint64_t cache, uint8_t F00D)*
> *{ return 0x0000C0DE; } *
>
> From: Stephen Hemminger <stephen@networkplumber.org>
> Date: Monday, November 2, 2015 at 8:24 AM
> To: Arnon Warshavsky <arnon@qwilt.com>
> Cc: Cisco Employee <shesha@cisco.com>, "dev@dpdk.org" <dev@dpdk.org>
> Subject: Re: [dpdk-dev] Reshuffling of rte_mbuf structure.
>
> On Sun, 1 Nov 2015 06:45:31 +0200
> Arnon Warshavsky <arnon@qwilt.com> wrote:
>
> My 2 cents,
> This was brought up in the recent user space summit, and it seems that
> indeed there is no one cache lines arrangement that fits all.
> OTOH multiple compile time options to suffice all flavors, would make it
> unpleasant to read maintain test and debug.
> (I think there was quiet a consensus in favor of reducing compile options
> in general)
> Currently I manage similar deviations via our own source control which I
> admit to be quite a pain.
> I would prefer an option of code manipulation/generation by some script
> during dpdk install,
> which takes the default version of rte_mbuf.h,
> along with an optional user file (json,xml,elvish,whatever) defining the
> structure replacements,
> creating your custom version, and placing it instead of the installed copy
> of rte_mbuf.h.
> Maybe the only facility required from dpdk is just the ability to register
> calls to such user scripts at some install stage(s), providing the mean
> along with responsibility to the user.
> /Arnon
> On Sat, Oct 31, 2015 at 6:44 AM, shesha Sreenivasamurthy (shesha) <
> shesha@cisco.com> wrote:
> > In Cisco, we are using DPDK for a very high speed packet processor
> > application. We don't use NIC TCP offload / RSS hashing. Putting those
> > fields in the first cache-line - and the obligatory mb->next datum in the
> > second cache line - causes significant LSU pressure and performance
> > degradation. If it does not affect other applications, I would like to
> > propose reshuffling of fields so that the obligator "next" field falls in
> > first cache line and RSS hashing goes to next. If this re-shuffling
> indeed
> > hurts other applications, another idea is to make it compile time
> > configurable. Please provide feedback.
> >
> > --
> > - Thanks
> > char * (*shesha) (uint64_t cache, uint8_t F00D)
> > { return 0x0000C0DE; }
> >
>
>
> Having different layouts will be a disaster for distro's they have to
> choose one.
> And I hate to introduce more configuration!
>
> But we see the same issue. It would make sense if there were configuration
> options
> for some common optimizations NO_TX_OFFLOAD, NO_MULTISEG, NO_REFCOUNT and
> then
> the mbuf got optimized for those combinations. Seems better than config
> options
> like LAYOUT1, LAYOUT2, ...
>
> In this specific case, I think lots of driver could be check nb_segs == 1
> and avoiding
> the next field for simple packets.
>
> Long term, I think this will be losing battle. As DPDK grows more
> features, the current
> mbuf structure will grow there is really nothing stopping the bloat of
> meta data.
>
>


-- 

*Arnon Warshavsky*
*Qwilt | work: +972-72-2221634 | mobile: +972-50-8583058 | arnon@qwilt.com
<arnon@qwilt.com>*

  reply	other threads:[~2015-11-02 18:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-31  4:44 shesha Sreenivasamurthy (shesha)
2015-11-01  4:45 ` Arnon Warshavsky
2015-11-02 16:24   ` Stephen Hemminger
2015-11-02 18:30     ` shesha Sreenivasamurthy (shesha)
2015-11-02 18:35       ` Arnon Warshavsky [this message]
2015-11-02 22:19         ` shesha Sreenivasamurthy (shesha)
2015-11-02 22:51           ` Thomas Monjalon
2015-11-03  0:21             ` Matthew Hall
2015-11-03 10:20               ` Bruce Richardson
2015-11-03 11:44                 ` Zoltan Kiss
2015-11-03 14:33                   ` Matthew Hall
2015-11-04 18:56               ` shesha Sreenivasamurthy (shesha)

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=CAKy9EB2W9txt-w1MS-WUpZrefU+K9T7P3nMtnAr41EjEbzz+Pg@mail.gmail.com \
    --to=arnon@qwilt.com \
    --cc=dev@dpdk.org \
    --cc=shesha@cisco.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).