[RFC PATCH] eventdev: introduce DMA event adapter library

2023-07-24 Thread Amit Prakash Shukla
Introduce event DMA adapter APIs. This patch provides information
on adapter modes and usage. Application can use this event adapter
interface to transfer packets between DMA device and event device.

Signed-off-by: Amit Prakash Shukla 
---
 doc/api/doxy-api-index.md |1 +
 doc/guides/eventdevs/features/default.ini |8 +
 doc/guides/prog_guide/event_dma_adapter.rst   |  268 
 doc/guides/prog_guide/eventdev.rst|8 +-
 .../img/event_dma_adapter_op_forward.svg  | 1086 +
 .../img/event_dma_adapter_op_new.svg  | 1079 
 doc/guides/prog_guide/index.rst   |1 +
 lib/eventdev/eventdev_pmd.h   |  171 ++-
 lib/eventdev/eventdev_private.c   |   10 +
 lib/eventdev/rte_event_dma_adapter.h  |  575 +
 lib/eventdev/rte_eventdev.h   |   45 +
 lib/eventdev/rte_eventdev_core.h  |8 +-
 lib/eventdev/version.map  |9 +
 13 files changed, 3264 insertions(+), 5 deletions(-)
 create mode 100644 doc/guides/prog_guide/event_dma_adapter.rst
 create mode 100644 doc/guides/prog_guide/img/event_dma_adapter_op_forward.svg
 create mode 100644 doc/guides/prog_guide/img/event_dma_adapter_op_new.svg
 create mode 100644 lib/eventdev/rte_event_dma_adapter.h

diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 8673b2bc61..c76354864f 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -29,6 +29,7 @@ The public API headers are grouped by topics:
   [event_eth_tx_adapter](@ref rte_event_eth_tx_adapter.h),
   [event_timer_adapter](@ref rte_event_timer_adapter.h),
   [event_crypto_adapter](@ref rte_event_crypto_adapter.h),
+  [event_dma_adapter](@ref rte_event_dma_adapter.h),
   [rawdev](@ref rte_rawdev.h),
   [metrics](@ref rte_metrics.h),
   [bitrate](@ref rte_bitrate.h),
diff --git a/doc/guides/eventdevs/features/default.ini 
b/doc/guides/eventdevs/features/default.ini
index 00360f60c6..fda8baf487 100644
--- a/doc/guides/eventdevs/features/default.ini
+++ b/doc/guides/eventdevs/features/default.ini
@@ -44,6 +44,14 @@ internal_port_op_fwd   =
 internal_port_qp_ev_bind   =
 session_private_data   =
 
+;
+; Features of a default DMA adapter.
+;
+[DMA adapter Features]
+internal_port_op_new   =
+internal_port_op_fwd   =
+internal_port_qp_ev_bind   =
+
 ;
 ; Features of a default Timer adapter.
 ;
diff --git a/doc/guides/prog_guide/event_dma_adapter.rst 
b/doc/guides/prog_guide/event_dma_adapter.rst
new file mode 100644
index 00..adc9b474d8
--- /dev/null
+++ b/doc/guides/prog_guide/event_dma_adapter.rst
@@ -0,0 +1,268 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+Copyright (c) 2023 Marvell.
+
+Event DMA Adapter Library
+=
+
+DPDK :doc:`Eventdev library ` provides event driven programming 
model with features
+to schedule events. :doc:`DMA Device library ` provides an interface 
to DMA poll mode
+drivers that support DMA inference operations. Event DMA Adapter is intended 
to bridge between
+the event device and the DMA device.
+
+Packet flow from DMA device to the event device can be accomplished using 
software and hardware
+based transfer mechanisms. The adapter queries an eventdev PMD to determine 
which mechanism to
+be used. The adapter uses an EAL service core function for software based 
packet transfer and
+uses the eventdev PMD functions to configure hardware based packet transfer 
between DMA device
+and the event device. DMA adapter uses a new event type called 
``RTE_EVENT_TYPE_DMADEV`` to
+indicate the source of event.
+
+Application can choose to submit an DMA operation directly to an DMA device or 
send it to an DMA
+adapter via eventdev based on RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 
capability. The
+first mode is known as the event new (RTE_EVENT_DMA_ADAPTER_OP_NEW) mode and 
the second as the
+event forward (RTE_EVENT_DMA_ADAPTER_OP_FORWARD) mode. Choice of mode can be 
specified while
+creating the adapter. In the former mode, it is the application's 
responsibility to enable
+ingress packet ordering. In the latter mode, it is the adapter's 
responsibility to enable
+ingress packet ordering.
+
+
+Adapter Modes
+-
+
+RTE_EVENT_DMA_ADAPTER_OP_NEW mode
+~
+
+In the RTE_EVENT_DMA_ADAPTER_OP_NEW mode, application submits DMA operations 
directly to an DMA
+device. The adapter then dequeues DMA completions from the DMA device and 
enqueues them as events
+to the event device. This mode does not ensure ingress ordering as the 
application directly
+enqueues to the dmadev without going through DMA/atomic stage. In this mode, 
events dequeued
+from the adapter are treated as new events. The application has to specify 
event information
+(response information) which is needed to enqueue an event after the DMA 
operation is completed.
+
+.. _figure_event_dma_adapter_op_new:
+
+.. figure:: img/ev

[PATCH] event/cnxk: fix incorrect getwork devargs parsing

2023-07-24 Thread pbhagavatula
From: Pavan Nikhilesh 

CN10K can support up to three types of getwork, use parse value
function to parse the device arguments.

Fixes: 5fb651552c79 ("event/cnxk: fix SSO and TIM argument parsing")
Cc: sta...@dpdk.org

Signed-off-by: Pavan Nikhilesh 
---
 drivers/event/cnxk/cnxk_eventdev.c | 2 +-
 drivers/event/cnxk/cnxk_eventdev.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/event/cnxk/cnxk_eventdev.c 
b/drivers/event/cnxk/cnxk_eventdev.c
index 27883a3619..9c9192bd40 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -612,7 +612,7 @@ cnxk_sso_parse_devargs(struct cnxk_sso_evdev *dev, struct 
rte_devargs *devargs)
   &dev->force_ena_bp);
rte_kvargs_process(kvlist, CN9K_SSO_SINGLE_WS, &parse_kvargs_flag,
   &single_ws);
-   rte_kvargs_process(kvlist, CN10K_SSO_GW_MODE, &parse_kvargs_flag,
+   rte_kvargs_process(kvlist, CN10K_SSO_GW_MODE, &parse_kvargs_value,
   &dev->gw_mode);
rte_kvargs_process(kvlist, CN10K_SSO_STASH,
   &parse_sso_kvargs_stash_dict, dev);
diff --git a/drivers/event/cnxk/cnxk_eventdev.h 
b/drivers/event/cnxk/cnxk_eventdev.h
index 962e630256..9d95092669 100644
--- a/drivers/event/cnxk/cnxk_eventdev.h
+++ b/drivers/event/cnxk/cnxk_eventdev.h
@@ -119,7 +119,7 @@ struct cnxk_sso_evdev {
/* CN9K */
uint8_t dual_ws;
/* CN10K */
-   uint8_t gw_mode;
+   uint32_t gw_mode;
uint16_t stash_cnt;
struct cnxk_sso_stash *stash_parse_data;
 } __rte_cache_aligned;
-- 
2.25.1



[PATCH] event/cnxk: add asm to support CASP for clang

2023-07-24 Thread pbhagavatula
From: Pavan Nikhilesh 

Clang fails to use register pairs for CASP instruction, use
inline asm to fix register pairs.

Signed-off-by: Pavan Nikhilesh 
---
 drivers/event/cnxk/cn10k_worker.h | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/event/cnxk/cn10k_worker.h 
b/drivers/event/cnxk/cn10k_worker.h
index b4ee023723..e71ab3c523 100644
--- a/drivers/event/cnxk/cn10k_worker.h
+++ b/drivers/event/cnxk/cn10k_worker.h
@@ -239,19 +239,32 @@ cn10k_sso_hws_get_work(struct cn10k_sso_hws *ws, struct 
rte_event *ev,
} gw;
 
gw.get_work = ws->gw_wdata;
-#if defined(RTE_ARCH_ARM64) && !defined(__clang__)
+#if defined(RTE_ARCH_ARM64)
+#if !defined(__clang__)
asm volatile(
PLT_CPU_FEATURE_PREAMBLE
"caspal %[wdata], %H[wdata], %[wdata], %H[wdata], [%[gw_loc]]\n"
: [wdata] "+r"(gw.get_work)
: [gw_loc] "r"(ws->base + SSOW_LF_GWS_OP_GET_WORK0)
: "memory");
+#else
+   register uint64_t x0 __asm("x0") = (uint64_t)gw.u64[0];
+   register uint64_t x1 __asm("x1") = (uint64_t)gw.u64[1];
+   asm volatile(".arch armv8-a+lse\n"
+"caspal %[x0], %[x1], %[x0], %[x1], [%[dst]]\n"
+: [x0] "+r"(x0), [x1] "+r"(x1)
+: [dst] "r"(ws->base + SSOW_LF_GWS_OP_GET_WORK0)
+: "memory");
+   gw.u64[0] = x0;
+   gw.u64[1] = x1;
+#endif
 #else
plt_write64(gw.u64[0], ws->base + SSOW_LF_GWS_OP_GET_WORK0);
do {
roc_load_pair(gw.u64[0], gw.u64[1],
  ws->base + SSOW_LF_GWS_WQE0);
} while (gw.u64[0] & BIT_ULL(63));
+   rte_atomic_thread_fence(__ATOMIC_SEQ_CST);
 #endif
ws->gw_rdata = gw.u64[0];
if (gw.u64[1])
-- 
2.25.1



Re: [PATCH] mailmap: update contributor entry

2023-07-24 Thread Thomas Monjalon
24/07/2023 13:12, Andy Moreton:
> On 22/07/2023 10:21, Thomas Monjalon wrote:
> > We did not hear about Andy.
> > 
> > It's probably better to update within his next patch.
> 
> Hi Thomas,
> 
> I review patches to the sfc PMD as a maintainer of the base library 
> (drivers/common/sfc_efx), but have not yet contributed other patches to DPDK. 
> Ivan's mailmap patch has the right addresses for me.

Other addresses are not working anymore?
If it's not urgent it can be updated inside a real patch.





[PATCH] rawdev: fix device naming

2023-07-24 Thread Tomasz Duszynski
Use proper naming when dealing with a raw device.

Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
Cc: shreyansh.j...@nxp.com
Cc: sta...@dpdk.org

Signed-off-by: Tomasz Duszynski 
---
 lib/rawdev/rte_rawdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index dacaa60e22..474bdc9540 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -505,8 +505,7 @@ rte_rawdev_pmd_allocate(const char *name, size_t 
dev_priv_size, int socket_id)
uint16_t dev_id;
 
if (rte_rawdev_pmd_get_named_dev(name) != NULL) {
-   RTE_RDEV_ERR("Event device with name %s already allocated!",
-name);
+   RTE_RDEV_ERR("Raw device with name %s already allocated!", 
name);
return NULL;
}
 
-- 
2.34.1



RE: [PATCH] rawdev: fix device naming

2023-07-24 Thread Hemant Agrawal
Acked-by: Hemant Agrawal 

> -Original Message-
> From: Tomasz Duszynski 
> Sent: Monday, July 24, 2023 7:07 PM
> To: dev@dpdk.org; Sachin Saxena ; Hemant
> Agrawal ; Shreyansh Jain
> 
> Cc: jer...@marvell.com; tho...@monjalon.net; Tomasz Duszynski
> ; sta...@dpdk.org
> Subject: [PATCH] rawdev: fix device naming
> Importance: High
> 
> Use proper naming when dealing with a raw device.
> 
> Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
> Cc: shreyansh.j...@nxp.com
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Tomasz Duszynski 
> ---
>  lib/rawdev/rte_rawdev.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c index
> dacaa60e22..474bdc9540 100644
> --- a/lib/rawdev/rte_rawdev.c
> +++ b/lib/rawdev/rte_rawdev.c
> @@ -505,8 +505,7 @@ rte_rawdev_pmd_allocate(const char *name, size_t
> dev_priv_size, int socket_id)
>   uint16_t dev_id;
> 
>   if (rte_rawdev_pmd_get_named_dev(name) != NULL) {
> - RTE_RDEV_ERR("Event device with name %s already
> allocated!",
> -  name);
> + RTE_RDEV_ERR("Raw device with name %s already
> allocated!", name);
>   return NULL;
>   }
> 
> --
> 2.34.1



Re: [PATCH] mailmap: update contributor entry

2023-07-24 Thread Andy Moreton
On 22/07/2023 10:21, Thomas Monjalon wrote:
> We did not hear about Andy.
> 
> It's probably better to update within his next patch.

Hi Thomas,

I review patches to the sfc PMD as a maintainer of the base library 
(drivers/common/sfc_efx), but have not yet contributed other patches to DPDK. 
Ivan's mailmap patch has the right addresses for me.

AndyM

> 
> 20/07/2023 18:55, Ivan Malov:
>> PING
>>
>> On Tue, 13 Jun 2023, Ivan Malov wrote:
>>
>>> Signed-off-by: Ivan Malov 
>>> ---
>>> .mailmap | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/.mailmap b/.mailmap
>>> index 8e3940a253..d97cdc670c 100644
>>> --- a/.mailmap
>>> +++ b/.mailmap
>>> @@ -105,7 +105,7 @@ Andriy Berestovskyy  
>>> 
>>> Andrzej Ostruszka  
>>> Andy Gospodarek  
>>> Andy Green 
>>> -Andy Moreton  
>>> +Andy Moreton   >> at 
>>> solarflare.com>
>>> Andy Pei 
>>> Anirudh Venkataramanan 
>>> Ankur Dwivedi  >> caviumnetworks.com> 
>>> 
> 
> 
> 
> 



📣 Call for Content

2023-07-24 Thread Ben Thomas
Hello everyone

*Please reply to *market...@dpdk.org with any content you would like
featured in our July newsletter
,
which is shared across DPDK and Linux Foundation emails and social
accounts.

*Examples of content:*

   - Send links to tech updates, news events, meetings etc related to DPDK
   - Submit blogs about DPDK projects and/or other initiatives here
   

   - Include engineers in the Dev spotlight blog series here
   

   - Send Case studies, white papers & user stories



This newsletter is sent out to thousands of DPDK developers, it’s a
collaborative effort. If you have a project release, pull request,
community event, and/or relevant article you would like to be considered as
a highlight for next month, please reply to market...@dpdk.org

Thank you for your continued support and enthusiasm.

DPDK Team.


Re: [PATCH v3 0/6] dts: tg abstractions and scapy tg

2023-07-24 Thread Thomas Monjalon
19/07/2023 16:12, Juraj Linkeš:
> Add abstractions for traffic generator split into those that can and
> can't capture traffic.
> 
> The Scapy implementation uses an XML-RPC server for remote control. This
> requires an interactive session to add Scapy functions to the server. The
> interactive session code is based on another patch [0].
> 
> The basic test case is there to showcase the Scapy implementation - it
> sends just one UDP packet and verifies it on the other end.
> 
> [0]: 
> http://patches.dpdk.org/project/dpdk/patch/20230718214802.3214-3-jspew...@iol.unh.edu/
> 
> Juraj Linkeš (6):
>   dts: add scapy dependency
>   dts: add traffic generator config
>   dts: traffic generator abstractions
>   dts: add python remote interactive shell
>   dts: scapy traffic generator implementation
>   dts: add basic UDP test case

Applied, thanks





RE: release candidate 23.07-rc4

2023-07-24 Thread Xu, HailinX
> -Original Message-
> From: Xu, HailinX
> Sent: Friday, July 21, 2023 6:01 PM
> To: 'Thomas Monjalon' ; annou...@dpdk.org;
> dev@dpdk.org
> Cc: Kovacevic, Marko ; Mcnamara, John
> ; Richardson, Bruce
> ; Ferruh Yigit 
> Subject: RE: release candidate 23.07-rc4
> 
> > -Original Message-
> > From: Thomas Monjalon 
> > Sent: Thursday, July 20, 2023 1:16 PM
> > To: annou...@dpdk.org
> > Subject: release candidate 23.07-rc4
> >
> > A new DPDK release candidate is ready for testing:
> > https://git.dpdk.org/dpdk/tag/?id=v23.07-rc4
> >
> > There are 37 new patches in this snapshot.
> >
> > Release notes:
> > https://doc.dpdk.org/guides/rel_notes/release_23_07.html
> >
> > Except few policy updates and last minute release notes, everything
> > ready and not risky should be there in DPDK 23.07-rc4.
> > Do not forget to review the deprecation notices.
> >
> > You may share some release validation results by replying to this
> > message at dev@dpdk.org and by adding tested hardware in the release
> notes.
> >
> > Please think about sharing your roadmap now for DPDK 23.11.
> >
> > Thank you everyone
> >
> Update the test status for Intel part. Till now dpdk23.07-rc4 test execution 
> rate
> is 70%. no critical issue found.
> # Basic Intel(R) NIC testing
> * Build or compile:
>  *Build: cover the build test combination with latest GCC/Clang version and
> the popular OS revision such as Ubuntu20.04.5, Ubuntu22.04.2, Fedora38,
> RHEL8.7/9.2, Centos7.9, OpenAnolis8.8, CBL-Mariner2.0 etc.
>   - All test passed.
>  *Compile: cover the CFLAGES(O0/O1/O2/O3) with popular OS such as
> Ubuntu22.04.2 and RHEL9.0.
>   - All test passed with latest dpdk.
> * Meson test & Asan test:
> known issue:
> - [dpdk23.07][asan]
> multiprocess_iavf/multiprocess_simple_mpbasicoperation: AddressSanitizer:
> heap-use-after-free -> Intel dev is under investigating
>   - https://bugs.dpdk.org/show_bug.cgi?id=1107 [22.11-rc1][meson test]
> seqlock_autotest test failed
>   - https://bugs.dpdk.org/show_bug.cgi?id=1123 [dpdk-22.11][asan] the
> stack-buffer-overflow was found when quit testpmd in Redhat9
>   - https://bugs.dpdk.org/show_bug.cgi?id=1250 [dpdk-23.07][meson test]
> driver-tests/cryptodev_openssl_asym_autotest blocked in RHEL9.0 -> has fix
> patch
> * PF/VF(i40e, ixgbe): test scenarios including
> PF/VF-RTE_FLOW/TSO/Jumboframe/checksum offload/VLAN/VXLAN, etc.
>   - All test done. No new issue is found.
> * PF/VF(ice): test scenarios including Switch features/Package
> Management/Flow Director/Advanced Tx/Advanced RSS/ACL/DCF/Flexible
> Descriptor, etc.
>   - execution rate is 80%. No new issue is found.
> * Intel NIC single core/NIC performance: test scenarios including PF/VF single
> core performance test, RFC2544 Zero packet loss performance test, etc.
>   - execution rate is 50%. No new issue is found.
> * Power and IPsec:
>  * Power: test scenarios including bi-direction/Telemetry/Empty Poll
> Lib/Priority Base Frequency, etc.
>   - execution rate is 50%. No new issue is found.
>  * IPsec: test scenarios including ipsec/ipsec-gw/ipsec library basic test -
> QAT&SW/FIB library, etc.
>   - on going. No new issue is found.
> # Basic cryptodev and virtio testing
> * Virtio: both function and performance test are covered. Such as
> PVP/Virtio_loopback/virtio-user loopback/virtio-net VM2VM perf
> testing/VMAWARE ESXI 8.0, etc.
>   - execution rate is 40%. No new issue is found.
> * Cryptodev:
>  *Function test: test scenarios including Cryptodev API testing/CompressDev
> ISA-L/QAT/ZLIB PMD Testing/FIPS, etc.
>   - on going. No new issue is found.
>  *Performance test: test scenarios including Throughput Performance
> /Cryptodev Latency, etc.
>   - on going. No new issue is found.
> 
> Regards,
> Xu, Hailin

Update the test status for Intel part. Till now dpdk23.07-rc4 all tests done. 
no critical issue found.
# Basic Intel(R) NIC testing
* Build or compile:  
 *Build: cover the build test combination with latest GCC/Clang version and the 
popular OS revision such as Ubuntu20.04.5, Ubuntu22.04.2, Fedora38, 
RHEL8.7/9.2, Centos7.9, OpenAnolis8.8, CBL-Mariner2.0 etc.
  - All test passed.
 *Compile: cover the CFLAGES(O0/O1/O2/O3) with popular OS such as Ubuntu22.04.2 
and RHEL9.0.
  - All test passed with latest dpdk.
* Meson test & Asan test: 
known issue:
- [dpdk23.07][asan] multiprocess_iavf/multiprocess_simple_mpbasicoperation: 
AddressSanitizer: heap-use-after-free -> Intel dev is under investigating
- https://bugs.dpdk.org/show_bug.cgi?id=1107 [22.11-rc1][meson test] 
seqlock_autotest test failed
- https://bugs.dpdk.org/show_bug.cgi?id=1123 [dpdk-22.11][asan] the 
stack-buffer-overflow was found when quit testpmd in Redhat9
* PF/VF(i40e, ixgbe): test scenarios including 
PF/VF-RTE_FLOW/TSO/Jumboframe/checksum offload/VLAN/VXLAN, etc. 
  - All test done. No new issue is found.
* PF/VF(ice): test scenarios including Switch features/Package Management/Flow 
Director/Advance

RE: [PATCH] doc: update doc for idpf and cpfl

2023-07-24 Thread Xing, Beilei



> -Original Message-
> From: Stephen Hemminger 
> Sent: Thursday, July 20, 2023 12:15 AM
> To: Xing, Beilei 
> Cc: Wu, Jingjing ; dev@dpdk.org
> Subject: Re: [PATCH] doc: update doc for idpf and cpfl
> 
> On Tue, 18 Jul 2023 17:02:12 +
> beilei.x...@intel.com wrote:
> 
> > From: Beilei Xing 
> >
> > Add recommended matching list for idpf pmd and cpfl pmd.
> >
> > Signed-off-by: Beilei Xing 
> > ---
> >  doc/guides/nics/cpfl.rst | 16 
> > doc/guides/nics/idpf.rst | 16 
> >  2 files changed, 32 insertions(+)
> >
> > diff --git a/doc/guides/nics/cpfl.rst b/doc/guides/nics/cpfl.rst index
> > e88008e16e..258e89ed48 100644
> > --- a/doc/guides/nics/cpfl.rst
> > +++ b/doc/guides/nics/cpfl.rst
> > @@ -21,6 +21,22 @@ To get better performance on Intel platforms,
> > please follow the :doc:`../linux_gsg/nic_perf_intel_platform`.
> >
> >
> > +Recommended Matching List
> > +-
> > +
> > +It is highly recommended to upgrade the MEV-ts release to avoid the
> > +compatibility issues with the cpfl PMD.
> > +Here is the suggested matching list which has been tested and verified.
> > +
> > +   ++--+
> > +   | DPDK   |  MEV-ts release  |
> > +   ++==+
> > +   |23.03   |  0.6.0   |
> > +   ++--+
> > +   |23.07   |  0.9.1   |
> > +   ++--+
> >
> 
> Since 23.03 is not an LTS release, it will not be supported when 23.07 is 
> release.
> Probably best not to clutter up docs with 23.03


Thanks for the comments, will remove 23.03 in next version.