X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fprog_guide%2Fevent_ethernet_rx_adapter.rst;h=8b58130fc5cfc8fd41a195ced8d1ef6ad613b31c;hb=b54403fd08374dae243bf0a0e90488f51485154e;hp=c01e5a9666e9149fe21f5bbc4f732aebf31a0c2f;hpb=d7c428e557ba7f3ae9faead473cadd735ee30e9c;p=dpdk.git diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst index c01e5a9666..8b58130fc5 100644 --- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst +++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst @@ -62,6 +62,15 @@ service function and needs to create an event port for it. The callback is expected to fill the ``struct rte_event_eth_rx_adapter_conf structure`` passed to it. +If the application desires to control the event buffer size at adapter level, +it can use the ``rte_event_eth_rx_adapter_create_with_params()`` api. The event +buffer size is specified using ``struct rte_event_eth_rx_adapter_params:: +event_buf_size``. To configure the event buffer size at queue level, the boolean +flag ``struct rte_event_eth_rx_adapter_params::use_queue_event_buf`` need to be +set to true. The 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. + Adding Rx Queues to the Adapter Instance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -72,7 +81,9 @@ parameter. Event information for packets from this Rx queue is encoded in the ``ev`` field of ``struct rte_event_eth_rx_adapter_queue_conf``. The servicing_weight member of the struct rte_event_eth_rx_adapter_queue_conf is the relative polling frequency of the Rx queue and is applicable when the -adapter uses a service core function. +adapter uses a service core function. The applications can configure queue +event buffer size in ``struct rte_event_eth_rx_adapter_queue_conf::event_buf_size`` +parameter. .. code-block:: c @@ -83,6 +94,7 @@ adapter uses a service core function. queue_config.rx_queue_flags = 0; queue_config.ev = ev; queue_config.servicing_weight = 1; + queue_config.event_buf_size = 1024; err = rte_event_eth_rx_adapter_queue_add(id, eth_dev_id, @@ -146,6 +158,14 @@ if the callback is supported, and the counts maintained by the service function, if one exists. The service function also maintains a count of cycles for which it was not able to enqueue to the event device. +Getting Adapter queue config +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``rte_event_eth_rx_adapter_queue_conf_get()`` function reports +flags for handling received packets, event queue identifier, scheduler type, +event priority, polling frequency of the receive queue and flow identifier +in struct ``rte_event_eth_rx_adapter_queue_conf``. + Interrupt Based Rx Queues ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -195,12 +215,17 @@ The event devices, ethernet device pairs which support the capability flow characteristics and generate a ``rte_event`` containing ``rte_event_vector`` whose event type is either ``RTE_EVENT_TYPE_ETHDEV_VECTOR`` or ``RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR``. -The aggregation size and timeout are configurable at a queue level and the -maximum, minimum vector sizes and timeouts vary based on the device capability -and can be queried using ``rte_event_eth_rx_adapter_vector_limits_get``. +The maximum, minimum vector sizes and timeouts vary based on the device +capability and can be queried using +``rte_event_eth_rx_adapter_vector_limits_get``. The Rx adapter additionally might include useful data such as ethernet device port and queue identifier in the ``rte_event_vector::port`` and ``rte_event_vector::queue`` and mark ``rte_event_vector::attr_valid`` as true. +The aggregation size and timeout are configurable at a queue level by setting +``rte_event_eth_rx_adapter_queue_conf::vector_sz``, +``rte_event_eth_rx_adapter_queue_conf::vector_timeout_ns`` and +``rte_event_eth_rx_adapter_queue_conf::vector_mp`` when adding queues using +``rte_event_eth_rx_adapter_queue_add``. A loop processing ``rte_event_vector`` containing mbufs is shown below.