net/vhost: enable promiscuous and multicast by default

Message ID 20200226134534.15292-1-xiaolong.ye@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series net/vhost: enable promiscuous and multicast by default |

Checks

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

Commit Message

Xiaolong Ye Feb. 26, 2020, 1:45 p.m. UTC
  With this patch, the promiscuous and multicast fields are initialized as
enabled for vhost PMD by default, this allows the devices to be used when
running applications that attempt to enable promiscuous or multicast mode.
Similar things have done for other virtual PMDs by commit f165210321c4
("drivers/net: enable promiscuous and multicast by default")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Maxime Coquelin March 4, 2020, 8:03 a.m. UTC | #1
On 2/26/20 2:45 PM, Xiaolong Ye wrote:
> With this patch, the promiscuous and multicast fields are initialized as
> enabled for vhost PMD by default, this allows the devices to be used when
> running applications that attempt to enable promiscuous or multicast mode.
> Similar things have done for other virtual PMDs by commit f165210321c4
> ("drivers/net: enable promiscuous and multicast by default")
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> ---
>  drivers/net/vhost/rte_eth_vhost.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
> index 458ed58f5..fcf317151 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -1331,6 +1331,8 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
>  	internal->disable_flags = disable_flags;
>  	data->dev_link = pmd_link;
>  	data->dev_flags = RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE;
> +	data->promiscuous = 1;
> +	data->all_multicast = 1;
>  
>  	eth_dev->dev_ops = &ops;
>  
> 

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

Thanks,
Maxime
  
Maxime Coquelin April 10, 2020, 2:44 p.m. UTC | #2
On 2/26/20 2:45 PM, Xiaolong Ye wrote:
> With this patch, the promiscuous and multicast fields are initialized as
> enabled for vhost PMD by default, this allows the devices to be used when
> running applications that attempt to enable promiscuous or multicast mode.
> Similar things have done for other virtual PMDs by commit f165210321c4
> ("drivers/net: enable promiscuous and multicast by default")
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> ---
>  drivers/net/vhost/rte_eth_vhost.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied to dpdk-next-virtio/master.

Thanks,
Maxime
  

Patch

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 458ed58f5..fcf317151 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1331,6 +1331,8 @@  eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
 	internal->disable_flags = disable_flags;
 	data->dev_link = pmd_link;
 	data->dev_flags = RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE;
+	data->promiscuous = 1;
+	data->all_multicast = 1;
 
 	eth_dev->dev_ops = &ops;