-----Original Message----- > Date: Fri, 31 Aug 2018 11:11:09 +0530 > From: Nikhil Rao <nikhil....@intel.com> > To: jerin.ja...@caviumnetworks.com, olivier.m...@6wind.com > CC: dev@dpdk.org, Nikhil Rao <nikhil....@intel.com> > 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 <nikhil....@intel.com> > ---
+ john.mcnam...@intel.com, marko.kovace...@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 <jerin.ja...@caviumnetworks.com>