[dpdk-dev] [PATCH 01/27] eventdev: dlb upstream prerequisites

Jerin Jacob jerinjacobk at gmail.com
Tue Aug 11 19:44:01 CEST 2020


On Fri, Jul 31, 2020 at 1:23 AM McDaniel, Timothy
<timothy.mcdaniel at intel.com> wrote:
>
> From: "McDaniel, Timothy" <timothy.mcdaniel at intel.com>


Please change to "McDaniel Timothy <timothy.mcdaniel at intel.com>"

>
> The DLB hardware does not conform exactly to the eventdev interface.
> 1) It has a limit on the number of queues that may be linked to a port.
> 2) Some ports a further restricted to a maximum of 1 linked queue.
> 3) It does not (currently) have the ability to carry the flow_id as part
> of the event (QE) payload.
>
> Due to the above, we would like to propose the following enhancements.
>
> 1) Add new fields to the rte_event_dev_info struct. These fields allow
> the device to advertize its capabilities so that applications can take
> the appropriate actions based on those capabilities.
>
>     struct rte_event_dev_info {
>         uint32_t max_event_port_links;
>         /**< Maximum number of queues that can be linked to a single event
>          * port by this device.
>          */
>
>         uint8_t max_single_link_event_port_queue_pairs;
>         /**< Maximum number of event ports and queues that are optimized for
>          * (and only capable of) single-link configurations supported by this
>          * device. These ports and queues are not accounted for in
>          * max_event_ports or max_event_queues.
>          */
>     }
>
> 2) Add a new field to the rte_event_dev_config struct. This field allows
> the application to specify how many of its ports are limited to a single
> link, or will be used in single link mode.
>
>     /** Event device configuration structure */
>     struct rte_event_dev_config {
>         uint8_t nb_single_link_event_port_queues;
>         /**< Number of event ports and queues that will be singly-linked to
>          * each other. These are a subset of the overall event ports and
>          * queues; this value cannot exceed *nb_event_ports* or
>          * *nb_event_queues*. If the device has ports and queues that are
>          * optimized for single-link usage, this field is a hint for how many
>          * to allocate; otherwise, regular event ports and queues can be used.
>          */
>     }
>
> 3) Replace the dedicated implicit_release_disabled field with a bit field
> of explicit port capabilities. The implicit_release_disable functionality
> is assigned to one bit, and a port-is-single-link-only  attribute is
> assigned to other, with the remaining bits available for future assignment.
>
>         * Event port configuration bitmap flags */
>         #define RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL    (1ULL << 0)
>         /**< Configure the port not to release outstanding events in
>          * rte_event_dev_dequeue_burst(). If set, all events received through
>          * the port must be explicitly released with RTE_EVENT_OP_RELEASE or
>          * RTE_EVENT_OP_FORWARD. Must be unset if the device is not
>          * RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE capable.
>          */
>         #define RTE_EVENT_PORT_CFG_SINGLE_LINK         (1ULL << 1)
>
>         /**< This event port links only to a single event queue.
>          *
>          *  @see rte_event_port_setup(), rte_event_port_link()
>          */
>
>         #define RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE 3
>         /**
>          * The implicit release disable attribute of the port
>          */
>
>         struct rte_event_port_conf {
>                 uint32_t event_port_cfg; /**< Port cfg flags(EVENT_PORT_CFG_) */
>         }
>
> 4) Add UMWAIT/UMONITOR bit to rte_cpuflags
>
> 5) Added a new API that is useful for probing PCI devices.
>
>         /**
>          * @internal
>          * Wrapper for use by pci drivers as a .probe function to attach to a event
>          * interface.  Same as rte_event_pmd_pci_probe, except caller can specify
>          * the name.
>          */
>         static inline int
>         rte_event_pmd_pci_probe_named(struct rte_pci_driver *pci_drv,
>                                     struct rte_pci_device *pci_dev,
>                                     size_t private_data_size,
>                                     eventdev_pmd_pci_callback_t devinit,
>                                     const char *name);

Please sanitize the commit log.


>
> Signed-off-by: McDaniel, Timothy <timothy.mcdaniel at intel.com>
> ---
>  app/test-eventdev/evt_common.h                     |   11 ++++
>  app/test-eventdev/test_order_atq.c                 |   30 +++++++--
>  app/test-eventdev/test_order_common.c              |    5 +-
>  app/test-eventdev/test_order_queue.c               |   31 +++++++--
>  app/test/test_eventdev.c                           |    4 +-

Changes for example app and test-event to separate commit.
ie.
1) First patch to introduce API change and add capabalitly for existing drivers,
2) Add example app and test-event app change as next commit.


>  drivers/event/dpaa/dpaa_eventdev.c                 |    3 +-
>  drivers/event/dpaa2/dpaa2_eventdev.c               |    5 +-
>  drivers/event/dsw/dsw_evdev.c                      |    3 +-
>  drivers/event/octeontx/ssovf_evdev.c               |    5 +-
>  drivers/event/octeontx2/otx2_evdev.c               |    3 +-
>  drivers/event/opdl/opdl_evdev.c                    |    3 +-
>  drivers/event/skeleton/skeleton_eventdev.c         |    5 +-
>  drivers/event/sw/sw_evdev.c                        |    8 ++-
>  drivers/event/sw/sw_evdev_selftest.c               |    6 +-
>  .../eventdev_pipeline/pipeline_worker_generic.c    |    6 +-
>  examples/eventdev_pipeline/pipeline_worker_tx.c    |    1 +
>  examples/l2fwd-event/l2fwd_event_generic.c         |    5 +-
>  examples/l2fwd-event/l2fwd_event_internal_port.c   |    5 +-
>  examples/l3fwd/l3fwd_event_generic.c               |    5 +-
>  examples/l3fwd/l3fwd_event_internal_port.c         |    5 +-
>  lib/librte_eal/x86/include/rte_cpuflags.h          |    1 +
>  lib/librte_eal/x86/rte_cpuflags.c                  |    1 +

Found an EAL change, Please make a separate patch for EAL change
addressing master repo.
And make that patch depended on this series.

>  lib/librte_eventdev/meson.build                    |    1 +
>  lib/librte_eventdev/rte_event_eth_tx_adapter.c     |    2 +-
>  lib/librte_eventdev/rte_eventdev.c                 |   67 +++++++++++++++++---
>  lib/librte_eventdev/rte_eventdev.h                 |   51 ++++++++++++---
>  lib/librte_eventdev/rte_eventdev_pmd_pci.h         |   54 ++++++++++++++++
>  lib/librte_eventdev/rte_eventdev_version.map       |    4 +-
>  28 files changed, 268 insertions(+), 62 deletions(-)

> +/**
> + * @internal
> + * Wrapper for use by pci drivers as a .probe function to attach to a event
> + * interface.  Same as rte_event_pmd_pci_probe, except caller can specify
> + * the name.
> + */
> +static inline int
> +rte_event_pmd_pci_probe_named(struct rte_pci_driver *pci_drv,
> +                           struct rte_pci_device *pci_dev,
> +                           size_t private_data_size,
> +                           eventdev_pmd_pci_callback_t devinit,
> +                           const char *name)

Please make this function as a separate patch.

> +{
> +       struct rte_eventdev *eventdev;
> +
> +       int retval;
> +
> +       if (devinit == NULL)
> +               return -EINVAL;
> +
> +       eventdev = rte_event_pmd_allocate(name,
> +                        pci_dev->device.numa_node);
> +       if (eventdev == NULL)
> +               return -ENOMEM;
> +
> +       if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
> +               eventdev->data->dev_private =
> +                               rte_zmalloc_socket(
> +                                               "eventdev private structure",
> +                                               private_data_size,
> +                                               RTE_CACHE_LINE_SIZE,
> +                                               rte_socket_id());
> +
> +               if (eventdev->data->dev_private == NULL)
> +                       rte_panic("Cannot allocate memzone for private "
> +                                       "device data");
> +       }
> +
> +       eventdev->dev = &pci_dev->device;
> +
> +       /* Invoke PMD device initialization function */
> +       retval = devinit(eventdev);
> +       if (retval == 0)
> +               return 0;
> +
> +       RTE_EDEV_LOG_ERR("driver %s: (vendor_id=0x%x device_id=0x%x)"
> +                       " failed", pci_drv->driver.name,
> +                       (unsigned int) pci_dev->id.vendor_id,
> +                       (unsigned int) pci_dev->id.device_id);
> +
> +       rte_event_pmd_release(eventdev);
> +
> +       return -ENXIO;
> +}
>
>  /**
>   * @internal
> diff --git a/lib/librte_eventdev/rte_eventdev_version.map b/lib/librte_eventdev/rte_eventdev_version.map
> index 91a62cd..de197dd 100644
> --- a/lib/librte_eventdev/rte_eventdev_version.map
> +++ b/lib/librte_eventdev/rte_eventdev_version.map
> @@ -100,7 +100,6 @@ EXPERIMENTAL {
>         # added in 20.05
>         __rte_eventdev_trace_configure;
>         __rte_eventdev_trace_queue_setup;
> -       __rte_eventdev_trace_port_setup;
>         __rte_eventdev_trace_port_link;
>         __rte_eventdev_trace_port_unlink;
>         __rte_eventdev_trace_start;
> @@ -134,4 +133,7 @@ EXPERIMENTAL {
>         __rte_eventdev_trace_crypto_adapter_queue_pair_del;
>         __rte_eventdev_trace_crypto_adapter_start;
>         __rte_eventdev_trace_crypto_adapter_stop;
> +
> +       # changed in 20.08

Fix up version numbers.


> +       __rte_eventdev_trace_port_setup;
>  };
> --
> 1.7.10
>


More information about the dev mailing list