DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nikhil Rao <nikhil.rao@intel.com>
To: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com
Cc: 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,
	Nikhil Rao <nikhil.rao@intel.com>
Subject: [dpdk-dev] [PATCH v3 2/4] eventdev: Add eth Rx adapter caps callback to SW evdev
Date: Tue, 12 Sep 2017 17:59:27 +0530	[thread overview]
Message-ID: <1505219369-2493-3-git-send-email-nikhil.rao@intel.com> (raw)
In-Reply-To: <1505219369-2493-1-git-send-email-nikhil.rao@intel.com>

The SW event device always uses a EAL service function for packet
transfer from the eth device to the event device, this function is
capable of generating a event flow ID which is the IPv4/6 RSS hash.

The caps function returns RTE_EVENT_ETH_RX_ADAPTER_SW_CAP which is
currently set to RTE_EVENT_ETH_RX_ADAPTER_CAP_FLOW_ID.

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
---
 lib/librte_eventdev/rte_eventdev_pmd.h |  6 ++++++
 drivers/event/sw/sw_evdev.c            | 13 +++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 4cc9671..3cbc063 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -83,6 +83,12 @@ extern "C" {
 	} \
 } while (0)
 
+#define RTE_EVENT_ETH_RX_ADAPTER_SW_CAP \
+		RTE_EVENT_ETH_RX_ADAPTER_CAP_FLOW_ID
+/**< Ethernet Rx adapter cap to return If the packet transfers from
+ * the ethdev to eventdev use a SW service function
+ */
+
 #define RTE_EVENTDEV_DETACHED  (0)
 #define RTE_EVENTDEV_ATTACHED  (1)
 
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index da6ac30..1344c17 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -437,6 +437,17 @@ sw_dev_configure(const struct rte_eventdev *dev)
 	return 0;
 }
 
+static int
+sw_eth_rx_adapter_caps_get(const struct rte_eventdev *dev,
+			uint8_t eth_port_id,
+			uint32_t *caps)
+{
+	RTE_SET_USED(dev);
+	RTE_SET_USED(eth_port_id);
+	*caps = RTE_EVENT_ETH_RX_ADAPTER_SW_CAP;
+	return 0;
+}
+
 static void
 sw_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
 {
@@ -751,6 +762,8 @@ sw_probe(struct rte_vdev_device *vdev)
 			.port_link = sw_port_link,
 			.port_unlink = sw_port_unlink,
 
+			.eth_rx_adapter_caps_get = sw_eth_rx_adapter_caps_get,
+
 			.xstats_get = sw_xstats_get,
 			.xstats_get_names = sw_xstats_get_names,
 			.xstats_get_by_name = sw_xstats_get_by_name,
-- 
2.7.4

  parent reply	other threads:[~2017-09-12  3:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 12:29 [dpdk-dev] [PATCH v3 0/4] eventdev: cover letter: ethernet Rx queue event adapter Nikhil Rao
2017-09-12 12:29 ` [dpdk-dev] [PATCH v3 1/4] eventdev: Add caps API and PMD callbacks for rte_event_eth_rx_adapter Nikhil Rao
2017-09-12 12:29 ` Nikhil Rao [this message]
2017-09-13 13:36   ` [dpdk-dev] [PATCH v3 2/4] eventdev: Add eth Rx adapter caps callback to SW evdev Nipun Gupta
2017-09-14  3:04     ` Rao, Nikhil
2017-09-14  4:37       ` Nipun Gupta
2017-09-12 12:29 ` [dpdk-dev] [PATCH v3 3/4] eventdev: Add eventdev ethernet Rx adapter Nikhil Rao
2017-09-12  4:17   ` Jerin Jacob
2017-09-13  9:41     ` Rao, Nikhil
2017-09-13 18:53       ` [dpdk-dev] [PATCH " Nikhil Rao
2017-09-15  6:07         ` Nipun Gupta
2017-09-18  4:54           ` Rao, Nikhil
2017-09-15  6:10         ` santosh
2017-09-15 11:10           ` Rao, Nikhil
2017-09-15 14:26             ` santosh
2017-09-18 15:36         ` Van Haaren, Harry
2017-09-19 15:25           ` Rao, Nikhil
2017-09-12 12:29 ` [dpdk-dev] [PATCH v3 4/4] eventdev: Add tests for event eth Rx adapter APIs Nikhil Rao
2017-09-15  6:07   ` santosh
2017-09-18 15:40   ` Van Haaren, Harry
2017-09-21 12:36 ` [dpdk-dev] [PATCH v3 0/4] eventdev: cover letter: ethernet Rx queue event adapter Jerin Jacob

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=1505219369-2493-3-git-send-email-nikhil.rao@intel.com \
    --to=nikhil.rao@intel.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=jerin.jacob@caviumnetworks.com \
    --cc=narender.vangati@intel.com \
    --cc=nipun.gupta@nxp.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).