[v6] net/virtio-user: fix failures when setting filters

Message ID 20191106090250.104135-1-yong.liu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series [v6] net/virtio-user: fix failures when setting filters |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed

Commit Message

Marvin Liu Nov. 6, 2019, 9:02 a.m. UTC
  As doc mentioned, Rx/Mac/vlan filters are all supported by best effort.
These control commands should return success.

Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
Cc: stable@dpdk.org

Signed-off-by: Marvin Liu <yong.liu@intel.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Maxime Coquelin Nov. 6, 2019, 7:54 p.m. UTC | #1
On 11/6/19 10:02 AM, Marvin Liu wrote:
> As doc mentioned, Rx/Mac/vlan filters are all supported by best effort.
> These control commands should return success.
> 
> Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> ---
>  drivers/net/virtio/virtio_user/virtio_user_dev.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  
Maxime Coquelin Nov. 6, 2019, 9 p.m. UTC | #2
On 11/6/19 10:02 AM, Marvin Liu wrote:
> As doc mentioned, Rx/Mac/vlan filters are all supported by best effort.
> These control commands should return success.
> 
> Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> ---
>  drivers/net/virtio/virtio_user/virtio_user_dev.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
Applied to dpdk-next-virtio/master.

Thanks,
Maxime
  

Patch

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 1c575d0cd..a4400e772 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -613,6 +613,10 @@  virtio_user_handle_ctrl_msg(struct virtio_user_dev *dev, struct vring *vring,
 
 		queues = *(uint16_t *)(uintptr_t)vring->desc[idx_data].addr;
 		status = virtio_user_handle_mq(dev, queues);
+	} else if (hdr->class == VIRTIO_NET_CTRL_RX  ||
+		   hdr->class == VIRTIO_NET_CTRL_MAC ||
+		   hdr->class == VIRTIO_NET_CTRL_VLAN) {
+		status = 0;
 	}
 
 	/* Update status */
@@ -664,6 +668,10 @@  virtio_user_handle_ctrl_msg_packed(struct virtio_user_dev *dev,
 		queues = *(uint16_t *)(uintptr_t)
 				vring->desc[idx_data].addr;
 		status = virtio_user_handle_mq(dev, queues);
+	} else if (hdr->class == VIRTIO_NET_CTRL_RX  ||
+		   hdr->class == VIRTIO_NET_CTRL_MAC ||
+		   hdr->class == VIRTIO_NET_CTRL_VLAN) {
+		status = 0;
 	}
 
 	/* Update status */