From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DDC14A04DE; Tue, 11 Aug 2020 19:44:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F02291C022; Tue, 11 Aug 2020 19:44:20 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id C0F431C002 for ; Tue, 11 Aug 2020 19:44:19 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id b17so6126507ion.7 for ; Tue, 11 Aug 2020 10:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x4Sa/oKpPNXXYbDmB/M8Hmz1E+1UoU4MmvxqDqCvlSk=; b=VQV8DWCM9Vs6c+UedRFk8v2U/qfX2BxfjWCEi3mfVPDZLYHO8KhnXgJVtEm2kMGcXv TWVYMVDDDhEOeuucxPL70tNrAbov2rD114jEtrUgNbM94bDDWFcfbFeHjxCWwobMOvbL pE8IWAsnHwvjSlET6y8QKqWhJVf3n7yoEsAbOr5f1h/cLnlE72OQLxFiL3M3mqVWQlBC FSpz/kY0rZCZktrKrloxoGvWfRcR5pPb2GNgD7us7dvHFwWmFzaSADjHl/gV2B0LHjJW iLnknS5MlNCX6/PXrrfJB9kpE1p4dCqdRk3mthdCOmegHNBUqoXviOYAuH3QqpEH+p8k U6Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x4Sa/oKpPNXXYbDmB/M8Hmz1E+1UoU4MmvxqDqCvlSk=; b=sP/Q7RxrcQYRhWqa04ESFpsJu2UiKeKVJ5jDtvrRtnh1HX1b6MawMLFX2V3Ym2IJXt KQXWySTyya83GRsF3xRUzz0pI5GxsEQQThV0QroEnjPktUi3dO4YAJJnAnHE8NR+vIwj PE3SjBURZcMwjlmuk/sx8yB9VXi/TGBMMd2rnaCZGcnwCv4Xh2yaxKk+pdNVPQ/L4nDa Dym5T9GvZay2vlTr09YpYkqGQ3QlM5HGwPGvHUyOsvIQGPKclYx1bXmhCN9PlnihKsLh GI2+q5QYravyoJNk6+EHE1qkjMDmEPt+hfKtoZxvpPwpaH1bnMOVo1fHeqnqQ4VSup42 QGLg== X-Gm-Message-State: AOAM530wpL9kornKJtG8+6pTYHuAlMaFhenSzNXXUfLiIGR1o+JmvbAm rP1uBW4tByFn1aF1Imc338kd4vbbZA+EiX2U7oE= X-Google-Smtp-Source: ABdhPJwMX3iTuv1ztUrPMkhSpz0viMN0Q0yx6iid1Zmg4+im3nvKxULJ2DueEhRO6PH7WSA6E1O/7mAT9yHPZ91OxFY= X-Received: by 2002:a6b:e40b:: with SMTP id u11mr24834503iog.123.1597167858837; Tue, 11 Aug 2020 10:44:18 -0700 (PDT) MIME-Version: 1.0 References: <1593232671-5690-0-git-send-email-timothy.mcdaniel@intel.com> <1596138614-17409-1-git-send-email-timothy.mcdaniel@intel.com> <1596138614-17409-2-git-send-email-timothy.mcdaniel@intel.com> In-Reply-To: <1596138614-17409-2-git-send-email-timothy.mcdaniel@intel.com> From: Jerin Jacob Date: Tue, 11 Aug 2020 23:14:01 +0530 Message-ID: To: "McDaniel, Timothy" Cc: Jerin Jacob , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , dpdk-dev , Gage Eads , "Van Haaren, Harry" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 01/27] eventdev: dlb upstream prerequisites X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jul 31, 2020 at 1:23 AM McDaniel, Timothy wrote: > > From: "McDaniel, Timothy" Please change to "McDaniel Timothy " > > 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 > --- > 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 >