Re: [PATCH] doc: announce ethdev operation struct changes

2023-07-13 Thread Ferruh Yigit
On 7/5/2023 12:32 PM, Konstantin Ananyev wrote:
> 04/07/2023 09:10, Feifei Wang пишет:
>> To support mbufs recycle mode, announce the coming ABI changes
>> from DPDK 23.11.
>>
>> Signed-off-by: Feifei Wang 
>> Reviewed-by: Ruifeng Wang 
>> ---
>>   doc/guides/rel_notes/deprecation.rst | 4 
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst
>> b/doc/guides/rel_notes/deprecation.rst
>> index 66431789b0..c7e1ffafb2 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -118,6 +118,10 @@ Deprecation Notices
>>     The legacy actions should be removed
>>     once ``MODIFY_FIELD`` alternative is implemented in drivers.
>>   +* ethdev: The Ethernet device data structure ``struct rte_eth_dev``
>> and
>> +  the fast-path ethdev flat array ``struct rte_eth_fp_ops`` will be
>> updated
>> +  with new fields to support mbufs recycle mode from DPDK 23.11.
>> +
>>   * cryptodev: The function ``rte_cryptodev_cb_fn`` will be updated
>>     to have another parameter ``qp_id`` to return the queue pair ID
>>     which got error interrupt to the application,
> 
> Acked-by: Konstantin Ananyev 
>

Acked-by: Ferruh Yigit 



Re: [PATCH] doc: announce inclusive naming macro name changes

2023-07-13 Thread Ferruh Yigit
On 6/7/2023 3:44 AM, Chaoyong He wrote:
> From: Long Wu 
> 
> In order to support inclusive naming, some of the macro in DPDK will
> need to be renamed. Do this through deprecation process now for 23.07.
> 
> Signed-off-by: Long Wu 
> Reviewed-by: Chaoyong He 
> ---
> Depends-on: patch-127084 ("doc: announce inclusive naming function name")
> ---
>  doc/guides/rel_notes/deprecation.rst | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst 
> b/doc/guides/rel_notes/deprecation.rst
> index 267a49aa13..67353d4f2b 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -175,3 +175,8 @@ Deprecation Notices
>``rte_eth_bond_active_members_get``,
>``rte_eth_bond_member_add``, ``rte_eth_bond_member_remove``,
>and ``rte_eth_bond_members_get``.
> +  References to slave will be removed and replace bonded to bonding in DPDK 
> 23.11.
> +  The following macro will be deprecated in DPDK 23.07, and removed in DPDK 
> 23.11.
> +  The old macro:
> +  ``RTE_ETH_DEV_BONDED_SLAVE`` will be replaced by:
> +  ``RTE_ETH_DEV_BONDING_MEMBER``.
>

Hi Chaoyong,

OK to macro rename, but did deprecation in this release happened?



Re: [PATCH] net/nfp: fix invalid control message packets

2023-07-13 Thread Ferruh Yigit
On 7/13/2023 4:02 AM, Chaoyong He wrote:
> From: Long Wu 
> 
> If we add two cards that uses flower firmware into one dpdk-testpmd,
> NFP PMD will printf error log. The reason is that the second card
> uses the control VNIC Rx queue of the first card.
> 
> Because rte_eth_dma_zone_reserve() will reserve new DMA zone if
> DMA zone's name is unique. But if there is already a zone with the
> same name, rte_eth_dma_zone_reserve() will return the pointer of
> the previously DMA zone. We try to reserve DMA zone for each card
> but we use the same name to reserve.
> 
> We use the PCI address to give control VNIC a unique ring name
> to avoid the above situation and let each NIC's ring have its
> own DMA zone.
> 
> Fixes: 945441ebdb9c ("net/nfp: add flower ctrl VNIC")
> Cc: chaoyong...@corigine.com
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Long Wu 
>

Hi Chaoyong,

Is this patch for this release or next one?

-rc3 is already out, after this point we should have documentation and
critical fixes.



Re: [PATCH] doc: deprecation notice to add callback data to rte_event_fp_ops

2023-07-13 Thread Jerin Jacob
On Wed, Jul 12, 2023 at 11:01 PM Sivaprasad Tummala
 wrote:
>
> Deprecation notice to add "rte_eventdev_port_data" field to

Could you share the rational for why rte_eventdev_port_data needs to be added?


> ``rte_event_fp_ops`` for callback support.
>
> Signed-off-by: Sivaprasad Tummala 
> ---
>  doc/guides/rel_notes/deprecation.rst | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst 
> b/doc/guides/rel_notes/deprecation.rst
> index 8e1cdd677a..2c69338818 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -133,6 +133,10 @@ Deprecation Notices
>``rte_cryptodev_get_auth_algo_string``, 
> ``rte_cryptodev_get_aead_algo_string`` and
>``rte_cryptodev_asym_get_xform_string`` respectively.
>
> +* eventdev: The struct rte_event_fp_ops will be updated with a new element
> +  rte_eventdev_port_data to support optional callbacks in DPDK 23.11. This 
> changes
> +  the size of rte_event_fp_ops and result in ABI change.
> +
>  * flow_classify: The flow_classify library and example have no maintainer.
>The library is experimental and, as such, it could be removed from DPDK.
>Its removal has been postponed to let potential users report interest
> --
> 2.34.1
>


RE: [PATCH] net/i40e: fix comments

2023-07-13 Thread Zhang, Qi Z



> -Original Message-
> From: Jieqiang Wang 
> Sent: Wednesday, July 12, 2023 6:08 PM
> To: Thomas Monjalon ; Zhang, Yuying
> ; Xing, Beilei ; David
> Christensen ; Ruifeng Wang
> ; Richardson, Bruce ;
> Konstantin Ananyev ; Jeff Guo
> ; Morten Brørup ; Zhang,
> Qi Z 
> Cc: dev@dpdk.org; n...@arm.com; Jieqiang Wang ;
> sta...@dpdk.org
> Subject: [PATCH] net/i40e: fix comments
> 
> The limitation of burst size in i40e vector rx has been removed, but the
> comment lines have not been updated to reflect the code changes. Remove
> those lines to avoid confusion. Additionally, fix a typo in i40e_tx_queue.
> 
> Fixes: 9e27f00f3a61 ("net/i40e: fix vector Rx")
> Cc: jia@intel.com
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Jieqiang Wang 
> Reviewed-by: Ruifeng Wang 

Applied to dpdk-next-net-intel.

Thanks
Qi



RE: [PATCH] net/iavf: fix the order of closing Rx queue

2023-07-13 Thread Zhang, Qi Z



> -Original Message-
> From: Zeng, ZhichaoX 
> Sent: Wednesday, July 12, 2023 1:36 PM
> To: dev@dpdk.org
> Cc: sta...@dpdk.org; Zhang, Qi Z ; Staszewski, BartoszX
> ; Zeng, ZhichaoX ;
> Wu, Jingjing ; Xing, Beilei ;
> Ferruh Yigit ; Rong, Leyi 
> Subject: [PATCH] net/iavf: fix the order of closing Rx queue
> 
> The current implementation stops queue before disabling the Rx interrupt, and
> when there are still unprocessed packets remaining in the queue, this may
> cause the Rx ring to timeout, leading to IOMMU fault.
> 
> This patch disables the Rx interrupt before stopping the queue, ensuring that
> no packets received when disabling the queues.
> 
> Fixes: 02d212ca3125 ("net/iavf: rename remaining avf strings")
> Cc: sta...@dpdk.org
> Signed-off-by: Bartosz Staszewski 
> Signed-off-by: Zhichao Zeng 

Acked-by: Qi Zhang 

Applied to dpdk-next-net-intel.

Thanks
Qi


RE: [PATCH v2] common/iavf: fix hw mac type for 710 NIC

2023-07-13 Thread Zhang, Qi Z



> -Original Message-
> From: Wenjing Qiao 
> Sent: Wednesday, July 12, 2023 3:38 PM
> To: Wu, Jingjing ; Xing, Beilei 
> Cc: dev@dpdk.org; Qiao, Wenjing ;
> sta...@dpdk.org
> Subject: [PATCH v2] common/iavf: fix hw mac type for 710 NIC
> 
> Fix hw mac type according to PCI ID list.
> 
> Fixes: eb385183edac ("net/iavf/base: update device IDs")
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Wenjing Qiao 

Acked-by: Qi Zhang 

Applied to dpdk-next-net-intel.

Thanks
Qi


[PATCH 0/2] vduse: TSO & vIOMMU fixes

2023-07-13 Thread Maxime Coquelin
This series contains two patches to fix TSO support
and enable vIOMMU by default as it is required by
VDUSE.

Maxime Coquelin (2):
  vhost: fix net offload compliancy
  vhost: force vIOMMU enablement with VDUSE

 lib/vhost/socket.c | 9 ++---
 lib/vhost/vduse.c  | 4 ++--
 lib/vhost/vduse.h  | 2 +-
 3 files changed, 9 insertions(+), 6 deletions(-)

-- 
2.41.0



[PATCH 2/2] vhost: force vIOMMU enablement with VDUSE

2023-07-13 Thread Maxime Coquelin
Unlike Vhost-user, VDUSE requires vIOMMU support.
This patch ignores whether RTE_VHOST_USER_IOMMU_SUPPORT
flag is passed at register time to avoid having application
to pass it for having working VDUSE device creation.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin 
---
 lib/vhost/socket.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index 57dfe3d2fe..79f2138f60 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -932,7 +932,10 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
vsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY;
vsocket->net_compliant_ol_flags = flags & 
RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
vsocket->stats_enabled = flags & RTE_VHOST_USER_NET_STATS_ENABLE;
-   vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
+   if (vsocket->is_vduse)
+   vsocket->iommu_support = true;
+   else
+   vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
 
if (vsocket->async_copy &&
(flags & (RTE_VHOST_USER_IOMMU_SUPPORT |
@@ -986,7 +989,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
vsocket->features &= ~seg_offload_features;
}
 
-   if (!(flags & RTE_VHOST_USER_IOMMU_SUPPORT)) {
+   if (!vsocket->iommu_support) {
vsocket->supported_features &= ~(1ULL << 
VIRTIO_F_IOMMU_PLATFORM);
vsocket->features &= ~(1ULL << VIRTIO_F_IOMMU_PLATFORM);
}
-- 
2.41.0



[PATCH 1/2] vhost: fix net offload compliancy

2023-07-13 Thread Maxime Coquelin
Initial VDUSE support assumed the application always used
the net offload compliant mode, which is not the case for
OVS.

This patch propagates the value set by the application.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin 
---
 lib/vhost/socket.c | 2 +-
 lib/vhost/vduse.c  | 4 ++--
 lib/vhost/vduse.h  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index f55fb299fd..57dfe3d2fe 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -1233,7 +1233,7 @@ rte_vhost_driver_start(const char *path)
return -1;
 
if (vsocket->is_vduse)
-   return vduse_device_create(path);
+   return vduse_device_create(path, 
vsocket->net_compliant_ol_flags);
 
if (fdset_tid == 0) {
/**
diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
index 5c595e3f94..73ed424232 100644
--- a/lib/vhost/vduse.c
+++ b/lib/vhost/vduse.c
@@ -412,7 +412,7 @@ vduse_events_handler(int fd, void *arg, int *remove 
__rte_unused)
 }
 
 int
-vduse_device_create(const char *path)
+vduse_device_create(const char *path, bool compliant_ol_flags)
 {
int control_fd, dev_fd, vid, ret;
pthread_t fdset_tid;
@@ -538,7 +538,7 @@ vduse_device_create(const char *path)
strncpy(dev->ifname, path, IF_NAME_SZ - 1);
dev->vduse_ctrl_fd = control_fd;
dev->vduse_dev_fd = dev_fd;
-   vhost_setup_virtio_net(dev->vid, true, true, true, true);
+   vhost_setup_virtio_net(dev->vid, true, compliant_ol_flags, true, true);
 
for (i = 0; i < total_queues; i++) {
struct vduse_vq_config vq_cfg = { 0 };
diff --git a/lib/vhost/vduse.h b/lib/vhost/vduse.h
index d0142694a7..9d63da664d 100644
--- a/lib/vhost/vduse.h
+++ b/lib/vhost/vduse.h
@@ -11,7 +11,7 @@
 
 #ifdef VHOST_HAS_VDUSE
 
-int vduse_device_create(const char *path);
+int vduse_device_create(const char *path, bool compliant_ol_flags);
 int vduse_device_destroy(const char *path);
 
 #else
-- 
2.41.0



RE: [PATCH] doc: deprecation notice to add callback data to rte_event_fp_ops

2023-07-13 Thread Tummala, Sivaprasad
[AMD Official Use Only - General]

Hi Jerin,

> -Original Message-
> From: Jerin Jacob 
> Sent: Thursday, July 13, 2023 2:22 PM
> To: Tummala, Sivaprasad 
> Cc: dev@dpdk.org; Yigit, Ferruh ;
> bruce.richard...@intel.com; david.march...@redhat.com; tho...@monjalon.net
> Subject: Re: [PATCH] doc: deprecation notice to add callback data to
> rte_event_fp_ops
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Wed, Jul 12, 2023 at 11:01 PM Sivaprasad Tummala
>  wrote:
> >
> > Deprecation notice to add "rte_eventdev_port_data" field to
>
> Could you share the rational for why rte_eventdev_port_data needs to be added?

"rte_eventdev_port_data" is used to hold callbacks registered optionally per 
event device port and associated callback data.
By adding "rte_eventdev_port_data" to "rte_event_fp_ops", allows to fetch this 
data for fastpath eventdev inline functions in advance.

>
>
> > ``rte_event_fp_ops`` for callback support.
> >
> > Signed-off-by: Sivaprasad Tummala 
> > ---
> >  doc/guides/rel_notes/deprecation.rst | 4 
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst
> > b/doc/guides/rel_notes/deprecation.rst
> > index 8e1cdd677a..2c69338818 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -133,6 +133,10 @@ Deprecation Notices
> >``rte_cryptodev_get_auth_algo_string``,
> ``rte_cryptodev_get_aead_algo_string`` and
> >``rte_cryptodev_asym_get_xform_string`` respectively.
> >
> > +* eventdev: The struct rte_event_fp_ops will be updated with a new
> > +element
> > +  rte_eventdev_port_data to support optional callbacks in DPDK 23.11.
> > +This changes
> > +  the size of rte_event_fp_ops and result in ABI change.
> > +
> >  * flow_classify: The flow_classify library and example have no maintainer.
> >The library is experimental and, as such, it could be removed from DPDK.
> >Its removal has been postponed to let potential users report
> > interest
> > --
> > 2.34.1
> >


Re: [PATCH] doc: deprecation notice to add callback data to rte_event_fp_ops

2023-07-13 Thread Jerin Jacob
On Thu, Jul 13, 2023 at 4:08 PM Tummala, Sivaprasad
 wrote:
>
> [AMD Official Use Only - General]
>
> Hi Jerin,
>
> > -Original Message-
> > From: Jerin Jacob 
> > Sent: Thursday, July 13, 2023 2:22 PM
> > To: Tummala, Sivaprasad 
> > Cc: dev@dpdk.org; Yigit, Ferruh ;
> > bruce.richard...@intel.com; david.march...@redhat.com; tho...@monjalon.net
> > Subject: Re: [PATCH] doc: deprecation notice to add callback data to
> > rte_event_fp_ops
> >
> > Caution: This message originated from an External Source. Use proper caution
> > when opening attachments, clicking links, or responding.
> >
> >
> > On Wed, Jul 12, 2023 at 11:01 PM Sivaprasad Tummala
> >  wrote:
> > >
> > > Deprecation notice to add "rte_eventdev_port_data" field to
> >
> > Could you share the rational for why rte_eventdev_port_data needs to be 
> > added?
>
> "rte_eventdev_port_data" is used to hold callbacks registered optionally per 
> event device port and associated callback data.
> By adding "rte_eventdev_port_data" to "rte_event_fp_ops", allows to fetch 
> this data for fastpath eventdev inline functions in advance.

Please add above info in the release notes for next version.

>
> >
> >
> > > ``rte_event_fp_ops`` for callback support.
> > >
> > > Signed-off-by: Sivaprasad Tummala 
> > > ---
> > >  doc/guides/rel_notes/deprecation.rst | 4 
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > b/doc/guides/rel_notes/deprecation.rst
> > > index 8e1cdd677a..2c69338818 100644
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > @@ -133,6 +133,10 @@ Deprecation Notices
> > >``rte_cryptodev_get_auth_algo_string``,
> > ``rte_cryptodev_get_aead_algo_string`` and
> > >``rte_cryptodev_asym_get_xform_string`` respectively.
> > >
> > > +* eventdev: The struct rte_event_fp_ops will be updated with a new
> > > +element
> > > +  rte_eventdev_port_data to support optional callbacks in DPDK 23.11.
> > > +This changes
> > > +  the size of rte_event_fp_ops and result in ABI change.
> > > +
> > >  * flow_classify: The flow_classify library and example have no 
> > > maintainer.
> > >The library is experimental and, as such, it could be removed from 
> > > DPDK.
> > >Its removal has been postponed to let potential users report
> > > interest
> > > --
> > > 2.34.1
> > >


[PATCH] net/mlx5: fix the drop action memory leak

2023-07-13 Thread Bing Zhao
In DV mode, when quitting an application, the default drop action
and its resources should be released. The Devx action for the TIR
was not destroyed and it would cause 80B memory leak.

With this commit, in DV mode, the action should be destroyed in the
mlx5_devx_drop_action_destroy() explicitly.

Bugzilla ID: 1192
Bugzilla ID: 1255

Fixes: bc5bee028ebc ("net/mlx5: create drop queue using DevX")
Cc: sta...@dpdk.org

Reported-by: David Marchand 
Signed-off-by: Bing Zhao 
Acked-by: Viacheslav Ovsiienko 
---
 drivers/net/mlx5/mlx5_devx.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index d286cfe864..9fa400fc48 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -1134,6 +1134,10 @@ mlx5_devx_drop_action_destroy(struct rte_eth_dev *dev)
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_hrxq *hrxq = priv->drop_queue.hrxq;
 
+#if defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_INFINIBAND_VERBS_H)
+   if (hrxq->action != NULL)
+   mlx5_flow_os_destroy_flow_action(hrxq->action);
+#endif
if (hrxq->tir != NULL)
mlx5_devx_tir_destroy(hrxq);
if (hrxq->ind_table->ind_table != NULL)
-- 
2.34.1



[PATCH v2] net/mlx5: fix the drop action memory leak

2023-07-13 Thread Bing Zhao
In DV mode, when quitting an application, the default drop action
and its resources should be released. The Devx action for the TIR
was not destroyed and it would cause 80B memory leak.

With this commit, in DV mode, the action should be destroyed in the
mlx5_devx_drop_action_destroy() explicitly.

Bugzilla ID: 1192
Bugzilla ID: 1255

Fixes: bc5bee028ebc ("net/mlx5: create drop queue using DevX")
Cc: sta...@dpdk.org

Reported-by: David Marchand 
Reported-by: Mário Kuka
Signed-off-by: Bing Zhao 
Acked-by: Viacheslav Ovsiienko 
---
v2: added the reporter
---
 drivers/net/mlx5/mlx5_devx.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index d286cfe864..9fa400fc48 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -1134,6 +1134,10 @@ mlx5_devx_drop_action_destroy(struct rte_eth_dev *dev)
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_hrxq *hrxq = priv->drop_queue.hrxq;
 
+#if defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_INFINIBAND_VERBS_H)
+   if (hrxq->action != NULL)
+   mlx5_flow_os_destroy_flow_action(hrxq->action);
+#endif
if (hrxq->tir != NULL)
mlx5_devx_tir_destroy(hrxq);
if (hrxq->ind_table->ind_table != NULL)
-- 
2.34.1



[PATCH v2 1/2] vhost: fix net offload compliance

2023-07-13 Thread Maxime Coquelin
Initial VDUSE support assumed the application always used
the net offload compliant mode, which is not the case for
OVS.

This patch propagates the value set by the application.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin 
---
 lib/vhost/socket.c | 2 +-
 lib/vhost/vduse.c  | 4 ++--
 lib/vhost/vduse.h  | 6 --
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index f55fb299fd..57dfe3d2fe 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -1233,7 +1233,7 @@ rte_vhost_driver_start(const char *path)
return -1;
 
if (vsocket->is_vduse)
-   return vduse_device_create(path);
+   return vduse_device_create(path, 
vsocket->net_compliant_ol_flags);
 
if (fdset_tid == 0) {
/**
diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
index 5c595e3f94..73ed424232 100644
--- a/lib/vhost/vduse.c
+++ b/lib/vhost/vduse.c
@@ -412,7 +412,7 @@ vduse_events_handler(int fd, void *arg, int *remove 
__rte_unused)
 }
 
 int
-vduse_device_create(const char *path)
+vduse_device_create(const char *path, bool compliant_ol_flags)
 {
int control_fd, dev_fd, vid, ret;
pthread_t fdset_tid;
@@ -538,7 +538,7 @@ vduse_device_create(const char *path)
strncpy(dev->ifname, path, IF_NAME_SZ - 1);
dev->vduse_ctrl_fd = control_fd;
dev->vduse_dev_fd = dev_fd;
-   vhost_setup_virtio_net(dev->vid, true, true, true, true);
+   vhost_setup_virtio_net(dev->vid, true, compliant_ol_flags, true, true);
 
for (i = 0; i < total_queues; i++) {
struct vduse_vq_config vq_cfg = { 0 };
diff --git a/lib/vhost/vduse.h b/lib/vhost/vduse.h
index d0142694a7..4879b1f900 100644
--- a/lib/vhost/vduse.h
+++ b/lib/vhost/vduse.h
@@ -11,14 +11,16 @@
 
 #ifdef VHOST_HAS_VDUSE
 
-int vduse_device_create(const char *path);
+int vduse_device_create(const char *path, bool compliant_ol_flags);
 int vduse_device_destroy(const char *path);
 
 #else
 
 static inline int
-vduse_device_create(const char *path)
+vduse_device_create(const char *path, bool compliant_ol_flags)
 {
+   RTE_SET_USED(compliant_ol_flags);
+
VHOST_LOG_CONFIG(path, ERR, "VDUSE support disabled at build time\n");
return -1;
 }
-- 
2.41.0



[PATCH v2 0/2] vduse: TSO & vIOMMU fixes

2023-07-13 Thread Maxime Coquelin
This series contains two patches to fix TSO support
and enable vIOMMU by default as it is required by
VDUSE.

Changes in v2:
==
- Fix typo in commit message
- Fix build when VDUSE is not supported by the Kernel (0-day robot)

Maxime Coquelin (2):
  vhost: fix net offload compliance
  vhost: force vIOMMU enablement with VDUSE

 lib/vhost/socket.c | 9 ++---
 lib/vhost/vduse.c  | 4 ++--
 lib/vhost/vduse.h  | 6 --
 3 files changed, 12 insertions(+), 7 deletions(-)

-- 
2.41.0



[PATCH v2 2/2] vhost: force vIOMMU enablement with VDUSE

2023-07-13 Thread Maxime Coquelin
Unlike Vhost-user, VDUSE requires vIOMMU support.
This patch ignores whether RTE_VHOST_USER_IOMMU_SUPPORT
flag is passed at register time to avoid having application
to pass it for having working VDUSE device creation.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin 
---
 lib/vhost/socket.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index 57dfe3d2fe..79f2138f60 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -932,7 +932,10 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
vsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY;
vsocket->net_compliant_ol_flags = flags & 
RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
vsocket->stats_enabled = flags & RTE_VHOST_USER_NET_STATS_ENABLE;
-   vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
+   if (vsocket->is_vduse)
+   vsocket->iommu_support = true;
+   else
+   vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
 
if (vsocket->async_copy &&
(flags & (RTE_VHOST_USER_IOMMU_SUPPORT |
@@ -986,7 +989,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
vsocket->features &= ~seg_offload_features;
}
 
-   if (!(flags & RTE_VHOST_USER_IOMMU_SUPPORT)) {
+   if (!vsocket->iommu_support) {
vsocket->supported_features &= ~(1ULL << 
VIRTIO_F_IOMMU_PLATFORM);
vsocket->features &= ~(1ULL << VIRTIO_F_IOMMU_PLATFORM);
}
-- 
2.41.0



Fwd: |FAILURE| pw129411-129407 [PATCH] [v16,6/6] test/memarea: support du

2023-07-13 Thread fengchengwen
Hi Microsoft guys,

The unit-testing [1] show memarea_autotest has following error:

43/93 DPDK:fast-tests / memarea_autotest   FAIL 0.15s   
(exit status 3221226356 or signal 3221226228 SIGinvalid)
>>> MALLOC_PERTURB_=139 DPDK_TEST=memarea_autotest 
>>> C:\Users\builder\jenkins\workspace\Generic-VM-Unit-Test-DPDK\dpdk\build\app\test\dpdk-test.exe

I try google but can't find useful info.

Because I have not such toolchain/enviorment, Could you help explain the reason 
?

[1] https://lab.dpdk.org/results/dashboard/patchsets/27021/

Thanks


 Forwarded Message 
Subject: |FAILURE| pw129411-129407 [PATCH] [v16,6/6] test/memarea: support du
Date: Wed, 12 Jul 2023 23:28:27 -0700 (PDT)
From: dpdk...@iol.unh.edu
To: Test Report 
CC: dpdk-test-repo...@iol.unh.edu, fengchengwen 

Test-Label: iol-x86_64-unit-testing
Test-Status: FAILURE
http://dpdk.org/patch/129407

_Testing issues_

Submitter: fengchengwen 
Date: Monday, July 10 2023 06:49:23 DPDK git baseline: Repo:dpdk
  Branch: master
  CommitID:623dc9364dc6a818799941cc26dc8f70feb2bb24

129411-129407 --> testing fail

Test environment and result as below:

+-++
| Environment | dpdk_unit_test |
+=++
| Ubuntu 20.04| PASS   |
+-++
| Windows Server 2019 | FAIL   |
+-++

 20 line log output for Windows Server 2019 (dpdk_unit_test): 
 8 5 / 9 3   D P D K : f a s t - t e s t s   /   p o w e r _ k v m _ v m _ a u 
t o t e s t S K I P   0 . 1 1 s 
  e x i t   s t a t u s   7 7   8 6 / 9 3   D P D K : f a s t - t e s t s   /   
p o w e r _ i n t e l _ u n c o r e _ a u t o t e s t S K I P   
0 . 1 1 s   e x i t   s t a t u s   7 7   8 7 / 9 3   D P D 
K : f a s t - t e s t s   /   r e o r d e r _ a u t o t e s t   
O K   0 . 1 3 s   8 8 / 9 3   D P D K : 
f a s t - t e s t s   /   s e r v i c e _ a u t o t e s t   
O K   2 . 8 2 s   8 9 / 9 3   D P D K : f a 
s t - t e s t s   /   t h a s h _ a u t o t e s t   
O K   0 . 1 2 s   9 0 / 9 3   D P D K : f a s t 
- t e s t s   /   t h r e a d s _ a u t o t e s t   
O K   0 . 8 7 s   9 1 / 9 3   D P D K : f a s t - t 
e s t s   /   t r a c e _ a u t o t e s t   S K 
I P   0 . 1 2 s   e x i t   s t a t u s   7 7   9 2 
/ 9 3   D P D K : f a s t - t e s t s   /   m e t r i c s _ a u t o t e s t 
  O K   0 . 1 1 s   9 3 / 9 
3   D P D K : f a s t - t e s t s   /   v d e v _ a u t o t e s t   
  O K   0 . 1 2 s   O k :   
5 9   E x p e c t e d   F a i l :   
  0 F a i l :   1 U n e x p e c t e 
d   P a s s : 0 S k i p p e d : 3 3 
  T i m e o u t : 0   F u l l   l o g   w r i t 
t e n   t o   C : \ U s e r s \ b u i l d e r \ j e n k i n s \ w o r k s p a c 
e \ G e n e r i c - V M - U n i t - T e s t - D P D K \ d p d k \ b u i l d \ m 
e s o n - l o g s \ t e s t l o g . t x t    End log output 

Ubuntu 20.04
Kernel: 4.18.0-240.10.1.el8_3.x86_64
Compiler: gcc 9.3.0-17ubuntu1~20.04

Windows Server 2019
Kernel: 10.0
Compiler: clang 14.0 and gcc 8.1.0 (MinGW)

To view detailed results, visit:
https://lab.dpdk.org/results/dashboard/patchsets/27021/

UNH-IOL DPDK Community Lab

To manage your email subscriptions, visit: 
https://lab.dpdk.org/results/dashboard/preferences/subscriptions/
.


Re: [PATCH v2] net/mlx5: fix lro update tcp header cksum error

2023-07-13 Thread Thomas Monjalon
Any comment on this patch?

13/04/2023 02:57, jiangheng (G):
> The variable csum is the sum of three 16 bits integers, the max value
> is 0x2FFFD. The corner case of sum of 3 is 0x1 gives the wrong
> result: 0x1 + 0x = 0x1, the upper 16 bits are not 0.
> It must be folded again to ensure that the upper 16 bits are 0.
> 
> Fixes: e4c2a16eb1de ("net/mlx5: handle LRO packets in Rx queue")
> Cc: sta...@dpdk.org
> 
> Signed-off-by: jiangheng 
> ---
>  drivers/net/mlx5/mlx5_rx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c
> index a2be523e9e..ae537dfffa 100644
> --- a/drivers/net/mlx5/mlx5_rx.c
> +++ b/drivers/net/mlx5/mlx5_rx.c
> @@ -1090,6 +1090,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr 
> *__rte_restrict tcp,
>   tcp->cksum = 0;
>   csum += rte_raw_cksum(tcp, (tcp->data_off >> 4) * 4);
>   csum = ((csum & 0x) >> 16) + (csum & 0x);
> + csum = ((csum & 0x) >> 16) + (csum & 0x);
>   csum = (~csum) & 0x;
>   if (csum == 0)
>   csum = 0x;
> > Hi,  Jiangheng
> >
> > You are right, the corner case of sum of 3 is 0x1 gives the wrong 
> > result.
> > Could you,  please, format the patch according to the rules and send v2 ?
> > - add Fixes: tag with reference to appropriate commit
> > - add Cc: sta...@dpdk.org
> > - fix typos in commit message - capitalize sentences, add trailing points, 
> > etc.
> >
> > With best regards,
> > Slava
> >
> > > From: jiangheng (G) 
> > > Sent: среда, 12 апреля 2023 г. 14:39
> > > To: dev@dpdk.org; Matan Azrad ; Slava Ovsiienko 
> > > 
> > > Subject: [PATCH] net/mlx5: fix lro update tcp header cksum error
> > > 
> > > csum is the sum of three 16 bits value it must be folded twice to 
> > > ensure that the upper 16 bits are 0
> > > ---
> > >  drivers/net/mlx5/mlx5_rx.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c 
> > > index a2be523e9e..ae537dfffa 100644
> > > --- a/drivers/net/mlx5/mlx5_rx.c
> > > +++ b/drivers/net/mlx5/mlx5_rx.c
> > > @@ -1090,6 +1090,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr 
> > > *__rte_restrict tcp,
> > > tcp->cksum = 0;
> > > csum += rte_raw_cksum(tcp, (tcp->data_off >> 4) * 4);
> > > csum = ((csum & 0x) >> 16) + (csum & 0x);
> > > +   csum = ((csum & 0x) >> 16) + (csum & 0x);
> > > csum = (~csum) & 0x;
> > > if (csum == 0)
> > > csum = 0x;
> > > --
> > > 2.27.0




Re: [PATCH v2 2/2] vhost: force vIOMMU enablement with VDUSE

2023-07-13 Thread Kevin Traynor

On 13/07/2023 12:29, Maxime Coquelin wrote:

Unlike Vhost-user, VDUSE requires vIOMMU support.
This patch ignores whether RTE_VHOST_USER_IOMMU_SUPPORT
flag is passed at register time to avoid having application
to pass it for having working VDUSE device creation.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin 
---
  lib/vhost/socket.c | 7 +--
  1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index 57dfe3d2fe..79f2138f60 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -932,7 +932,10 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
vsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY;
vsocket->net_compliant_ol_flags = flags & 
RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
vsocket->stats_enabled = flags & RTE_VHOST_USER_NET_STATS_ENABLE;
-   vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
+   if (vsocket->is_vduse)
+   vsocket->iommu_support = true;
+   else
+   vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
  
  	if (vsocket->async_copy &&

(flags & (RTE_VHOST_USER_IOMMU_SUPPORT |

 ^^^ do you need to update this check ?


@@ -986,7 +989,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
vsocket->features &= ~seg_offload_features;
}
  
-	if (!(flags & RTE_VHOST_USER_IOMMU_SUPPORT)) {

+   if (!vsocket->iommu_support) {
vsocket->supported_features &= ~(1ULL << 
VIRTIO_F_IOMMU_PLATFORM);
vsocket->features &= ~(1ULL << VIRTIO_F_IOMMU_PLATFORM);
}




RE: [PATCH] doc: announce ethdev operation struct changes

2023-07-13 Thread Morten Brørup
> From: Feifei Wang [mailto:feifei.wa...@arm.com]
> Sent: Thursday, 13 July 2023 04.37
> 
> > From: Feifei Wang
> > Sent: Tuesday, July 4, 2023 4:17 PM
> >
> > > From: Feifei Wang 
> > > Sent: Tuesday, July 4, 2023 4:10 PM
> > >
> > > To support mbufs recycle mode, announce the coming ABI changes from
> > > DPDK 23.11.
> > >
> > > Signed-off-by: Feifei Wang 
> > > Reviewed-by: Ruifeng Wang 
> > > ---
> > >  doc/guides/rel_notes/deprecation.rst | 4 
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > b/doc/guides/rel_notes/deprecation.rst
> > > index 66431789b0..c7e1ffafb2 100644
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > @@ -118,6 +118,10 @@ Deprecation Notices
> > >The legacy actions should be removed
> > >once ``MODIFY_FIELD`` alternative is implemented in drivers.
> > >
> > > +* ethdev: The Ethernet device data structure ``struct rte_eth_dev``
> > > +and
> > > +  the fast-path ethdev flat array ``struct rte_eth_fp_ops`` will be
> > > +updated
> > > +  with new fields to support mbufs recycle mode from DPDK 23.11.
> > > +
> > >  * cryptodev: The function ``rte_cryptodev_cb_fn`` will be updated
> > >to have another parameter ``qp_id`` to return the queue pair ID
> > >which got error interrupt to the application,
> > > --
> > > 2.25.1
> 
> Ping~

Acked-by: Morten Brørup 



Re: [PATCH v2 2/2] vhost: force vIOMMU enablement with VDUSE

2023-07-13 Thread Maxime Coquelin




On 7/13/23 14:47, Kevin Traynor wrote:

On 13/07/2023 12:29, Maxime Coquelin wrote:

Unlike Vhost-user, VDUSE requires vIOMMU support.
This patch ignores whether RTE_VHOST_USER_IOMMU_SUPPORT
flag is passed at register time to avoid having application
to pass it for having working VDUSE device creation.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin 
---
  lib/vhost/socket.c | 7 +--
  1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index 57dfe3d2fe..79f2138f60 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -932,7 +932,10 @@ rte_vhost_driver_register(const char *path, 
uint64_t flags)

  vsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY;
  vsocket->net_compliant_ol_flags = flags & 
RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;

  vsocket->stats_enabled = flags & RTE_VHOST_USER_NET_STATS_ENABLE;
-    vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
+    if (vsocket->is_vduse)
+    vsocket->iommu_support = true;
+    else
+    vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
  if (vsocket->async_copy &&
  (flags & (RTE_VHOST_USER_IOMMU_SUPPORT |

  ^^^ do you need to update this check ?


Good catch.
Yes, it would be better to replace with vsocket->iommu_support.

V3 on its way.

Thanks!
Maxime

@@ -986,7 +989,7 @@ rte_vhost_driver_register(const char *path, 
uint64_t flags)

  vsocket->features &= ~seg_offload_features;
  }
-    if (!(flags & RTE_VHOST_USER_IOMMU_SUPPORT)) {
+    if (!vsocket->iommu_support) {
  vsocket->supported_features &= ~(1ULL << 
VIRTIO_F_IOMMU_PLATFORM);

  vsocket->features &= ~(1ULL << VIRTIO_F_IOMMU_PLATFORM);
  }






[PATCH v3 0/2] vduse: TSO & vIOMMU fixes

2023-07-13 Thread Maxime Coquelin
This series contains two patches to fix TSO support
and enable vIOMMU by default as it is required by
VDUSE.

Changes in v3:
==
- Ensure async copy cannot be enabled with VDUSE (Kevin)

Changes in v2:
==
- Fix typo in commit message
- Fix build when VDUSE is not supported by the Kernel (0-day robot)

Maxime Coquelin (2):
  vhost: fix net offload compliance
  vhost: force vIOMMU enablement with VDUSE

 lib/vhost/socket.c | 14 --
 lib/vhost/vduse.c  |  4 ++--
 lib/vhost/vduse.h  |  6 --
 3 files changed, 14 insertions(+), 10 deletions(-)

-- 
2.41.0



[PATCH v3 1/2] vhost: fix net offload compliance

2023-07-13 Thread Maxime Coquelin
Initial VDUSE support assumed the application always used
the net offload compliant mode, which is not the case for
OVS.

This patch propagates the value set by the application.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin 
---
 lib/vhost/socket.c | 2 +-
 lib/vhost/vduse.c  | 4 ++--
 lib/vhost/vduse.h  | 6 --
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index f55fb299fd..57dfe3d2fe 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -1233,7 +1233,7 @@ rte_vhost_driver_start(const char *path)
return -1;
 
if (vsocket->is_vduse)
-   return vduse_device_create(path);
+   return vduse_device_create(path, 
vsocket->net_compliant_ol_flags);
 
if (fdset_tid == 0) {
/**
diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
index 5c595e3f94..73ed424232 100644
--- a/lib/vhost/vduse.c
+++ b/lib/vhost/vduse.c
@@ -412,7 +412,7 @@ vduse_events_handler(int fd, void *arg, int *remove 
__rte_unused)
 }
 
 int
-vduse_device_create(const char *path)
+vduse_device_create(const char *path, bool compliant_ol_flags)
 {
int control_fd, dev_fd, vid, ret;
pthread_t fdset_tid;
@@ -538,7 +538,7 @@ vduse_device_create(const char *path)
strncpy(dev->ifname, path, IF_NAME_SZ - 1);
dev->vduse_ctrl_fd = control_fd;
dev->vduse_dev_fd = dev_fd;
-   vhost_setup_virtio_net(dev->vid, true, true, true, true);
+   vhost_setup_virtio_net(dev->vid, true, compliant_ol_flags, true, true);
 
for (i = 0; i < total_queues; i++) {
struct vduse_vq_config vq_cfg = { 0 };
diff --git a/lib/vhost/vduse.h b/lib/vhost/vduse.h
index d0142694a7..4879b1f900 100644
--- a/lib/vhost/vduse.h
+++ b/lib/vhost/vduse.h
@@ -11,14 +11,16 @@
 
 #ifdef VHOST_HAS_VDUSE
 
-int vduse_device_create(const char *path);
+int vduse_device_create(const char *path, bool compliant_ol_flags);
 int vduse_device_destroy(const char *path);
 
 #else
 
 static inline int
-vduse_device_create(const char *path)
+vduse_device_create(const char *path, bool compliant_ol_flags)
 {
+   RTE_SET_USED(compliant_ol_flags);
+
VHOST_LOG_CONFIG(path, ERR, "VDUSE support disabled at build time\n");
return -1;
 }
-- 
2.41.0



[PATCH v3 2/2] vhost: force vIOMMU enablement with VDUSE

2023-07-13 Thread Maxime Coquelin
Unlike Vhost-user, VDUSE requires vIOMMU support.
This patch ignores whether RTE_VHOST_USER_IOMMU_SUPPORT
flag is passed at register time to avoid having application
to pass it for having working VDUSE device creation.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin 
---
 lib/vhost/socket.c | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index 57dfe3d2fe..033f4b3b75 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -932,11 +932,13 @@ rte_vhost_driver_register(const char *path, uint64_t 
flags)
vsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY;
vsocket->net_compliant_ol_flags = flags & 
RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
vsocket->stats_enabled = flags & RTE_VHOST_USER_NET_STATS_ENABLE;
-   vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
+   if (vsocket->is_vduse)
+   vsocket->iommu_support = true;
+   else
+   vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
 
-   if (vsocket->async_copy &&
-   (flags & (RTE_VHOST_USER_IOMMU_SUPPORT |
-   RTE_VHOST_USER_POSTCOPY_SUPPORT))) {
+   if (vsocket->async_copy && (vsocket->iommu_support ||
+   (flags & RTE_VHOST_USER_POSTCOPY_SUPPORT))) {
VHOST_LOG_CONFIG(path, ERR, "async copy with IOMMU or post-copy 
not supported\n");
goto out_mutex;
}
@@ -986,7 +988,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
vsocket->features &= ~seg_offload_features;
}
 
-   if (!(flags & RTE_VHOST_USER_IOMMU_SUPPORT)) {
+   if (!vsocket->iommu_support) {
vsocket->supported_features &= ~(1ULL << 
VIRTIO_F_IOMMU_PLATFORM);
vsocket->features &= ~(1ULL << VIRTIO_F_IOMMU_PLATFORM);
}
-- 
2.41.0



Re: [PATCH v3 1/2] vhost: fix net offload compliance

2023-07-13 Thread Kevin Traynor

On 13/07/2023 14:52, Maxime Coquelin wrote:

Initial VDUSE support assumed the application always used
the net offload compliant mode, which is not the case for
OVS.

This patch propagates the value set by the application.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin 
---
  lib/vhost/socket.c | 2 +-
  lib/vhost/vduse.c  | 4 ++--
  lib/vhost/vduse.h  | 6 --
  3 files changed, 7 insertions(+), 5 deletions(-)



lgtm
Acked-by: Kevin Traynor 



Re: [PATCH v3 2/2] vhost: force vIOMMU enablement with VDUSE

2023-07-13 Thread Kevin Traynor

On 13/07/2023 14:52, Maxime Coquelin wrote:

Unlike Vhost-user, VDUSE requires vIOMMU support.
This patch ignores whether RTE_VHOST_USER_IOMMU_SUPPORT
flag is passed at register time to avoid having application
to pass it for having working VDUSE device creation.

Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")

Signed-off-by: Maxime Coquelin
---
  lib/vhost/socket.c | 12 +++-
  1 file changed, 7 insertions(+), 5 deletions(-)


lgtm
Acked-by: Kevin Traynor 



[PATCH v6 0/2] Add DTS smoke tests

2023-07-13 Thread jspewock
From: Jeremy Spewock 

Updates previous patch so that it applies over the latest git tree.

RFCs for this patch:
* v3: https://mails.dpdk.org/archives/dev/2023-June/269859.html
* v2: https://mails.dpdk.org/archives/dev/2023-May/267915.html
* v1: https://mails.dpdk.org/archives/dev/2023-April/266580.html

Previous patch:
* v1: https://mails.dpdk.org/archives/dev/2023-June/271309.html
* v2: https://mails.dpdk.org/archives/dev/2023-July/272833.html
* v3: https://mails.dpdk.org/archives/dev/2023-July/272930.html
* v4: https://mails.dpdk.org/archives/dev/2023-July/272964.html
* v5: https://mails.dpdk.org/archives/dev/2023-July/272983.html

Jeremy Spewock (2):
  dts: add smoke tests
  dts: add paramiko to dependencies

 dts/conf.yaml |  17 +-
 dts/framework/config/__init__.py  | 107 +--
 dts/framework/config/conf_yaml_schema.json| 142 +-
 dts/framework/dts.py  |  87 ++---
 dts/framework/exception.py|  12 ++
 dts/framework/remote_session/__init__.py  |  11 +-
 dts/framework/remote_session/os_session.py|  53 +-
 dts/framework/remote_session/posix_session.py |  29 ++-
 .../remote_session/remote/__init__.py |  10 +
 .../remote/interactive_remote_session.py  |  82 
 .../remote/interactive_shell.py   |  78 
 .../remote_session/remote/testpmd_shell.py|  74 
 dts/framework/test_result.py  |  37 +++-
 dts/framework/test_suite.py   |  10 +-
 dts/framework/testbed_model/node.py   |   2 +
 dts/framework/testbed_model/sut_node.py   | 176 +-
 dts/framework/utils.py|   3 +
 dts/poetry.lock   | 137 --
 dts/pyproject.toml|   1 +
 dts/tests/TestSuite_smoke_tests.py| 113 +++
 20 files changed, 1027 insertions(+), 154 deletions(-)
 create mode 100644 
dts/framework/remote_session/remote/interactive_remote_session.py
 create mode 100644 dts/framework/remote_session/remote/interactive_shell.py
 create mode 100644 dts/framework/remote_session/remote/testpmd_shell.py
 create mode 100644 dts/tests/TestSuite_smoke_tests.py

-- 
2.41.0



[PATCH v6 1/2] dts: add smoke tests

2023-07-13 Thread jspewock
From: Jeremy Spewock 

Adds a new test suite for running smoke tests that verify general
configuration aspects of the system under test. If any of these tests
fail, the DTS execution terminates as part of a "fail-fast" model.

Signed-off-by: Jeremy Spewock 
---
 dts/conf.yaml |  17 +-
 dts/framework/config/__init__.py  | 107 +--
 dts/framework/config/conf_yaml_schema.json| 142 +-
 dts/framework/dts.py  |  87 ++---
 dts/framework/exception.py|  12 ++
 dts/framework/remote_session/__init__.py  |  11 +-
 dts/framework/remote_session/os_session.py|  53 +-
 dts/framework/remote_session/posix_session.py |  29 ++-
 .../remote_session/remote/__init__.py |  10 +
 .../remote/interactive_remote_session.py  |  82 
 .../remote/interactive_shell.py   |  78 
 .../remote_session/remote/testpmd_shell.py|  74 
 dts/framework/test_result.py  |  37 +++-
 dts/framework/test_suite.py   |  10 +-
 dts/framework/testbed_model/node.py   |   2 +
 dts/framework/testbed_model/sut_node.py   | 176 +-
 dts/framework/utils.py|   3 +
 dts/tests/TestSuite_smoke_tests.py| 113 +++
 18 files changed, 945 insertions(+), 98 deletions(-)
 create mode 100644 
dts/framework/remote_session/remote/interactive_remote_session.py
 create mode 100644 dts/framework/remote_session/remote/interactive_shell.py
 create mode 100644 dts/framework/remote_session/remote/testpmd_shell.py
 create mode 100644 dts/tests/TestSuite_smoke_tests.py

diff --git a/dts/conf.yaml b/dts/conf.yaml
index 129801d87c..3a5d87cb49 100644
--- a/dts/conf.yaml
+++ b/dts/conf.yaml
@@ -10,9 +10,13 @@ executions:
 compiler_wrapper: ccache
 perf: false
 func: true
+skip_smoke_tests: false # optional flag that allow you to skip smoke tests
 test_suites:
   - hello_world
-system_under_test: "SUT 1"
+system_under_test:
+  node_name: "SUT 1"
+  vdevs: # optional; if removed, vdevs won't be used in the execution
+- "crypto_openssl"
 nodes:
   - name: "SUT 1"
 hostname: sut1.change.me.localhost
@@ -25,3 +29,14 @@ nodes:
 hugepages:  # optional; if removed, will use system hugepage configuration
 amount: 256
 force_first_numa: false
+ports:
+  - pci: ":00:08.0"
+os_driver_for_dpdk: vfio-pci # OS driver that DPDK will use
+os_driver: i40e
+peer_node: "TG 1"
+peer_pci: ":00:08.0"
+  - pci: ":00:08.1"
+os_driver_for_dpdk: vfio-pci
+os_driver: i40e
+peer_node: "TG 1"
+peer_pci: ":00:08.1"
diff --git a/dts/framework/config/__init__.py b/dts/framework/config/__init__.py
index a4b73483e6..fad56cc520 100644
--- a/dts/framework/config/__init__.py
+++ b/dts/framework/config/__init__.py
@@ -11,7 +11,8 @@
 import os.path
 import pathlib
 from dataclasses import dataclass
-from enum import auto, unique
+from enum import Enum, auto, unique
+from pathlib import PurePath
 from typing import Any, TypedDict
 
 import warlock  # type: ignore
@@ -65,6 +66,20 @@ class HugepageConfiguration:
 force_first_numa: bool
 
 
+@dataclass(slots=True, frozen=True)
+class PortConfig:
+node: str
+pci: str
+os_driver_for_dpdk: str
+os_driver: str
+peer_node: str
+peer_pci: str
+
+@staticmethod
+def from_dict(node: str, d: dict) -> "PortConfig":
+return PortConfig(node=node, **d)
+
+
 @dataclass(slots=True, frozen=True)
 class NodeConfiguration:
 name: str
@@ -77,6 +92,7 @@ class NodeConfiguration:
 use_first_core: bool
 memory_channels: int
 hugepages: HugepageConfiguration | None
+ports: list[PortConfig]
 
 @staticmethod
 def from_dict(d: dict) -> "NodeConfiguration":
@@ -85,19 +101,36 @@ def from_dict(d: dict) -> "NodeConfiguration":
 if "force_first_numa" not in hugepage_config:
 hugepage_config["force_first_numa"] = False
 hugepage_config = HugepageConfiguration(**hugepage_config)
+common_config = {
+"name": d["name"],
+"hostname": d["hostname"],
+"user": d["user"],
+"password": d.get("password"),
+"arch": Architecture(d["arch"]),
+"os": OS(d["os"]),
+"lcores": d.get("lcores", "1"),
+"use_first_core": d.get("use_first_core", False),
+"memory_channels": d.get("memory_channels", 1),
+"hugepages": hugepage_config,
+"ports": [PortConfig.from_dict(d["name"], port) for port in 
d["ports"]],
+}
+
+return NodeConfiguration(**common_config)
 
-return NodeConfiguration(
-name=d["name"],
-hostname=d["hostname"],
-user=d["user"],
-password=d.get("password"),
-arch

[PATCH v6 2/2] dts: add paramiko to dependencies

2023-07-13 Thread jspewock
From: Jeremy Spewock 

added paramiko to the dependency files

Signed-off-by: Jeremy Spewock 
---
 dts/poetry.lock| 137 +++--
 dts/pyproject.toml |   1 +
 2 files changed, 82 insertions(+), 56 deletions(-)

diff --git a/dts/poetry.lock b/dts/poetry.lock
index 2438f337cd..2faf6dcf72 100644
--- a/dts/poetry.lock
+++ b/dts/poetry.lock
@@ -1,16 +1,17 @@
 [[package]]
 name = "attrs"
-version = "22.1.0"
+version = "23.1.0"
 description = "Classes Without Boilerplate"
 category = "main"
 optional = false
-python-versions = ">=3.5"
+python-versions = ">=3.7"
 
 [package.extras]
-dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest 
(>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", 
"furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"]
-docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
-tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest 
(>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", 
"cloudpickle"]
-tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest 
(>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"]
+cov = ["attrs", "coverage[toml] (>=5.3)"]
+dev = ["attrs", "pre-commit"]
+docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", 
"sphinxcontrib-towncrier", "towncrier", "zope-interface"]
+tests = ["attrs", "zope-interface"]
+tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", 
"pytest-mypy-plugins", "pytest-xdist", "pytest (>=4.3.0)"]
 
 [[package]]
 name = "bcrypt"
@@ -26,7 +27,7 @@ typecheck = ["mypy"]
 
 [[package]]
 name = "black"
-version = "22.10.0"
+version = "22.12.0"
 description = "The uncompromising code formatter."
 category = "dev"
 optional = false
@@ -58,7 +59,7 @@ pycparser = "*"
 
 [[package]]
 name = "click"
-version = "8.1.3"
+version = "8.1.4"
 description = "Composable command line interface toolkit"
 category = "dev"
 optional = false
@@ -77,11 +78,11 @@ python-versions = 
"!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7
 
 [[package]]
 name = "cryptography"
-version = "40.0.2"
+version = "41.0.2"
 description = "cryptography is a package which provides cryptographic recipes 
and primitives to Python developers."
 category = "main"
 optional = false
-python-versions = ">=3.6"
+python-versions = ">=3.7"
 
 [package.dependencies]
 cffi = ">=1.12"
@@ -89,12 +90,12 @@ cffi = ">=1.12"
 [package.extras]
 docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"]
 docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", 
"sphinxcontrib-spelling (>=4.0.1)"]
-pep8test = ["black", "ruff", "mypy", "check-manifest"]
-sdist = ["setuptools-rust (>=0.11.4)"]
+nox = ["nox"]
+pep8test = ["black", "ruff", "mypy", "check-sdist"]
+sdist = ["build"]
 ssh = ["bcrypt (>=3.1.5)"]
-test = ["pytest (>=6.2.0)", "pytest-shard (>=0.1.2)", "pytest-benchmark", 
"pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601"]
+test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist", 
"pretend"]
 test-randomorder = ["pytest-randomly"]
-tox = ["tox"]
 
 [[package]]
 name = "fabric"
@@ -123,53 +124,66 @@ python-versions = "*"
 
 [[package]]
 name = "isort"
-version = "5.10.1"
+version = "5.12.0"
 description = "A Python utility / library to sort Python imports."
 category = "dev"
 optional = false
-python-versions = ">=3.6.1,<4.0"
+python-versions = ">=3.8.0"
 
 [package.extras]
-pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
-requirements_deprecated_finder = ["pipreqs", "pip-api"]
-colors = ["colorama (>=0.4.3,<0.5.0)"]
+colors = ["colorama (>=0.4.3)"]
+requirements-deprecated-finder = ["pip-api", "pipreqs"]
+pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", 
"requirementslib"]
 plugins = ["setuptools"]
 
 [[package]]
 name = "jsonpatch"
-version = "1.32"
+version = "1.33"
 description = "Apply JSON-Patches (RFC 6902)"
 category = "main"
 optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, 
!=3.5.*, !=3.6.*"
 
 [package.dependencies]
 jsonpointer = ">=1.9"
 
 [[package]]
 name = "jsonpointer"
-version = "2.3"
+version = "2.4"
 description = "Identify specific nodes in a JSON document (RFC 6901)"
 category = "main"
 optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, 
!=3.5.*, !=3.6.*"
 
 [[package]]
 name = "jsonschema"
-version = "4.17.0"
+version = "4.18.2"
 description = "An implementation of JSON Schema validation for Python"
 category = "main"
 optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
 
 [package.dependencies]
-attrs = ">=17.4.0"
-pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || 
>0.17.2"
+attrs = ">=22.2.0"
+jsonschema-specifications = ">=2023.03.6

Re: [PATCH v3 0/2] vduse: TSO & vIOMMU fixes

2023-07-13 Thread Maxime Coquelin




On 7/13/23 15:52, Maxime Coquelin wrote:

This series contains two patches to fix TSO support
and enable vIOMMU by default as it is required by
VDUSE.

Changes in v3:
==
- Ensure async copy cannot be enabled with VDUSE (Kevin)

Changes in v2:
==
- Fix typo in commit message
- Fix build when VDUSE is not supported by the Kernel (0-day robot)

Maxime Coquelin (2):
   vhost: fix net offload compliance
   vhost: force vIOMMU enablement with VDUSE

  lib/vhost/socket.c | 14 --
  lib/vhost/vduse.c  |  4 ++--
  lib/vhost/vduse.h  |  6 --
  3 files changed, 14 insertions(+), 10 deletions(-)



Thanks for the review!

Applied to dpdk-next-virtio/main.

Maxime



Re: [PATCH v6 2/2] dts: add paramiko to dependencies

2023-07-13 Thread Juraj Linkeš
On Thu, Jul 13, 2023 at 5:23 PM  wrote:
>
> From: Jeremy Spewock 
>
> added paramiko to the dependency files
>
> Signed-off-by: Jeremy Spewock 
> ---
>  dts/poetry.lock| 137 +++--
>  dts/pyproject.toml |   1 +
>  2 files changed, 82 insertions(+), 56 deletions(-)
>

> diff --git a/dts/pyproject.toml b/dts/pyproject.toml
> index 50bcdb327a..c4543d5c56 100644
> --- a/dts/pyproject.toml
> +++ b/dts/pyproject.toml
> @@ -13,6 +13,7 @@ warlock = "^2.0.1"
>  PyYAML = "^6.0"
>  types-PyYAML = "^6.0.8"
>  fabric = "^2.7.1"
> +paramiko = "^3.1.0"

Quick question - does the patch work with the paramiko version that
goes with Fabric? If so, then we don't need this commit.

>
>  [tool.poetry.dev-dependencies]
>  mypy = "^0.961"
> --
> 2.41.0
>


Re: [PATCH v6 2/2] dts: add paramiko to dependencies

2023-07-13 Thread Jeremy Spewock
On Thu, Jul 13, 2023 at 12:06 PM Juraj Linkeš 
wrote:

> On Thu, Jul 13, 2023 at 5:23 PM  wrote:
> >
> > From: Jeremy Spewock 
> >
> > added paramiko to the dependency files
> >
> > Signed-off-by: Jeremy Spewock 
> > ---
> >  dts/poetry.lock| 137 +++--
> >  dts/pyproject.toml |   1 +
> >  2 files changed, 82 insertions(+), 56 deletions(-)
> >
>
> > diff --git a/dts/pyproject.toml b/dts/pyproject.toml
> > index 50bcdb327a..c4543d5c56 100644
> > --- a/dts/pyproject.toml
> > +++ b/dts/pyproject.toml
> > @@ -13,6 +13,7 @@ warlock = "^2.0.1"
> >  PyYAML = "^6.0"
> >  types-PyYAML = "^6.0.8"
> >  fabric = "^2.7.1"
> > +paramiko = "^3.1.0"
>
> Quick question - does the patch work with the paramiko version that
> goes with Fabric? If so, then we don't need this commit.
>

I'm not completely sure if it is needed, but I would think that it would
work without this listed in the pyproject.toml. I left it in to be less
ambiguous as to where the package actually comes from, but I am okay with
removing it if that is preferred. I'll run a test without it now quickly to
make sure it works without this commit.


>
> >
> >  [tool.poetry.dev-dependencies]
> >  mypy = "^0.961"
> > --
> > 2.41.0
> >
>


Re: Fwd: |FAILURE| pw129411-129407 [PATCH] [v16,6/6] test/memarea: support du

2023-07-13 Thread Tyler Retzlaff
On Thu, Jul 13, 2023 at 08:08:27PM +0800, fengchengwen wrote:
> Hi Microsoft guys,
> 
> The unit-testing [1] show memarea_autotest has following error:

there isn't really anything here other than the test failed. i see this
test intermittently fail on both ubuntu and windows in my lab. the times
i have caught it seemed to be related to failure in huge page allocation
potentially due to fragmentation.

i'm afraid until msvc work is integrated i won't have much time to look
into non-deterministic test failures. you'd have to repro and walk
through test pass run / probably the eal init to get more information
to find out what is failing.

thanks



RE: [PATCH] doc: fix typos and wording in flow API guide

2023-07-13 Thread Mcnamara, John


> -Original Message-
> From: Ali Alnubani 
> Sent: Monday, July 3, 2023 8:58 AM
> To: dev@dpdk.org
> Cc: Doherty, Declan ; sta...@dpdk.org
> Subject: [PATCH] doc: fix typos and wording in flow API guide
> 
> This fixes typos, punctuation and wording in the rte flow API guide.
> 
> Fixes: 2f82d143fb31 ("ethdev: add group jump action")
> Cc: declan.dohe...@intel.com
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Ali Alnubani 


> -Group 0 is the default group and this is the only group which flows
> +Group 0 is the default group and is the only group where flows are

Slightly better is s/where flows/that flows/

With, or without that change:

Acked-by: John McNamara 





[PATCH v7 1/1] dts: add smoke tests

2023-07-13 Thread jspewock
From: Jeremy Spewock 

Adds a new test suite for running smoke tests that verify general
configuration aspects of the system under test. If any of these tests
fail, the DTS execution terminates as part of a "fail-fast" model.

Signed-off-by: Jeremy Spewock 
---
 dts/conf.yaml |  17 +-
 dts/framework/config/__init__.py  | 107 +--
 dts/framework/config/conf_yaml_schema.json| 142 +-
 dts/framework/dts.py  |  87 ++---
 dts/framework/exception.py|  12 ++
 dts/framework/remote_session/__init__.py  |  11 +-
 dts/framework/remote_session/os_session.py|  53 +-
 dts/framework/remote_session/posix_session.py |  29 ++-
 .../remote_session/remote/__init__.py |  10 +
 .../remote/interactive_remote_session.py  |  82 
 .../remote/interactive_shell.py   |  78 
 .../remote_session/remote/testpmd_shell.py|  74 
 dts/framework/test_result.py  |  37 +++-
 dts/framework/test_suite.py   |  10 +-
 dts/framework/testbed_model/node.py   |   2 +
 dts/framework/testbed_model/sut_node.py   | 176 +-
 dts/framework/utils.py|   3 +
 dts/tests/TestSuite_smoke_tests.py| 113 +++
 18 files changed, 945 insertions(+), 98 deletions(-)
 create mode 100644 
dts/framework/remote_session/remote/interactive_remote_session.py
 create mode 100644 dts/framework/remote_session/remote/interactive_shell.py
 create mode 100644 dts/framework/remote_session/remote/testpmd_shell.py
 create mode 100644 dts/tests/TestSuite_smoke_tests.py

diff --git a/dts/conf.yaml b/dts/conf.yaml
index 129801d87c..3a5d87cb49 100644
--- a/dts/conf.yaml
+++ b/dts/conf.yaml
@@ -10,9 +10,13 @@ executions:
 compiler_wrapper: ccache
 perf: false
 func: true
+skip_smoke_tests: false # optional flag that allow you to skip smoke tests
 test_suites:
   - hello_world
-system_under_test: "SUT 1"
+system_under_test:
+  node_name: "SUT 1"
+  vdevs: # optional; if removed, vdevs won't be used in the execution
+- "crypto_openssl"
 nodes:
   - name: "SUT 1"
 hostname: sut1.change.me.localhost
@@ -25,3 +29,14 @@ nodes:
 hugepages:  # optional; if removed, will use system hugepage configuration
 amount: 256
 force_first_numa: false
+ports:
+  - pci: ":00:08.0"
+os_driver_for_dpdk: vfio-pci # OS driver that DPDK will use
+os_driver: i40e
+peer_node: "TG 1"
+peer_pci: ":00:08.0"
+  - pci: ":00:08.1"
+os_driver_for_dpdk: vfio-pci
+os_driver: i40e
+peer_node: "TG 1"
+peer_pci: ":00:08.1"
diff --git a/dts/framework/config/__init__.py b/dts/framework/config/__init__.py
index a4b73483e6..fad56cc520 100644
--- a/dts/framework/config/__init__.py
+++ b/dts/framework/config/__init__.py
@@ -11,7 +11,8 @@
 import os.path
 import pathlib
 from dataclasses import dataclass
-from enum import auto, unique
+from enum import Enum, auto, unique
+from pathlib import PurePath
 from typing import Any, TypedDict
 
 import warlock  # type: ignore
@@ -65,6 +66,20 @@ class HugepageConfiguration:
 force_first_numa: bool
 
 
+@dataclass(slots=True, frozen=True)
+class PortConfig:
+node: str
+pci: str
+os_driver_for_dpdk: str
+os_driver: str
+peer_node: str
+peer_pci: str
+
+@staticmethod
+def from_dict(node: str, d: dict) -> "PortConfig":
+return PortConfig(node=node, **d)
+
+
 @dataclass(slots=True, frozen=True)
 class NodeConfiguration:
 name: str
@@ -77,6 +92,7 @@ class NodeConfiguration:
 use_first_core: bool
 memory_channels: int
 hugepages: HugepageConfiguration | None
+ports: list[PortConfig]
 
 @staticmethod
 def from_dict(d: dict) -> "NodeConfiguration":
@@ -85,19 +101,36 @@ def from_dict(d: dict) -> "NodeConfiguration":
 if "force_first_numa" not in hugepage_config:
 hugepage_config["force_first_numa"] = False
 hugepage_config = HugepageConfiguration(**hugepage_config)
+common_config = {
+"name": d["name"],
+"hostname": d["hostname"],
+"user": d["user"],
+"password": d.get("password"),
+"arch": Architecture(d["arch"]),
+"os": OS(d["os"]),
+"lcores": d.get("lcores", "1"),
+"use_first_core": d.get("use_first_core", False),
+"memory_channels": d.get("memory_channels", 1),
+"hugepages": hugepage_config,
+"ports": [PortConfig.from_dict(d["name"], port) for port in 
d["ports"]],
+}
+
+return NodeConfiguration(**common_config)
 
-return NodeConfiguration(
-name=d["name"],
-hostname=d["hostname"],
-user=d["user"],
-password=d.get("password"),
-arch

[PATCH v7 0/1] Add DTS smoke tests

2023-07-13 Thread jspewock
From: Jeremy Spewock 

Removed the commit for adding paramiko as a dependency because it is
now covered by installing Fabric.

RFCs for this patch:
* v3: https://mails.dpdk.org/archives/dev/2023-June/269859.html
* v2: https://mails.dpdk.org/archives/dev/2023-May/267915.html
* v1: https://mails.dpdk.org/archives/dev/2023-April/266580.html

Previous patch:
* v1: https://mails.dpdk.org/archives/dev/2023-June/271309.html
* v2: https://mails.dpdk.org/archives/dev/2023-July/272833.html
* v3: https://mails.dpdk.org/archives/dev/2023-July/272930.html
* v4: https://mails.dpdk.org/archives/dev/2023-July/272964.html
* v5: https://mails.dpdk.org/archives/dev/2023-July/272983.html
* v6: https://mails.dpdk.org/archives/dev/2023-July/273019.html

Jeremy Spewock (1):
  dts: add smoke tests

 dts/conf.yaml |  17 +-
 dts/framework/config/__init__.py  | 107 +--
 dts/framework/config/conf_yaml_schema.json| 142 +-
 dts/framework/dts.py  |  87 ++---
 dts/framework/exception.py|  12 ++
 dts/framework/remote_session/__init__.py  |  11 +-
 dts/framework/remote_session/os_session.py|  53 +-
 dts/framework/remote_session/posix_session.py |  29 ++-
 .../remote_session/remote/__init__.py |  10 +
 .../remote/interactive_remote_session.py  |  82 
 .../remote/interactive_shell.py   |  78 
 .../remote_session/remote/testpmd_shell.py|  74 
 dts/framework/test_result.py  |  37 +++-
 dts/framework/test_suite.py   |  10 +-
 dts/framework/testbed_model/node.py   |   2 +
 dts/framework/testbed_model/sut_node.py   | 176 +-
 dts/framework/utils.py|   3 +
 dts/tests/TestSuite_smoke_tests.py| 113 +++
 18 files changed, 945 insertions(+), 98 deletions(-)
 create mode 100644 
dts/framework/remote_session/remote/interactive_remote_session.py
 create mode 100644 dts/framework/remote_session/remote/interactive_shell.py
 create mode 100644 dts/framework/remote_session/remote/testpmd_shell.py
 create mode 100644 dts/tests/TestSuite_smoke_tests.py

-- 
2.41.0



[PATCH] doc: update compatible firmware version for bnxt

2023-07-13 Thread Ajit Khaparde
Update earliest supported firmware version for 22.11 release.

Signed-off-by: Ajit Khaparde 
---
 doc/guides/nics/bnxt.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst
index 0b09b0c50a..806288d495 100644
--- a/doc/guides/nics/bnxt.rst
+++ b/doc/guides/nics/bnxt.rst
@@ -916,6 +916,7 @@ Shown below are DPDK LTS releases and their supported 
firmware versions:
 * ``DPDK Release 19.11`` ... Firmware 219.0.103 or later
 * ``DPDK Release 20.11`` ... Firmware 219.0.103 or later
 * ``DPDK Release 21.11`` ... Firmware 221.0.101 or later
+* ``DPDK Release 22.11`` ... Firmware 226.0.131 or later
 
 Supported APIs
 --
-- 
2.39.2 (Apple Git-143)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [PATCH] doc: update compatible firmware version for bnxt

2023-07-13 Thread Ajit Khaparde
On Thu, Jul 13, 2023 at 9:58 AM Ajit Khaparde
 wrote:
>
> Update earliest supported firmware version for 22.11 release.
>
> Signed-off-by: Ajit Khaparde 
Patch applied to dpdk-next-net-brcm.

> ---
>  doc/guides/nics/bnxt.rst | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst
> index 0b09b0c50a..806288d495 100644
> --- a/doc/guides/nics/bnxt.rst
> +++ b/doc/guides/nics/bnxt.rst
> @@ -916,6 +916,7 @@ Shown below are DPDK LTS releases and their supported 
> firmware versions:
>  * ``DPDK Release 19.11`` ... Firmware 219.0.103 or later
>  * ``DPDK Release 20.11`` ... Firmware 219.0.103 or later
>  * ``DPDK Release 21.11`` ... Firmware 221.0.101 or later
> +* ``DPDK Release 22.11`` ... Firmware 226.0.131 or later
>
>  Supported APIs
>  --
> --
> 2.39.2 (Apple Git-143)
>


smime.p7s
Description: S/MIME Cryptographic Signature


[PATCH 1/1] net/sfc: drop redundant null check from IPv4 flow item parse

2023-07-13 Thread Ivan Malov
Such check is already done at an earlier point, in
sfc_flow_parse_pattern(), so remove it from IPv4
item parser. Doing so should fix Coverity issue.

Coverity issue: 395526
Fixes: f79ce621e963 ("net/sfc: support IPv4 fragment matching in transfer 
rules")
Cc: sta...@dpdk.org

Signed-off-by: Ivan Malov 
---
 drivers/net/sfc/sfc_mae.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 63f6536243..60a54fd425 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -2331,7 +2331,7 @@ sfc_mae_rule_parse_item_ipv4(const struct rte_flow_item 
*item,
if (ctx_mae->match_spec != ctx_mae->match_spec_action)
supp_mask.hdr.fragment_offset = 0;
 
-   if (item != NULL && item->last != NULL) {
+   if (item->last != NULL) {
last = item->last;
item_dup.last = NULL;
}
-- 
2.17.1



Re: Fwd: |FAILURE| pw129411-129407 [PATCH] [v16,6/6] test/memarea: support du

2023-07-13 Thread fengchengwen
Hi Tyler,

  Thanks for your reply, I will try work it out on your tips.

Thanks

On 2023/7/14 0:23, Tyler Retzlaff wrote:
> On Thu, Jul 13, 2023 at 08:08:27PM +0800, fengchengwen wrote:
>> Hi Microsoft guys,
>>
>> The unit-testing [1] show memarea_autotest has following error:
> 
> there isn't really anything here other than the test failed. i see this
> test intermittently fail on both ubuntu and windows in my lab. the times
> i have caught it seemed to be related to failure in huge page allocation
> potentially due to fragmentation.
> 
> i'm afraid until msvc work is integrated i won't have much time to look
> into non-deterministic test failures. you'd have to repro and walk
> through test pass run / probably the eal init to get more information
> to find out what is failing.
> 
> thanks
> 
> .
> 


RE: [PATCH v2 0/3] fix Rx and Tx queue status get

2023-07-13 Thread Zhang, Qi Z



> -Original Message-
> From: Yang, Qiming 
> Sent: Wednesday, July 12, 2023 4:32 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei ; Zhang, Qi Z ;
> Yang, Qiming 
> Subject: [PATCH v2 0/3] fix Rx and Tx queue status get
> 
> Some Intel drivers not support queue start/stop ops, it will caused
> application can't get correct queue status and can't forward packets.
> This patchset fixed the issue by updating the queue states when the queue
> is disabled or enabled.
> This issue related commit 141a520b35f7
> app/testpmd: fix primary process not polling all queues
> 
> ---
> v2 changes: add CC sta...@dpdk.org
> 
> Qiming Yang (3):
>   net/ixgbevf: fix Rx and Tx queue status get
>   net/igc: fix Rx and Tx queue status get
>   net/e1000: fix Rx and Tx queue status
> 
>  drivers/net/e1000/igb_rxtx.c   | 4 
>  drivers/net/igc/igc_txrx.c | 4 
>  drivers/net/ixgbe/ixgbe_rxtx.c | 6 ++
>  3 files changed, 14 insertions(+)
> 
> --
> 2.25.1

Acked-by: Qi Zhang 

Applied to dpdk-next-net-intel.

Thanks
Qi


Re: [PATCH 1/1] net/sfc: drop redundant null check from IPv4 flow item parse

2023-07-13 Thread Andrew Rybchenko

On 7/14/23 01:40, Ivan Malov wrote:

Such check is already done at an earlier point, in
sfc_flow_parse_pattern(), so remove it from IPv4
item parser. Doing so should fix Coverity issue.

Coverity issue: 395526
Fixes: f79ce621e963 ("net/sfc: support IPv4 fragment matching in transfer 
rules")
Cc: sta...@dpdk.org

Signed-off-by: Ivan Malov 


Acked-by: Andrew Rybchenko 




[PATCH v2] app/test:subprocess synchronization of parameters

2023-07-13 Thread Kaisen You
In meson_test, because the child process does not synchronize
the NIC startup parameters of the parent process at startup,
it uses all NICs bound by vfio as startup parameters by default,
and an exception occurs in the subsequent hugefile check,
causing the test to fail. Synchronize the NIC startup parameters
of the parent process to the child process to solve this problem.

Fixes: af75078fece3 ("first public release")
Cc: sta...@dpdk.org

Signed-off-by: Kaisen You 

---
Changes since v1:
- change the patch title to modify the way child
  processes get NIC parameters,
---
 app/test/process.h | 27 +++
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/app/test/process.h b/app/test/process.h
index 1f073b9c5c..6a8505b80c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -15,9 +15,12 @@
 #include  /* strerror */
 #include  /* readlink */
 #include 
+#include 
 
 #include  /* strlcpy */
 
+#define MAX_EXTRA_ARGS 32
+#define PCI_PRI_FMT "%.4" PRIx32 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
 #ifdef RTE_EXEC_ENV_FREEBSD
 #define self "curproc"
 #define exe "file"
@@ -33,7 +36,6 @@ extern void *send_pkts(void *empty);
 extern uint16_t flag_for_send_pkts;
 #endif
 #endif
-
 /*
  * launches a second copy of the test process using the given argv parameters,
  * which should include argv[0] as the process name. To identify in the
@@ -44,9 +46,13 @@ static inline int
 process_dup(const char *const argv[], int numargs, const char *env_value)
 {
int num;
-   char *argv_cpy[numargs + 1];
-   int i, status;
+   char *argv_cpy[MAX_EXTRA_ARGS];
+   int i, status, s;
char path[32];
+   struct rte_pci_device *dev = NULL;
+   char type[MAX_EXTRA_ARGS];
+   char *argv_str[MAX_EXTRA_ARGS];
+   char str_1[] = "-a";
 #ifdef RTE_LIB_PDUMP
 #ifdef RTE_NET_RING
pthread_t thread;
@@ -113,10 +119,23 @@ process_dup(const char *const argv[], int numargs, const 
char *env_value)
closedir(dir);
}
 #endif
+   s = -1;
+   argv_str[0] = strdup(str_1);
+   FOREACH_DEVICE_ON_PCIBUS(dev) {
+   s = s + 2;
+   sprintf(type, PCI_PRI_FMT, dev->addr.domain,
+   dev->addr.bus, dev->addr.devid, dev->addr.function);
+   argv_str[s - 1] = strdup(str_1);
+   argv_str[s] = strdup(type);
+   }
+   for (i = 0; i < s + 1; i++)
+   argv_cpy[num + i] = strdup(argv_str[i]);
+
printf("Running binary with argv[]:");
-   for (i = 0; i < num; i++)
+   for (i = 0; i < num + s + 1; i++)
printf("'%s' ", argv_cpy[i]);
printf("\n");
+   argv_cpy[numargs + s + 1] = NULL;
fflush(stdout);
 
/* set the environment variable */
-- 
2.25.1