From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: [PATCH v2 03/15] examples/eventdev: add framework for caps based pipeline Date: Wed, 10 Jan 2018 16:40:01 +0530 Message-ID: <20180110111013.14644-3-pbhagavatula@caviumnetworks.com> References: <20171207203705.25020-1-pbhagavatula@caviumnetworks.com> <20180110111013.14644-1-pbhagavatula@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: dev@dpdk.org, Pavan Nikhilesh To: gage.eads@intel.com, jerin.jacobkollanukkaran@cavium.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, liang.j.ma@intel.com, santosh.shukla@caviumnetworks.com Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0057.outbound.protection.outlook.com [104.47.42.57]) by dpdk.org (Postfix) with ESMTP id 554A91B169 for ; Wed, 10 Jan 2018 12:10:46 +0100 (CET) In-Reply-To: <20180110111013.14644-1-pbhagavatula@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add framework to support capability based pipeline. Based on the capability of event device and probed ethernet devices the optimal pipeline configuration can be chosen. Signed-off-by: Pavan Nikhilesh --- examples/eventdev_pipeline_sw_pmd/pipeline_common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/examples/eventdev_pipeline_sw_pmd/pipeline_common.h b/examples/eventdev_pipeline_sw_pmd/pipeline_common.h index 1dbc01f16..00721ea94 100644 --- a/examples/eventdev_pipeline_sw_pmd/pipeline_common.h +++ b/examples/eventdev_pipeline_sw_pmd/pipeline_common.h @@ -34,6 +34,22 @@ struct worker_data { uint8_t port_id; } __rte_cache_aligned; +typedef int (*worker_loop)(void *); +typedef int (*consumer_loop)(void); +typedef void (*schedule_loop)(unsigned int); +typedef int (*eventdev_setup)(struct cons_data *, struct worker_data *); +typedef void (*rx_adapter_setup)(uint16_t nb_ports); +typedef void (*opt_check)(void); + +struct setup_data { + worker_loop worker; + consumer_loop consumer; + schedule_loop scheduler; + eventdev_setup evdev_setup; + rx_adapter_setup adptr_setup; + opt_check check_opt; +}; + struct fastpath_data { volatile int done; uint32_t tx_lock; @@ -47,6 +63,7 @@ struct fastpath_data { unsigned int sched_core[MAX_NUM_CORE]; unsigned int worker_core[MAX_NUM_CORE]; struct rte_eth_dev_tx_buffer *tx_buf[RTE_MAX_ETHPORTS]; + struct setup_data cap; } __rte_cache_aligned; struct config_data { -- 2.15.1