From: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
To: Nikhil Rao <nikhil.rao@intel.com>, jerinj@marvell.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] eventdev: remove event copy in Rx adapter
Date: Tue, 11 Jun 2019 12:55:28 +0200 [thread overview]
Message-ID: <94f5667e-6539-a91c-36d3-8d890cab4e51@ericsson.com> (raw)
In-Reply-To: <1558475573-34837-1-git-send-email-nikhil.rao@intel.com>
On 2019-05-21 23:52, Nikhil Rao wrote:
> Remove copy from temporary event array on the stack to the
> enqueue buffer event array entry, instead initialize event in the
> enqueue buffer event array entry.
>
> Suggested-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
> ---
>
> Hi Mattias,
>
> This patch eliminates the event copy as you previously mentioned
> (https://patches.dpdk.org/patch/53350/), the enqueue buffer
> array is still retained in the rx_adapter struct, since the Rx adapter
> service function can return with events in the enqueue buffer
> that have not yet been shipped to the event device.
>
> Let me know your comments.
>
> Thanks,
> Nikhil
Looks good to me. Sorry about the late reply.
>
> lib/librte_eventdev/rte_event_eth_rx_adapter.c | 20 ++++----------------
> 1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> index 8d178be..a201668 100644
> --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> @@ -715,18 +715,6 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
> }
> }
>
> -/* Add event to buffer, free space check is done prior to calling
> - * this function
> - */
> -static inline void
> -rxa_buffer_event(struct rte_event_eth_rx_adapter *rx_adapter,
> - struct rte_event *ev)
> -{
> - struct rte_eth_event_enqueue_buffer *buf =
> - &rx_adapter->event_enqueue_buffer;
> - rte_memcpy(&buf->events[buf->count++], ev, sizeof(struct rte_event));
> -}
> -
> /* Enqueue buffered events to event device */
> static inline uint16_t
> rxa_flush_event_buffer(struct rte_event_eth_rx_adapter *rx_adapter)
> @@ -769,11 +757,11 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
> &dev_info->rx_queue[rx_queue_id];
> struct rte_eth_event_enqueue_buffer *buf =
> &rx_adapter->event_enqueue_buffer;
> + struct rte_event *ev = &buf->events[buf->count];
> int32_t qid = eth_rx_queue_info->event_queue_id;
> uint8_t sched_type = eth_rx_queue_info->sched_type;
> uint8_t priority = eth_rx_queue_info->priority;
> uint32_t flow_id;
> - struct rte_event events[BATCH_SIZE];
> struct rte_mbuf *m = mbufs[0];
> uint32_t rss_mask;
> uint32_t rss;
> @@ -811,7 +799,6 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
>
> for (i = 0; i < num; i++) {
> m = mbufs[i];
> - struct rte_event *ev = &events[i];
>
> rss = do_rss ?
> rxa_do_softrss(m, rx_adapter->rss_key_be) :
> @@ -828,9 +815,10 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
> ev->sub_event_type = 0;
> ev->priority = priority;
> ev->mbuf = m;
> -
> - rxa_buffer_event(rx_adapter, ev);
> + ev++;
> }
> +
> + buf->count += num;
> }
>
> /* Enqueue packets from <port, q> to event buffer */
>
next prev parent reply other threads:[~2019-06-11 10:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 21:52 Nikhil Rao
2019-06-11 10:55 ` Mattias Rönnblom [this message]
2019-06-13 13:02 ` Rao, Nikhil
2019-06-13 14:05 ` Jerin Jacob Kollanukkaran
2019-06-13 14:43 ` Jerin Jacob Kollanukkaran
2019-06-10 4:23 Jerin Jacob Kollanukkaran
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=94f5667e-6539-a91c-36d3-8d890cab4e51@ericsson.com \
--to=mattias.ronnblom@ericsson.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=nikhil.rao@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).