From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v3 5/5] doc: add event eth Tx adapter guide Date: Mon, 17 Sep 2018 19:26:10 +0530 Message-ID: <20180917135609.GA9150@jerin> References: <1534479652-80182-1-git-send-email-nikhil.rao@intel.com> <1535694069-88757-1-git-send-email-nikhil.rao@intel.com> <1535694069-88757-5-git-send-email-nikhil.rao@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: olivier.matz@6wind.com, dev@dpdk.org, marko.kovacevic@intel.com, john.mcnamara@intel.com To: Nikhil Rao Return-path: Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680078.outbound.protection.outlook.com [40.107.68.78]) by dpdk.org (Postfix) with ESMTP id 853451ADD3 for ; Mon, 17 Sep 2018 15:56:27 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1535694069-88757-5-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" -----Original Message----- > Date: Fri, 31 Aug 2018 11:11:09 +0530 > From: Nikhil Rao > To: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com > CC: dev@dpdk.org, Nikhil Rao > Subject: [PATCH v3 5/5] doc: add event eth Tx adapter guide > X-Mailer: git-send-email 1.8.3.1 > > > Add programmer's guide doc to explain the use of the > Event Ethernet Tx Adapter library. > > Signed-off-by: Nikhil Rao > --- + john.mcnamara@intel.com, marko.kovacevic@intel.com > +++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst > @@ -0,0 +1,165 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright(c) 2017 Intel Corporation. > + > + > +Creating an Adapter Instance > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +An adapter instance is created using ``rte_event_eth_tx_adapter_create()``. This > +function is passed the event device to be associated with the adapter and port > +configuration for the adapter to setup an event port if the adapter needs to use > +a service function. > + > +If the application desires to have finer control of eventdev port configuration, > +it can use the ``rte_event_eth_tx_adapter_create_ext()`` function. The > +``rte_event_eth_tx_adapter_create_ext()`` function is passed a callback function. > +The callback function is invoked if the adapter needs to use a service function > +and needs to create an event port for it. The callback is expected to fill the > +``struct rte_event_eth_tx_adapter_confi`` structure passed to it. s/rte_event_eth_tx_adapter_confi/rte_event_eth_tx_adapter_conf/ > + > +.. code-block:: c > + > + struct rte_event_dev_info dev_info; > + struct rte_event_port_conf tx_p_conf = {0}; > + > + err = rte_event_dev_info_get(id, &dev_info); > + > + tx_p_conf.new_event_threshold = dev_info.max_num_events; > + tx_p_conf.dequeue_depth = dev_info.max_event_port_dequeue_depth; > + tx_p_conf.enqueue_depth = dev_info.max_event_port_enqueue_depth; > + > + err = rte_event_eth_tx_adapter_create(id, dev_id, &tx_p_conf); > + > + > +Querying Adapter Capabilities > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +The ``rte_event_eth_tx_adapter_caps_get()`` function allows > +the application to query the adapter capabilities for an eventdev and ethdev > +combination. Currently, the only capability flag defined is > +``RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT``, the application can > +query this flag to determine if a service function is associated with the > +adapter and retrieve its service identifier using the > +``rte_event_eth_tx_adapter_service_id_get()`` API. > + > + > +.. code-block:: c > + > + int err = rte_event_eth_tx_adapter_caps_get(dev_id, eth_dev_id, &cap); > + > + if (cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT) Shouldn't it be, if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) ie. rte_event_eth_tx_adapter_service_id_get valid only when cap is !RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT > + err = rte_event_eth_tx_adapter_service_id_get(id, &service_id); > + > + > +Enqueueing Packets to the Adapter s/Enqueueing/Enqueuing ?? > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + With above change it looks good to me. Acked-by: Jerin Jacob