From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH 2/4] eventdev: add caps API and PMD callbacks for eth Tx adapter Date: Tue, 10 Jul 2018 16:26:45 +0530 Message-ID: <20180710105644.GA6792@ltp-pvn> References: <1530859329-160189-1-git-send-email-nikhil.rao@intel.com> <1530859329-160189-2-git-send-email-nikhil.rao@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Nikhil Rao , jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com Return-path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0052.outbound.protection.outlook.com [104.47.32.52]) by dpdk.org (Postfix) with ESMTP id D49E37EC7 for ; Tue, 10 Jul 2018 12:57:07 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1530859329-160189-2-git-send-email-nikhil.rao@intel.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" Hi Nikhil, On Fri, Jul 06, 2018 at 12:12:07PM +0530, Nikhil Rao wrote: > The caps API allows the application to query if the transmit > stage is implemented in the eventdev PMD or uses the common > rte_service function. The PMD callbacks support the > eventdev PMD implementation of the adapter. > > Signed-off-by: Nikhil Rao > --- > lib/librte_eventdev/rte_eventdev.h | 30 ++++- > lib/librte_eventdev/rte_eventdev_pmd.h | 193 +++++++++++++++++++++++++++++++++ > lib/librte_eventdev/rte_eventdev.c | 19 ++++ > 3 files changed, 241 insertions(+), 1 deletion(-) > <...> > > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c > index 801810e..a29fae1 100644 > --- a/lib/librte_eventdev/rte_eventdev.c > +++ b/lib/librte_eventdev/rte_eventdev.c > @@ -175,6 +175,25 @@ > (dev, cdev, caps) : -ENOTSUP; > } > > +int __rte_experimental > +rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint32_t *caps) > +{ The caps get API needs to be similar to rx adapter caps get i.e. it needs to have the eth_port_id as a parameter so that the underlying event dev driver can expose INTERNAL PORT capability as not all ethdev drivers have the capability to interact with the eventdevs internal port. rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps); > + struct rte_eventdev *dev; > + > + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > + > + dev = &rte_eventdevs[dev_id]; > + > + if (caps == NULL) > + return -EINVAL; > + *caps = 0; > + > + return dev->dev_ops->eth_tx_adapter_caps_get ? > + (*dev->dev_ops->eth_tx_adapter_caps_get)(dev, > + caps) > + : 0; > +} > + > static inline int > rte_event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues) > { > -- > 1.8.3.1 > Thanks, Pavan.