From: Jerin Jacob <jerinjacobk@gmail.com>
To: Ganapati Kundapura <ganapati.kundapura@intel.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 15:11:16 +0530 [thread overview]
Message-ID: <CALBAE1P7L_BuxdMaYdKOk8A0_6SEBMRy8=5kUFtN-r2_0QFgPQ@mail.gmail.com> (raw)
In-Reply-To: <20210827094204.474846-1-ganapati.kundapura@intel.com>
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
> 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 ...
>
> 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);
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.
next prev parent reply other threads:[~2021-08-30 9:41 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 [this message]
2021-08-30 10:25 ` Kundapura, Ganapati
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='CALBAE1P7L_BuxdMaYdKOk8A0_6SEBMRy8=5kUFtN-r2_0QFgPQ@mail.gmail.com' \
--to=jerinjacobk@gmail.com \
--cc=dev@dpdk.org \
--cc=ganapati.kundapura@intel.com \
--cc=jay.jayatheerthan@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).