From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 952CE1AF03 for ; Tue, 12 Sep 2017 05:52:56 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 11 Sep 2017 20:52:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,381,1500966000"; d="scan'208";a="134302217" Received: from unknown (HELO localhost.iind.intel.com) ([10.224.122.216]) by orsmga002.jf.intel.com with ESMTP; 11 Sep 2017 20:52:52 -0700 From: Nikhil Rao 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 Date: Tue, 12 Sep 2017 17:59:27 +0530 Message-Id: <1505219369-2493-3-git-send-email-nikhil.rao@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505219369-2493-1-git-send-email-nikhil.rao@intel.com> References: <1505219369-2493-1-git-send-email-nikhil.rao@intel.com> Subject: [dpdk-dev] [PATCH v3 2/4] eventdev: Add eth Rx adapter caps callback to SW evdev X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2017 03:52:58 -0000 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 --- 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