DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: "Rao, Nikhil" <nikhil.rao@intel.com>
Cc: bruce.richardson@intel.com, gage.eads@intel.com, dev@dpdk.org,
	thomas@monjalon.net, harry.van.haaren@intel.com,
	hemant.agrawal@nxp.com, nipun.gupta@nxp.com,
	narender.vangati@intel.com, erik.g.carrillo@intel.com,
	abhinandan.gujjar@intel.com, santosh.shukla@caviumnetworks.com
Subject: Re: [dpdk-dev] [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter
Date: Mon, 2 Oct 2017 16:09:56 +0530	[thread overview]
Message-ID: <20171002103955.GA11011@jerin> (raw)
In-Reply-To: <b41809f7-5fbc-d448-98a4-153e23e86d1b@intel.com>

-----Original Message-----
> Date: Mon, 2 Oct 2017 15:58:56 +0530
> From: "Rao, Nikhil" <nikhil.rao@intel.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> CC: bruce.richardson@intel.com, gage.eads@intel.com, dev@dpdk.org,
>  thomas@monjalon.net, harry.van.haaren@intel.com, hemant.agrawal@nxp.com,
>  nipun.gupta@nxp.com, narender.vangati@intel.com,
>  erik.g.carrillo@intel.com, abhinandan.gujjar@intel.com,
>  santosh.shukla@caviumnetworks.com
> Subject: Re: [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter
> User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
>  Thunderbird/52.3.0
> 
> On 9/25/2017 8:29 AM, Rao, Nikhil wrote:
> > On 9/24/2017 11:46 PM, Rao, Nikhil wrote:
> > > On 9/22/2017 2:40 PM, Jerin Jacob wrote:
> > > 
> > > > When we worked on a prototype, we figured out that we need a
> > > > separate event type
> > > > for RX adapter. Probably RTE_EVENT_TYPE_ETHDEV_RX_ADAPTER?
> > > > The Reason is:
> > > > - In the HW based Rx adapter case, the packet are coming
> > > > directly to eventdev once it is configured.
> > > > - So on a HW implementation of the event dequeue(), CPU needs to
> > > > convert HW specific
> > > > metadata to mbuf
> > > > - The event dequeue() is used in two cases
> > > > a) octeontx eventdev driver used with any external NIC
> > > > b) octeontx eventdev driver used with integrated NIC(without service
> > > > core to inject the packet)
> > > > We need some identifier to understand case (a) and (b).So, in
> > > > dequeue(), if the
> > > > packet is from RTE_EVENT_TYPE_ETHDEV then we can do "HW specific
> > > > metadata" to mbuf
> > > > conversion and in another case (!RTE_EVENT_TYPE_ETHDEV) result
> > > > in no mbuf
> > > > conversion.
> > > > 
> > > > Application can check if it is an Ethernet type event by
> > > > ev.event_type == RTE_EVENT_TYPE_ETHDEV || ev.event_type ==
> > > > RTE_EVENT_TYPE_ETHDEV_RX_ADAPTER
> > > > 
> > > 
> > > As per my understanding, the case (a) uses an in built port
> > > Is it possible for the eventdev PMD to do the conversion based off
> > > the eventdev port ?
> > > 
> > 
> > I realized the dequeue wouldn't have knowledge of the port the event was
> > injected from, the application shouldn't have to see the difference
> > between case (a) & (b).
> > 
> > Would it be possible to use the impl_opaque field within struct rte_event ?
> > 
> > Nikhil
> 
> Hi Jerin,
> 
> Any further thoughts on this ?

impl_opaque field could be one option. But I think, NXP driver is using
it for internal operation. So overriding it from Rx adapter will cause
issue. How about adding new event type? So it gets a new name space so no
collision.

➜ [master][dpdk-next-eventdev] $ git diff
diff --git a/lib/librte_eventdev/rte_eventdev.h
b/lib/librte_eventdev/rte_eventdev.h
index ec7aabd9a..b33423c7e 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -878,6 +878,8 @@ rte_event_dev_close(uint8_t dev_id);
 /**< The event generated from cpu for pipelining.
  * Application may use *sub_event_type* to further classify the event
  */
+#define RTE_EVENT_TYPE_ETHDEV_ADAPTER   0x4
+/**< The event generated from ethdev Rx adapter */
 #define RTE_EVENT_TYPE_MAX              0x10
 /**< Maximum number of event types */

  reply	other threads:[~2017-10-02 10:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 21:17 [dpdk-dev] [PATCH v4 0/4] eventdev: cover letter: ethernet Rx queue event adapter Nikhil Rao
2017-09-21 21:17 ` [dpdk-dev] [PATCH v4 1/4] eventdev: Add caps API and PMD callbacks for rte_event_eth_rx_adapter Nikhil Rao
2017-09-21 15:46   ` Jerin Jacob
2017-09-24 12:14     ` Rao, Nikhil
2017-10-02  8:48       ` Jerin Jacob
2017-09-21 21:17 ` [dpdk-dev] [PATCH v4 2/4] eventdev: Add ethernet Rx adapter caps function to eventdev SW PMD Nikhil Rao
2017-09-22  2:49   ` Jerin Jacob
2017-09-22  5:27   ` santosh
2017-09-21 21:17 ` [dpdk-dev] [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter Nikhil Rao
2017-09-21 15:43   ` Pavan Nikhilesh Bhagavatula
2017-09-23 11:35     ` Rao, Nikhil
2017-10-03  9:09       ` Pavan Nikhilesh Bhagavatula
2017-09-22  6:08   ` santosh
2017-10-02 10:20     ` Rao, Nikhil
2017-09-22  9:10   ` Jerin Jacob
2017-09-24 18:16     ` Rao, Nikhil
2017-09-25  2:59       ` Rao, Nikhil
2017-10-02 10:28         ` Rao, Nikhil
2017-10-02 10:39           ` Jerin Jacob [this message]
2017-10-05  8:54             ` Rao, Nikhil
2017-10-03 13:52       ` Jerin Jacob
2017-10-05  8:12         ` Rao, Nikhil
2017-09-21 21:17 ` [dpdk-dev] [PATCH v4 4/4] eventdev: Add tests for event eth Rx adapter APIs Nikhil Rao
2017-09-22 12:12   ` Jerin Jacob
2017-09-24 18:24     ` Rao, Nikhil
2017-10-02 10:31       ` Jerin Jacob
2017-10-04 11:28         ` Rao, Nikhil
2017-10-03 11:36   ` Pavan Nikhilesh Bhagavatula
2017-10-05  5:57     ` Rao, Nikhil
2017-10-05  8:08       ` Pavan Nikhilesh Bhagavatula

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=20171002103955.GA11011@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=gage.eads@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=narender.vangati@intel.com \
    --cc=nikhil.rao@intel.com \
    --cc=nipun.gupta@nxp.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=thomas@monjalon.net \
    /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).