DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
To: Nikhil Rao <nikhil.rao@intel.com>,
	"mattias.ronnblom@ericsson.com" <mattias.ronnblom@ericsson.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eventdev: remove event copy in Rx adapter
Date: Mon, 10 Jun 2019 04:23:28 +0000	[thread overview]
Message-ID: <BYAPR18MB2424B7DD1DBA6D3DC00785A7C8130@BYAPR18MB2424.namprd18.prod.outlook.com> (raw)



> -----Original Message-----
> From: Nikhil Rao <nikhil.rao@intel.com>
> Sent: Wednesday, May 22, 2019 3:23 AM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
> mattias.ronnblom@ericsson.com
> Cc: dev@dpdk.org; Nikhil Rao <nikhil.rao@intel.com>
> Subject: [PATCH] eventdev: remove event copy in Rx adapter
> 
> 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.
 
Mattias,

Let us know, if you have any comments on this patch?



> Thanks,
> Nikhil
> 
>  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 */
> --
> 1.8.3.1


             reply	other threads:[~2019-06-10  4:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10  4:23 Jerin Jacob Kollanukkaran [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-21 21:52 Nikhil Rao
2019-06-11 10:55 ` Mattias Rönnblom
2019-06-13 13:02   ` Rao, Nikhil
2019-06-13 14:05     ` Jerin Jacob Kollanukkaran
2019-06-13 14:43       ` 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=BYAPR18MB2424B7DD1DBA6D3DC00785A7C8130@BYAPR18MB2424.namprd18.prod.outlook.com \
    --to=jerinj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=mattias.ronnblom@ericsson.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).