Re: [dpdk-dev] [PATCH 2/2] vhost: notice Vhost ops struct renaming

2021-08-03 Thread Adrian Moreno
_ops`` > + int DPDK v21.11. > With nits spotted by Chenbo, Acked-by: Adrian Moreno

Re: [dpdk-dev] [RFC 3/3] net/virtio: add MAC device config getter and setter

2021-04-16 Thread Adrian Moreno
On 3/18/21 11:35 PM, Maxime Coquelin wrote: > This patch uses the new device config ops to get and set > the MAC address if supported. > > If a valid MAC address is passed as devarg of the > Virtio-user PMD, the driver will try to store it in the > device config space. Otherwise the one provide

Re: [dpdk-dev] [RFC 0/3] net/virtio: add vdpa device config support

2021-04-16 Thread Adrian Moreno
On 3/18/21 11:35 PM, Maxime Coquelin wrote: > This patch adds vDPA device config space requests support. > For now, it only adds MAC address get and set. It may be > extended in next revision to support other configs like > link state. > > Regarding the MAC selection strategy, if devargs MAC ad

Re: [dpdk-dev] [RFC 0/4] SocketPair Broker support for vhost and virtio-user.

2021-03-23 Thread Adrian Moreno
On 3/19/21 6:21 PM, Stefan Hajnoczi wrote: > On Fri, Mar 19, 2021 at 04:29:21PM +0100, Ilya Maximets wrote: >> On 3/19/21 3:05 PM, Stefan Hajnoczi wrote: >>> On Thu, Mar 18, 2021 at 08:47:12PM +0100, Ilya Maximets wrote: On 3/18/21 6:52 PM, Stefan Hajnoczi wrote: > On Wed, Mar 17, 2021

Re: [dpdk-dev] [PATCH 37/40] net/virtio: introduce backend data

2021-01-13 Thread Adrian Moreno
On 12/20/20 10:14 PM, Maxime Coquelin wrote: > The goal of this patch is to introduce backend-specific > data in order to better isolate what is backend-specific > from what is generic to Virtio-user. > > For now, only Vhost-user protocol features are moved to > Vhost-user backend data. > > Si

Re: [dpdk-dev] [PATCH 25/40] net/virtio: add Virtio-user features ops

2021-01-13 Thread Adrian Moreno
On 12/20/20 10:13 PM, Maxime Coquelin wrote: > This patch introduce new callbacks for getting > and setting Virtio features, and implements them > for the different backend types. > > Signed-off-by: Maxime Coquelin > --- > drivers/net/virtio/virtio_user/vhost.h| 2 + > drivers/net/v

Re: [dpdk-dev] [PATCH 25/40] net/virtio: add Virtio-user features ops

2021-01-13 Thread Adrian Moreno
Hi Chenbo On 1/6/21 12:54 PM, Xia, Chenbo wrote: > Hi Maxime, > >> -Original Message- >> From: Maxime Coquelin >> Sent: Monday, December 21, 2020 5:14 AM >> To: dev@dpdk.org; Xia, Chenbo ; olivier.m...@6wind.com; >> amore...@redhat.com; david.march...@redhat.com >> Cc: Maxime Coquelin >

[dpdk-dev] [PATCH v3 6/6] net/virtio-user: set status on socket reconnect

2020-10-26 Thread Adrian Moreno
Newer vhost-user backends will rely on SET_STATUS to start the device so this required to support them. Fixes: 57912824615f ("net/virtio-user: support vhost status setting") Cc: maxime.coque...@redhat.com Cc: sta...@dpdk.org Signed-off-by: Adrian Moreno --- drivers/

[dpdk-dev] [PATCH v3 4/6] net/virtio-user: lock-protect status updates

2020-10-26 Thread Adrian Moreno
In order to safely set and get the device status from different threads (e.g: interrupt handlers). Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 14 +++--- drivers/net/virtio/virtio_user/virtio_user_dev.h | 4 ++-- drivers/net/virtio

[dpdk-dev] [PATCH v3 5/6] net/virtio-user: don't assume vhost status feature

2020-10-26 Thread Adrian Moreno
reconnection and cleare it on disconnection. Fixes: 57912824615f ("net/virtio-user: support vhost status setting") Cc: maxime.coque...@redhat.com Cc: sta...@dpdk.org Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 ++ drivers/net/virtio/virtio_use

[dpdk-dev] [PATCH v3 3/6] net/virtio-user: ignore result if STATUS is unsupported

2020-10-26 Thread Adrian Moreno
-allocated variable. To fix this, return ENOTSUP if the feature is not supported and, in that case, don't update device status. Fixes: 44102e6298e7 ("net/virtio: check protocol feature in user backend") Cc: maxime.coque...@redhat.com Cc sta...@dpdk.org Signed-off-by: Adrian Moreno -

[dpdk-dev] [PATCH v3 2/6] net/virtio-user: don't set/get_status until FEATURES_OK

2020-10-26 Thread Adrian Moreno
messages should not be sent. Fixes: 57912824615f ("net/virtio-user: support vhost status setting") Cc: maxime.coque...@redhat.com Cc: sta...@dpdk.org Reviewed-by: Maxime Coquelin Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/vhost_user.c | 10 ++ 1 file

[dpdk-dev] [PATCH v3 1/6] net/virtio-user: fix backend selection if stat fails

2020-10-26 Thread Adrian Moreno
Acked-by: Kevin Traynor Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++ drivers/net/virtio/virtio_user/virtio_user_dev.h | 1 + drivers/net/virtio/virtio_user_ethdev.c | 6 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH v3 0/6] net/virtio-user: fix server mode

2020-10-26 Thread Adrian Moreno
d type Adrian Moreno (6): net/virtio-user: fix backend selection if stat fails net/virtio-user: don't set/get_status until FEATURES_OK net/virtio-user: ignore result if STATUS is unsupported net/virtio-user: lock-protect status updates net/virtio-user: don't assume vhost stat

Re: [dpdk-dev] [PATCH v2 3/3] virtio-user: set status on virtio-user reconnect

2020-10-22 Thread Adrian Moreno
On 10/22/20 9:37 AM, Xia, Chenbo wrote: > Hi Maxime, > >> -Original Message- >> From: Maxime Coquelin >> Sent: Thursday, October 22, 2020 3:14 PM >> To: Wang, Yinan ; Adrian Moreno >> ; dev@dpdk.org; Xia, Chenbo >> Cc: Fu, Patrick ; sta.

[dpdk-dev] [PATCH v2 3/3] virtio-user: set status on virtio-user reconnect

2020-10-20 Thread Adrian Moreno
Newer vhost-user backends will rely on SET_STATUS to start the device so this required to support them. Fixes: 57912824615f ("net/virtio-user: support vhost status setting") Cc: maxime.coque...@redhat.com Cc: sta...@dpdk.org Signed-off-by: Adrian Moreno --- drivers/

[dpdk-dev] [PATCH v2 2/3] virtio_user: don't set/get_status until FEATURES_OK

2020-10-20 Thread Adrian Moreno
messages should not be sent. Fixes: 57912824615f ("net/virtio-user: support vhost status setting") Cc: maxime.coque...@redhat.com Cc: sta...@dpdk.org Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/vhost_user.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletion

[dpdk-dev] [PATCH v2 1/3] virtio-user: fix backend selection if stat fails

2020-10-20 Thread Adrian Moreno
If stat fails because the file does not exist, it means that the backend must be vhost-user in server mode. Also, log the detected backend type. Bugzilla ID: 559 Fixes: f908b22ea47a ("net/virtio: move backend type selection to ethdev") Cc: sta...@dpdk.org Signed-off-by: Adr

[dpdk-dev] [PATCH v2 0/3] virtio-user: fix virtio-user server mode

2020-10-20 Thread Adrian Moreno
end type Adrian Moreno (3): virtio-user: fix backend selection if stat fails virtio_user: don't set/get_status until FEATURES_OK virtio-user: set status on virtio-user reconnect drivers/net/virtio/virtio_user/vhost_user.c | 10 ++ .../net/virtio/virtio_user/virtio_user_dev

Re: [dpdk-dev] [PATCH] virtio-user: fix backend selection if stat fails

2020-10-20 Thread Adrian Moreno
On 10/20/20 11:55 AM, Maxime Coquelin wrote: > > > On 10/20/20 11:38 AM, Kevin Traynor wrote: >> On 20/10/2020 10:11, Maxime Coquelin wrote: >>> >>> >>> On 10/20/20 11:01 AM, Kevin Traynor wrote: >>>> On 20/10/2020 08:16, Adrian Moreno w

Re: [dpdk-dev] [PATCH v3 3/8] net/virtio: move backend type selection to ethdev

2020-10-20 Thread Adrian Moreno
his issue blocked amount of regression cases, could you help to take a >>> look? >>> Thanks in advance! >>> >>> >>> BR, >>> Yinan >>> >>> >>>> -Original Message- >>>> From: dev On Behalf Of Maxime Coque

[dpdk-dev] [PATCH] virtio-user: fix backend selection if stat fails

2020-10-20 Thread Adrian Moreno
If stat fails it means the backend must be vhost-user in server mode Bugzilla ID: 559 Fixes: f908b22ea47a ("net/virtio: move backend type selection to ethdev") Cc: sta...@dpdk.org Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user_ethdev.c | 5 +++-- 1 file changed, 3

Re: [dpdk-dev] [PATCH v1] vhost: add device reset status

2020-08-06 Thread Adrian Moreno
On 8/6/20 1:34 PM, Chenbo Xia wrote: > vhost lib now does not have definition of reset status. This patch > adds the reset status definiton and changes related log. > > Signed-off-by: Chenbo Xia > --- > lib/librte_vhost/vhost.h | 1 + > lib/librte_vhost/vhost_user.c | 2 ++ > 2 files cha

[dpdk-dev] [PATCH v3 4/4] net/virtio: enable feature checking on virtio-user

2020-08-05 Thread Adrian Moreno
. This is currently being done only in modern virtio-pci devices but since the appropriate vhost-user messages have been added, it can also be done in virtio-user (vhost-user only). This patch activates this mechanism on virtio-user. Reviewed-by: Chenbo Xia Signed-off-by: Adrian Moreno

[dpdk-dev] [PATCH v3 1/4] net/virtio: add DEVICE_NEEDS_RESET status bit

2020-08-05 Thread Adrian Moreno
For the sake of completeness, add the definition of the missing status bit in accordance with the virtio spec Reviewed-by: Chenbo Xia Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_pci.h | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net

[dpdk-dev] [PATCH v3 2/4] net/virtio: add VIRTIO_SET_STATUS support to Virtio-user

2020-08-05 Thread Adrian Moreno
-by: Maxime Coquelin Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/vhost.h| 6 + drivers/net/virtio/virtio_user/vhost_user.c | 10 +++ .../net/virtio/virtio_user/virtio_user_dev.c | 26 ++- .../net/virtio/virtio_user/virtio_user_dev.h | 1

[dpdk-dev] [PATCH v3 0/4] Add support for GET/SET_STATUS on virtio-user pmd

2020-08-05 Thread Adrian Moreno
features in the virtio-user pmd --- v3: - Add Reviewed-by tags. - [Chenbo] Log RESET status v2: - Drop "net/virtio: split virtio-net and virtio status" An identical patch has already been merged - [Chenbo] Log when set-status fails Adrian Moreno (3): net/virtio: add DEVICE_NEEDS_RE

[dpdk-dev] [PATCH v3 3/4] net/virtio: add GET_STATUS support to virtio-user

2020-08-05 Thread Adrian Moreno
This patch adds support for VHOST_USER_GET_STATUS request. Only vhost-user backed is supported for now Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/vhost_user.c | 2 + .../net/virtio/virtio_user/virtio_user_dev.c | 44 +++ .../net/virtio/virtio_user

Re: [dpdk-dev] [PATCH v2 1/4] net/virtio: add DEVICE_NEEDS_RESET status bit

2020-08-05 Thread Adrian Moreno
On 8/5/20 12:52 PM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message----- >> From: Adrian Moreno >> Sent: Tuesday, August 4, 2020 3:24 PM >> To: dev@dpdk.org >> Cc: Wang, Zhihong ; Xia, Chenbo >> ; maxime.coque...@redhat.com; Adrian Moreno

Re: [dpdk-dev] [PATCH v2 3/4] net/virtio: add GET_STATUS support to virtio-user

2020-08-05 Thread Adrian Moreno
On 8/5/20 12:55 PM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message----- >> From: Adrian Moreno >> Sent: Tuesday, August 4, 2020 3:25 PM >> To: dev@dpdk.org >> Cc: Wang, Zhihong ; Xia, Chenbo >> ; maxime.coque...@redhat.com; Adrian Moreno

Re: [dpdk-dev] [PATCH] devtools: ignore PREFER_FALLTHROUGH

2020-08-05 Thread Adrian Moreno
Hi Thomas, On 8/5/20 11:12 AM, Thomas Monjalon wrote: > 04/08/2020 09:38, Adrian Moreno: >> The PREFER_FALLTHROUGH check warns if a passthrough comment is found >> because, in the kernel, the special macro "fallthrough" is prefered. >> >> Since that keywo

[dpdk-dev] [PATCH] devtools: ignore PREFER_FALLTHROUGH

2020-08-04 Thread Adrian Moreno
witch case/default is not preceded by break or a fallthrough comment. Signed-off-by: Adrian Moreno --- devtools/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index acf921ae0..4283ca82b 100755 ---

[dpdk-dev] [PATCH v2 2/4] net/virtio: add VIRTIO_SET_STATUS support to Virtio-user

2020-08-04 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/vhost.h| 6 + drivers/net/virtio/virtio_user/vhost_user.c | 10 +++ .../net/virtio/virtio_user/virtio_user_dev.c | 26 ++- .../net/virtio/virtio_user/virtio_user_dev.h | 1 + drivers/net/virtio

[dpdk-dev] [PATCH v2 4/4] net/virtio: enable feature checking on virtio-user

2020-08-04 Thread Adrian Moreno
. This is currently being done only in modern virtio-pci devices but since the appropriate vhost-user messages have been added, it can also be done in virtio-user (vhost-user only). This patch activates this mechanism on virtio-user. Signed-off-by: Adrian Moreno --- drivers/net/virtio

[dpdk-dev] [PATCH v2 0/4] Add support for GET/SET_STATUS on virtio-user pmd

2020-08-04 Thread Adrian Moreno
features in the virtio-user pmd --- v2: - Drop "net/virtio: split virtio-net and virtio status" An identical patch has already been merged - [Chenbo] Log when set-status fails Adrian Moreno (3): net/virtio: add DEVICE_NEEDS_RESET status bit net/virtio: add GET_STATUS support to v

[dpdk-dev] [PATCH v2 3/4] net/virtio: add GET_STATUS support to virtio-user

2020-08-04 Thread Adrian Moreno
This patch adds support for VHOST_USER_GET_STATUS request. Only vhost-user backed is supported for now Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/vhost_user.c | 2 + .../net/virtio/virtio_user/virtio_user_dev.c | 42 +++ .../net/virtio/virtio_user

[dpdk-dev] [PATCH v2 1/4] net/virtio: add DEVICE_NEEDS_RESET status bit

2020-08-04 Thread Adrian Moreno
For the sake of completeness, add the definition of the missing status bit in accordance with the virtio spec Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_pci.h | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/virtio/virtio_pci.h b

Re: [dpdk-dev] [PATCH 3/5] net/virtio: add VIRTIO_SET_STATUS support to Virtio-user

2020-07-16 Thread Adrian Moreno
On 7/16/20 10:58 AM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message----- >> From: Adrian Moreno >> Sent: Thursday, July 16, 2020 3:43 PM >> To: Xia, Chenbo ; dev@dpdk.org >> Cc: maxime.coque...@redhat.com; Wang, Zhihong >>

Re: [dpdk-dev] [PATCH 4/5] net/virtio: add GET_STATUS support to virtio-user

2020-07-16 Thread Adrian Moreno
On 7/16/20 10:18 AM, David Marchand wrote: > On Thu, Jul 16, 2020 at 9:53 AM Adrian Moreno wrote: >>>> +if (ret > UINT8_MAX) { >>>> +PMD_INIT_LOG(ERR, "Invalid VHOST_USER_GET_STATUS >>>> response 0x%" PRIx64 &

Re: [dpdk-dev] [PATCH 4/5] net/virtio: add GET_STATUS support to virtio-user

2020-07-16 Thread Adrian Moreno
On 7/16/20 5:31 AM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message----- >> From: Adrian Moreno >> Sent: Thursday, July 16, 2020 1:18 AM >> To: dev@dpdk.org >> Cc: maxime.coque...@redhat.com; Wang, Zhihong ; >> amore...@redhat.com; Xia,

Re: [dpdk-dev] [PATCH 3/5] net/virtio: add VIRTIO_SET_STATUS support to Virtio-user

2020-07-16 Thread Adrian Moreno
On 7/16/20 5:15 AM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message----- >> From: Adrian Moreno >> Sent: Thursday, July 16, 2020 1:18 AM >> To: dev@dpdk.org >> Cc: maxime.coque...@redhat.com; Wang, Zhihong ; >> amore...@redhat.com; Xia,

Re: [dpdk-dev] [PATCH 2/5] net/virtio: add DEVICE_NEEDS_RESET status bit

2020-07-16 Thread Adrian Moreno
Hi, On 7/16/20 4:26 AM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message----- >> From: Adrian Moreno >> Sent: Thursday, July 16, 2020 1:18 AM >> To: dev@dpdk.org >> Cc: maxime.coque...@redhat.com; Wang, Zhihong ; >> amore...@redhat.com; Xia,

[dpdk-dev] [PATCH 5/5] net/virtio: enable feature checking on virtio-user

2020-07-15 Thread Adrian Moreno
. This is currently being done only in modern virtio-pci devices but since the appropriate vhost-user messages have been added, it can also be done in virtio-user (vhost-user only). This patch activates this mechanism on virtio-user. Signed-off-by: Adrian Moreno --- drivers/net/virtio

[dpdk-dev] [PATCH 4/5] net/virtio: add GET_STATUS support to virtio-user

2020-07-15 Thread Adrian Moreno
This patch adds support for VHOST_USER_GET_STATUS request. Only vhost-user backed is supported for now Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/vhost_user.c | 2 + .../net/virtio/virtio_user/virtio_user_dev.c | 39 +++ .../net/virtio/virtio_user

[dpdk-dev] [PATCH 3/5] net/virtio: add VIRTIO_SET_STATUS support to Virtio-user

2020-07-15 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/vhost.h| 6 + drivers/net/virtio/virtio_user/vhost_user.c | 10 .../net/virtio/virtio_user/virtio_user_dev.c | 23 ++- .../net/virtio/virtio_user/virtio_user_dev.h | 1 + drivers/net/virtio

[dpdk-dev] [PATCH 2/5] net/virtio: add DEVICE_NEEDS_RESET status bit

2020-07-15 Thread Adrian Moreno
For the sake of completeness, add the definition of the missing status bit in accordance with the virtio spec Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_pci.h | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/virtio/virtio_pci.h b

[dpdk-dev] [PATCH 0/5] Add support for GET/SET_STATUS on virtio-user pmd

2020-07-15 Thread Adrian Moreno
features in the virtio-user pmd Adrian Moreno (4): net/virtio: split virtio-net and virtio status net/virtio: add DEVICE_NEEDS_RESET status bit net/virtio: add GET_STATUS support to virtio-user net/virtio: enable feature checking on virtio-user Maxime Coquelin (1): net/virtio: add

[dpdk-dev] [PATCH 1/5] net/virtio: split virtio-net and virtio status

2020-07-15 Thread Adrian Moreno
fields. Signed-off-by: Adrian Moreno --- drivers/net/virtio/virtio_user/virtio_user_dev.h | 5 - drivers/net/virtio/virtio_user_ethdev.c | 11 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net

Re: [dpdk-dev] [PATCH v1] net/virtio-user: fix uninitialized variable

2020-07-14 Thread Adrian Moreno
On 7/14/20 1:03 PM, Chenbo Xia wrote: > This patch fixes an issue that uninitialized has_reply_ack > is used for setting message flags. > > Coverity issue: 360834 > Fixes: c60208dd6384 ("net/virtio-user: support reply-ack") > > Signed-off-by: Chenbo Xia > --- > drivers/net/virtio/virtio_user/

Re: [dpdk-dev] [PATCH v3 3/3] lib/vhost: restrict pointer aliasing for packed vpmd

2020-07-10 Thread Adrian Moreno
On 7/10/20 4:38 AM, Joyce Kong wrote: > Restrict pointer aliasing to allow the compiler to vectorize loop > more aggressively. > > With this patch, a 9.6% improvement is observed in throughput for > the packed virtio-net PVP case, and a 2.8% improvement in throughput > for the packed virtio-use

Re: [dpdk-dev] [PATCH v1 2/2] lib/vhost: restrict pointer aliasing for packed path

2020-07-07 Thread Adrian Moreno
On 6/11/20 5:32 AM, Joyce Kong wrote: > Restrict pointer aliasing to allow the compiler to vectorize > loops more aggressively. > > With this patch, a 9.6% improvement is observed in throughput for the > packed virtio-net PVP case, and a 2.8% improvement in throughput for > the packed virtio-use

[dpdk-dev] [PATCH v3 8/8] vdpa/mlx5: enable status protocol feature

2020-07-06 Thread Adrian Moreno
From: Maxime Coquelin This patch advertises VHOST_USER_PROTOCOL_F_STATUS support in the MLX5 driver so that that the protocol feature is negotiated. Signed-off-by: Maxime Coquelin --- drivers/vdpa/mlx5/mlx5_vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vd

[dpdk-dev] [PATCH v3 7/8] vdpa/ifc: enable status protocol feature

2020-07-06 Thread Adrian Moreno
From: Maxime Coquelin This patch advertises VHOST_USER_PROTOCOL_F_STATUS support in the IFC driver so that that the protocol feature is negotiated. Signed-off-by: Maxime Coquelin --- drivers/vdpa/ifc/ifcvf_vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdp

[dpdk-dev] [PATCH v3 6/8] vhost: add support for virtio get status message

2020-07-06 Thread Adrian Moreno
negotiation, the driver sets the FEATURE_OK status bit and re-reads it to ensure the device has accepted the features. This patch also clears the FEATURE_OK status bit if the feature negotiation has failed to let the driver know about his failure. Signed-off-by: Adrian Moreno --- lib/librte_vhost/vhost.h

[dpdk-dev] [PATCH v3 5/8] vhost: add support for virtio status

2020-07-06 Thread Adrian Moreno
From: Maxime Coquelin This patch adds support to the new Virtio device status Vhost-user protocol feature. Getting such information in the backend helps to know when the driver is done with the device configuration and so makes the initialization phase more robust. Signed-off-by: Maxime Coqueli

[dpdk-dev] [PATCH v3 4/8] vhost: check vDPA configuration succeed

2020-07-06 Thread Adrian Moreno
From: Maxime Coquelin This patch checks whether vDPA device configuration succeed and does not set the CONFIGURED flag if it didn't. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhos

[dpdk-dev] [PATCH v3 3/8] vhost: make some vDPA callbacks mandatory

2020-07-06 Thread Adrian Moreno
From: Maxime Coquelin Some of the vDPA callbacks have to be implemented for vDPA to work properly. This patch marks them as mandatory in the API doc and simplify code calling these ops with removing unnecessary checks that are now done at registration time. Signed-off-by: Maxime Coquelin ---

[dpdk-dev] [PATCH v3 2/8] vhost: refactor Virtio ready check

2020-07-06 Thread Adrian Moreno
From: Maxime Coquelin This patch is a small refactoring, as preliminary work for adding support to Virtio status support. No functionnal change here. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost.c | 1 + lib/librte_vhost/vhost_user.c | 33 +

[dpdk-dev] [PATCH (v20.08) v3 0/8] vhost: improve Vhost/vDPA device init

2020-07-06 Thread Adrian Moreno
expected to reconfigure the file descriptors. - Updated the message ids as per latest version of qemu spec: - Added VHOST_USER_GET_STATUS support - [Chenbo Xia] Add validate_msg_fds to set_staus message handler --- Adrian Moreno (1): vhost: add support for virtio get status message Maxime Coquelin

[dpdk-dev] [PATCH v3 1/8] vhost: fix virtio ready flag check

2020-07-06 Thread Adrian Moreno
From: Maxime Coquelin Before checking whether the device is ready is done a check on whether the RUNNING flag is set. Then the READY flag is set if virtio_is_ready() returns true. While it seems to not cause any issue, it makes more sense to check whether the READY flag is set and not the RUNNIN

Re: [dpdk-dev] [PATCH v2 6/8] vhost: add support for virtio get status message

2020-07-06 Thread Adrian Moreno
On 7/6/20 12:29 PM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message----- >> From: Adrian Moreno >> Sent: Monday, July 6, 2020 4:49 PM >> To: Xia, Chenbo ; dev@dpdk.org; >> shah...@mellanox.com; ma...@mellanox.com; maxime.coque...@re

Re: [dpdk-dev] [PATCH v2 6/8] vhost: add support for virtio get status message

2020-07-06 Thread Adrian Moreno
On 7/6/20 5:22 AM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message- >> From: dev On Behalf Of Adrian Moreno >> Sent: Thursday, July 2, 2020 4:33 PM >> To: dev@dpdk.org; Ye, Xiaolong ; >> shah...@mellanox.com; ma...@mellanox.com; maxime.

Re: [dpdk-dev] [PATCH v2 6/8] vhost: add support for virtio get status message

2020-07-06 Thread Adrian Moreno
On 7/5/20 3:15 PM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message- >> From: dev On Behalf Of Adrian Moreno >> Sent: Thursday, July 2, 2020 4:33 PM >> To: dev@dpdk.org; Ye, Xiaolong ; >> shah...@mellanox.com; ma...@mellanox.com; maxime.

[dpdk-dev] [PATCH v4 0/2] net/virtio: add vhost-user protocol features support

2020-07-03 Thread Adrian Moreno
This series adds Vhost-user protocol features support to Virtio-user PMD's Vhost-user backend. The first patch introduces protocol features negotiation, and the second one reply-ack feature. --- Changes since v3: - [Chenbo] Do not process MQ if VHOST_USER_F_PROTOCOL_FEATURES is unsupported Cha

[dpdk-dev] [PATCH v4 2/2] net/virtio: add reply-ack support to Virtio-user

2020-07-03 Thread Adrian Moreno
From: Maxime Coquelin This patch adds support reply-ack vhost-user protocol feature, which is for now only used to ensure VHOST_USER_SET_MEM_TABLE requests are handled by the slave, but later will be used for VHOST_USER_SET_STATUS. Signed-off-by: Maxime Coquelin --- drivers/net/virtio/virtio_u

[dpdk-dev] [PATCH v4 1/2] net/virtio: add vhost-user protocol features support

2020-07-03 Thread Adrian Moreno
From: Maxime Coquelin This patch adds support for Vhost-user protocol features. It is required to support protocol features that were not in initial Vhost-user specification, such as reply-ack, MTU... Also, this patch prevents Virtio multiqueue feature negotiation if the slave does not support M

Re: [dpdk-dev] [PATCH v3 1/2] net/virtio: add vhost-user protocol features support

2020-07-03 Thread Adrian Moreno
On 7/3/20 10:40 AM, Xia, Chenbo wrote: > Hi Adrian, > >> -Original Message----- >> From: Adrian Moreno >> Sent: Thursday, July 2, 2020 3:44 PM >> To: dev@dpdk.org >> Cc: Xia, Chenbo ; Wang, Zhihong >> ; Wang, Xiao W ; Yigit, >> Ferruh ; maxi

Re: [dpdk-dev] [PATCH v4 27/27] vhost: rename SLAVE to CLIENT

2020-07-03 Thread Adrian Moreno
On 7/2/20 1:17 PM, Xia, Chenbo wrote: > Hi Stephen, > > Thanks for working on this! The slave/master naming of vhost is defined > by vhost-user spec, which is maintained by QEMU. I think if we want to > change it. The spec in QEMU should first be changed, then as an implementation > of the spe

[dpdk-dev] [PATCH v2 7/8] vdpa/ifc: enable status protocol feature

2020-07-02 Thread Adrian Moreno
From: Maxime Coquelin This patch advertises VHOST_USER_PROTOCOL_F_STATUS support in the IFC driver so that that the protocol feature is negotiated. Signed-off-by: Maxime Coquelin Signed-off-by: Adrian Moreno --- drivers/vdpa/ifc/ifcvf_vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1

[dpdk-dev] [PATCH v2 8/8] vdpa/mlx5: enable status protocol feature

2020-07-02 Thread Adrian Moreno
From: Maxime Coquelin This patch advertises VHOST_USER_PROTOCOL_F_STATUS support in the MLX5 driver so that that the protocol feature is negotiated. Signed-off-by: Maxime Coquelin Signed-off-by: Adrian Moreno --- drivers/vdpa/mlx5/mlx5_vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1

[dpdk-dev] [PATCH v2 6/8] vhost: add support for virtio get status message

2020-07-02 Thread Adrian Moreno
negotiation, the driver sets the FEATURE_OK status bit and re-reads it to ensure the device has accepted the features. This patch also clears the FEATURE_OK status bit if the feature negotiation has failed to let the driver know about his failure. Signed-off-by: Adrian Moreno --- lib/librte_vhost/vhost.h

[dpdk-dev] [PATCH v2 4/8] vhost: check vDPA configuration succeed

2020-07-02 Thread Adrian Moreno
From: Maxime Coquelin This patch checks whether vDPA device configuration succeed and does not set the CONFIGURED flag if it didn't. Signed-off-by: Maxime Coquelin Signed-off-by: Adrian Moreno --- lib/librte_vhost/vhost_user.c | 7 +-- 1 file changed, 5 insertions(+), 2 dele

[dpdk-dev] [PATCH v2 3/8] vhost: make some vDPA callbacks mandatory

2020-07-02 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- lib/librte_vhost/rte_vdpa_dev.h | 14 -- lib/librte_vhost/socket.c | 6 +++--- lib/librte_vhost/vdpa.c | 10 ++ lib/librte_vhost/vhost.c| 2 +- lib/librte_vhost/vhost_user.c | 6 ++ 5 files changed, 24 insertions

[dpdk-dev] [PATCH (v20.08) v2 0/8] vhost: improve Vhost/vDPA device init

2020-07-02 Thread Adrian Moreno
staus message handler Adrian Moreno (1): vhost: add support for virtio get status message Maxime Coquelin (7): vhost: fix virtio ready flag check vhost: refactor Virtio ready check vhost: make some vDPA callbacks mandatory vhost: check vDPA configuration succeed vhost: add suppor

[dpdk-dev] [PATCH v2 2/8] vhost: refactor Virtio ready check

2020-07-02 Thread Adrian Moreno
From: Maxime Coquelin This patch is a small refactoring, as preliminary work for adding support to Virtio status support. No functionnal change here. Signed-off-by: Maxime Coquelin Signed-off-by: Adrian Moreno --- lib/librte_vhost/vhost.c | 1 + lib/librte_vhost/vhost_user.c | 33

[dpdk-dev] [PATCH v2 5/8] vhost: add support for virtio status

2020-07-02 Thread Adrian Moreno
Coquelin Signed-off-by: Adrian Moreno --- lib/librte_vhost/rte_vhost.h | 4 lib/librte_vhost/vhost.h | 9 +++ lib/librte_vhost/vhost_user.c | 45 ++- lib/librte_vhost/vhost_user.h | 6 +++-- 4 files changed, 61 insertions(+), 3 deletions(-) diff --git

[dpdk-dev] [PATCH v2 1/8] vhost: fix virtio ready flag check

2020-07-02 Thread Adrian Moreno
RUNNING one. Fixes: c0674b1bc898 ("vhost: move the device ready check at proper place") Cc: sta...@dpdk.org Signed-off-by: Maxime Coquelin Signed-off-by: Adrian Moreno --- lib/librte_vhost/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vh

[dpdk-dev] [PATCH v3 1/2] net/virtio: add vhost-user protocol features support

2020-07-02 Thread Adrian Moreno
From: Maxime Coquelin This patch adds support for Vhost-user protocol features. It is required to support protocol features that were not in initial Vhost-user specification, such as reply-ack, MTU... Also, this patch prevents Virtio multiqueue feature negotiation if the slave does not support M

[dpdk-dev] [PATCH v3 2/2] net/virtio: add reply-ack support to Virtio-user

2020-07-02 Thread Adrian Moreno
From: Maxime Coquelin This patch adds support reply-ack vhost-user protocol feature, which is for now only used to ensure VHOST_USER_SET_MEM_TABLE requests are handled by the slave, but later will be used for VHOST_USER_SET_STATUS. Signed-off-by: Maxime Coquelin --- drivers/net/virtio/virtio_u

[dpdk-dev] [PATCH v3 0/2] net/virtio: add vhost-user protocol features support

2020-07-02 Thread Adrian Moreno
This series adds Vhost-user protocol features support to Virtio-user PMD's Vhost-user backend. The first patch introduces protocol features negotiation, and the second one reply-ack feature. --- Changes since v2: - Added the new vhost-user messages to vhost_msg_strings[] Changes since v1: - Reba

[dpdk-dev] [PATCH v2 0/2] net/virtio: add vhost-user protocol features support

2020-07-01 Thread Adrian Moreno
This series adds Vhost-user protocol features support to Virtio-user PMD's Vhost-user backend. The first patch introduces protocol features negotiation, and the second one reply-ack feature. Changes since v1: - Rebased on top of virtio-next - Dropped patch 3 as it depends on a new SET_STATUS requ

[dpdk-dev] [PATCH v2 2/2] net/virtio: add reply-ack support to Virtio-user

2020-07-01 Thread Adrian Moreno
From: Maxime Coquelin This patch adds support reply-ack vhost-user protocol feature, which is for now only used to ensure VHOST_USER_SET_MEM_TABLE requests are handled by the slave, but later will be used for VHOST_USER_SET_STATUS. Signed-off-by: Maxime Coquelin --- drivers/net/virtio/virtio_u

[dpdk-dev] [PATCH v2 1/2] net/virtio: add vhost-user protocol features support

2020-07-01 Thread Adrian Moreno
From: Maxime Coquelin This patch adds support for Vhost-user protocol features. It is required to support protocol features that were not in initial Vhost-user specification, such as reply-ack, MTU... Also, this patch prevents Virtio multiqueue feature negotiation if the slave does not support M

Re: [dpdk-dev] [PATCH v3 00/14] vDPA API and framework rework

2020-06-26 Thread Adrian Moreno
On 6/26/20 4:04 PM, Maxime Coquelin wrote: > This series aims to rework the vDPA framework and > its API to better fit into the DPDK device model > and also be more easily consumable by applications. > > Main changes are creating a device class for vDPA, > which enables applications to iterate

Re: [dpdk-dev] [PATCH v3 09/14] vhost: use linked-list for vDPA devices

2020-06-26 Thread Adrian Moreno
On 6/26/20 4:04 PM, Maxime Coquelin wrote: > There is no more notion of device ID outside of vdpa.c. > We can now move from array to linked-list model for keeping > track of the vDPA devices. > > There is no point in using array here, as all vDPA API are > used from the control path, so no perf

Re: [dpdk-dev] [PATCH v3 12/14] examples/vdpa: remove useless device count

2020-06-26 Thread Adrian Moreno
On 6/26/20 3:27 PM, Maxime Coquelin wrote: > The VDPA example now uses the vDPA class iterator, so > knowing the number of available devices beforehand is > no longer needed. > > Signed-off-by: Maxime Coquelin > --- > examples/vdpa/main.c | 9 ++--- > 1 file changed, 2 insertions(+), 7 del

Re: [dpdk-dev] [PATCH v3 04/14] vhost: make vDPA framework bus agnostic

2020-06-26 Thread Adrian Moreno
On 6/26/20 3:27 PM, Maxime Coquelin wrote: > This patch makes the vDPA framework to no more > support only PCI devices, but any devices by relying > on the generic device name as identifier. > > Signed-off-by: Maxime Coquelin > --- > drivers/vdpa/ifc/ifcvf_vdpa.c | 9 +-- > drivers/

Re: [dpdk-dev] [PATCH v3 02/14] bus/fslmc: fix null pointer dereference

2020-06-26 Thread Adrian Moreno
On 6/26/20 3:27 PM, Maxime Coquelin wrote: > This patches fixes a null pointer derefencing that happens > when the device string passed to the iterator is NULL. This > situation can happen when iterating on a class type. > For example: > > RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) { > ..

Re: [dpdk-dev] [PATCH v2 14/14] vhost: split vDPA header file

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:27 PM, Maxime Coquelin wrote: > This patch split the vDPA header file in two, making > rte_vdpa_device structure opaque to the application. > > Applications should only include rte_vdpa.h, while drivers > should include both rte_vdpa.h and rte_vdpa_dev.h. > > Signed-off-by: Maxime

Re: [dpdk-dev] [PATCH v2 13/14] vhost: remove vDPA device count API

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:27 PM, Maxime Coquelin wrote: > This API is no more useful, this patch removes it. > > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/rte_vdpa.h| 13 - > lib/librte_vhost/rte_vhost_version.map | 1 - > lib/librte_vhost/vdpa.c| 9

Re: [dpdk-dev] [PATCH v2 11/14] examples/vdpa: use new wrappers instead of ops

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > Now that wrappers to query number of queues, Virtio > features and Vhost-user protocol features are available, > let's make the vDPA example to use them. > > Signed-off-by: Maxime Coquelin > --- > examples/vdpa/main.c | 4 ++-- > 1 file changed, 2

Re: [dpdk-dev] [PATCH v2 10/14] vhost: introduce wrappers for some vDPA ops

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > This patch is preliminary work to make the vDPA device > structure opaque to the user application. Some callbacks > of the vDPA devices are used to query capabilities before > attaching to a Vhost port. This patch introduces wrappers > for these ops.

Re: [dpdk-dev] [PATCH v2 09/14] vhost: use linked-list for vDPA devices

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > There is no more notion of device ID outside of vdpa.c. > We can now move from array to linked-list model for keeping > track of the vDPA devices. > > There is no point in using array here, as all vDPA API are > used from the control path, so no perf

Re: [dpdk-dev] [PATCH v2 08/14] vhost: remove useless vDPA API

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > vDPA is no more used outside of the vDPA internals, > so remove rte_vdpa_get_device() API that is now useless. > > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/rte_vdpa.h| 30 - > lib/librte_vhost/rte_vhost_ve

Re: [dpdk-dev] [PATCH v2 07/14] vhost: replace device ID in applications

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > This patch replaces the use of vDPA device ID with > vDPA device pointer. The goals is to remove the vDPA > device ID to avoid condusion with the Vhost ID. > > Signed-off-by: Maxime Coquelin > --- > examples/vdpa/main.c | 118

Re: [dpdk-dev] [PATCH v2 06/14] vhost: replace vDPA device ID in Vhost

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > This removes the notion of device ID in Vhost library > as a preliminary step to get rid of the vDPA device ID. > > Signed-off-by: Maxime Coquelin > --- > drivers/vdpa/ifc/ifcvf_vdpa.c | 12 > drivers/vdpa/mlx5/mlx5_vdpa.c

Re: [dpdk-dev] [PATCH v2 05/14] vhost: replace device ID in vDPA ops

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > This patch is a preliminary step to get rid of the > vDPA device ID. It makes vDPA callbacks to use the > vDPA device struct as a reference instead of the ID. > > Signed-off-by: Maxime Coquelin > --- > drivers/vdpa/ifc/ifcvf_vdpa.c | 79 ++

Re: [dpdk-dev] [PATCH v2 04/14] vhost: make vDPA framework bus agnostic

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > This patch makes the vDPA framework to no more > support only PCI devices, but any devices by relying > on the generic device name as identifier. > > Signed-off-by: Maxime Coquelin > --- > drivers/vdpa/ifc/ifcvf_vdpa.c | 9 +-- > drivers/

Re: [dpdk-dev] [PATCH v2 03/14] vhost: introduce vDPA devices class

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > This patch introduces vDPA device class. It will enable > application to iterate over the vDPA devices. > > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/vdpa.c | 115 +--- > 1 file changed, 97 insertio

Re: [dpdk-dev] [PATCH v2 01/14] bus/dpaa: fix null pointer dereference

2020-06-26 Thread Adrian Moreno
On 6/24/20 2:26 PM, Maxime Coquelin wrote: > This patches fixes a null pointer derefencing that happens > when the device string passed to the iterator is NULL. This > situation can happen when iterating on a class type. > For example: > > RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) { > ..

  1   2   >