From: "Kundapura, Ganapati" <ganapati.kundapura@intel.com>
To: Jerin Jacob <jerinjacobk@gmail.com>
Cc: "Jayatheerthan, Jay" <jay.jayatheerthan@intel.com>,
dpdk-dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] eventdev: change packet enqueue buffer in RX adapter to circular buffer
Date: Mon, 30 Aug 2021 10:25:04 +0000 [thread overview]
Message-ID: <CO1PR11MB488280496DE8E48231269C5387CB9@CO1PR11MB4882.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CALBAE1P7L_BuxdMaYdKOk8A0_6SEBMRy8=5kUFtN-r2_0QFgPQ@mail.gmail.com>
> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: 30 August 2021 15:11
> To: Kundapura, Ganapati <ganapati.kundapura@intel.com>
> Cc: Jayatheerthan, Jay <jay.jayatheerthan@intel.com>; dpdk-dev
> <dev@dpdk.org>
> Subject: Re: [PATCH v1] eventdev: change packet enqueue buffer in RX
> adapter to circular buffer
>
> On Fri, Aug 27, 2021 at 3:12 PM Ganapati Kundapura
> <ganapati.kundapura@intel.com> wrote:
> >
> > RX adapter user memove() to move unprocessed events to the beginning
> > of the packet enqueue buffer. The use memmove() was found to consume
> > good amount of CPU cycles (about 20%).
> >
> > This patch removes the use of memove() while implementina a circular
>
> Typo
Will address in next patch
>
> > buffer to avoid copying of data. With this change RX adapter is able
> > to fill the buffer of 16384 events.
>
>
> Please change the subject to :
> eventdev: rx-adapter: improve ...
Will address in next patch
>
> >
> > Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
> > ---
> > lib/eventdev/rte_event_eth_rx_adapter.c | 84
> > ++++++++++++++++++++++++++-------
> > 1 file changed, 68 insertions(+), 16 deletions(-)
> >
>
> > } else {
> > num = rxa_create_event_vector(rx_adapter,
> > eth_rx_queue_info, @@ -892,9 +918,14 @@ rxa_buffer_mbufs(struct
> > rte_event_eth_rx_adapter *rx_adapter,
> >
> > dropped = 0;
> > nb_cb = dev_info->cb_fn(eth_dev_id, rx_queue_id,
> > - ETH_EVENT_BUFFER_SIZE, buf->count,
> > - &buf->events[buf->count], num,
> > - dev_info->cb_arg, &dropped);
> > + buf->last |
> > + (RTE_DIM(buf->events) & ~buf->last_mask),
> > + buf->count >= BATCH_SIZE ?
> > + buf->count - BATCH_SIZE : 0,
> > + &buf->events[buf->tail],
> > + num,
> > + dev_info->cb_arg,
> > + &dropped);
These are arguments to callback function dev_info->cb_fn. Passing these to another inline function,
retrieving dev_info from rx_adapter(additional parameter to inline function) and to
call the dev_info->cb_fn from inline function which is getting called only once
seems overhead just to allow more line width.
>
>
> Moving this code section to a separate inline function can allow more
> linewidth to consume aka less number of lines.
>
> Rest looks good to me.
prev parent reply other threads:[~2021-08-30 10:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 9:42 Ganapati Kundapura
2021-08-30 9:41 ` Jerin Jacob
2021-08-30 10:25 ` Kundapura, Ganapati [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=CO1PR11MB488280496DE8E48231269C5387CB9@CO1PR11MB4882.namprd11.prod.outlook.com \
--to=ganapati.kundapura@intel.com \
--cc=dev@dpdk.org \
--cc=jay.jayatheerthan@intel.com \
--cc=jerinjacobk@gmail.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).