DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Zapolski, MarcinX A" <marcinx.a.zapolski@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev structures from public API
Date: Tue, 10 Sep 2019 13:19:52 +0100	[thread overview]
Message-ID: <20190910121952.GA1898@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <51FEE37A1339864DB0A4E34597F561E30D5D6FFB@HASMSX113.ger.corp.intel.com>

On Tue, Sep 10, 2019 at 11:13:50AM +0100, Zapolski, MarcinX A wrote:
> > -----Original Message-----
> > From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> > Sent: Tuesday, September 10, 2019 12:07 PM
> > To: Zapolski, MarcinX A <marcinx.a.zapolski@intel.com>
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev
> > structures from public API
> > 
> > On Tue, Sep 10, 2019 at 09:59:51AM +0000, Zapolski, MarcinX A wrote:
> > > <...>
> > > > @@ -3994,7 +4054,55 @@ void *
> > > >  rte_eth_dev_get_sec_ctx(uint16_t port_id);
> > > >
> > > >
> > > > -#include <rte_ethdev_core.h>
> > > > +struct rte_eth_dev_callback;
> > > > +/** Structure to keep track of registered callbacks */
> > > > +TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
> > > > +
> > > > +/**
> > > > + * Structure used to hold information about the callbacks to be
> > > > +called for a
> > > > + * queue on RX and TX.
> > > > + */
> > > > +struct rte_eth_rxtx_callback {
> > > > +	struct rte_eth_rxtx_callback *next;
> > > > +	union{
> > > > +		rte_rx_callback_fn rx;
> > > > +		rte_tx_callback_fn tx;
> > > > +	} fn;
> > > > +	void *param;
> > > > +};
> > > > +
> > > > +/**
> > > > + * The generic data structure associated with each ethernet device.
> > > > + *
> > > > + * Pointers to burst-oriented packet receive and transmit functions
> > > > +are
> > > > + * located at the beginning of the structure, along with the
> > > > +pointer to
> > > > + * where all the data elements for the particular device are stored
> > > > +in shared
> > > > + * memory. This split allows the function pointer and driver data
> > > > +to be per-
> > > > + * process, while the actual configuration data for the device is shared.
> > > > + */
> > > I would like to raise one more concern (maybe not the smartest thing
> > > to do involving my own patch, but I will sleep better when this is resolved).
> > > Does anyone know what the author of this comment had in mind? I could
> > > not find any code that utilizes this split, and this patch clearly
> > > breaks it. If it is obsolete, I guess this comment could be removed.
> > 
> > As the comment suggest the split is for multi-process suport. The data
> > structures for the RX/TX queues etc. all need to be common across
> > processes, while the function pointers need to be per-process. Originally, in
> > very early versions of DPDK there was no rte_eth_dev_data structure, all
> > fields - both data and function pointers - were in rte_eth_dev itself.
> > 
> > /Bruce
> 
> Yes, I see the need to have the elements separated. But the comment suggests
> that the order of variables in structure is important. I just want to make
> sure that it is not.

I don't believe it's particularly significant. The main thing was to ensure
that we kept the fast-path accessed data on the same cacheline.

  reply	other threads:[~2019-09-10 12:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 12:49 [dpdk-dev] [RFC 19.11 0/2] Hide DPDK internal struct " Marcin Zapolski
2019-07-30 12:49 ` [dpdk-dev] [RFC 19.11 1/2] ethdev: make DPDK core functions non-inline Marcin Zapolski
2019-07-30 15:01   ` Jerin Jacob Kollanukkaran
2019-07-30 15:32     ` Bruce Richardson
2019-07-30 15:25   ` Stephen Hemminger
2019-07-30 15:33     ` Bruce Richardson
2019-07-30 15:54       ` Stephen Hemminger
2019-07-30 16:04         ` Wiles, Keith
2019-07-30 16:11         ` Bruce Richardson
2019-07-30 16:23           ` Stephen Hemminger
2019-07-30 12:49 ` [dpdk-dev] [RFC 19.11 2/2] ethdev: hide DPDK internal struct from public API Marcin Zapolski
2019-07-30 14:53   ` Ferruh Yigit
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 0/3] Hide " Marcin Zapolski
2019-09-06 14:00   ` Bruce Richardson
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev structures " Marcin Zapolski
2019-09-06 14:37   ` Ferruh Yigit
2019-09-09  8:07     ` Zapolski, MarcinX A
2019-09-09  9:59       ` Ferruh Yigit
2019-09-09 10:02         ` Zapolski, MarcinX A
2019-09-09 10:24           ` Ferruh Yigit
2019-09-09 11:41             ` Zapolski, MarcinX A
2019-09-14 10:34             ` Jerin Jacob
2019-09-06 17:24   ` Stephen Hemminger
2019-09-09  9:01     ` Zapolski, MarcinX A
2019-09-10  9:59   ` Zapolski, MarcinX A
2019-09-10 10:06     ` Bruce Richardson
2019-09-10 10:13       ` Zapolski, MarcinX A
2019-09-10 12:19         ` Bruce Richardson [this message]
2019-09-10 12:22           ` Zapolski, MarcinX A
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 2/3] i40e: make driver compatible with changes in ethdev Marcin Zapolski
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 3/3] ixgbe: " Marcin Zapolski

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=20190910121952.GA1898@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=marcinx.a.zapolski@intel.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).