net/vhost: enable promiscuous and multicast by default

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 f165210321
("drivers/net: enable promiscuous and multicast by default")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
Xiaolong Ye 2020-02-26 21:45:34 +08:00 committed by Ferruh Yigit
parent f5f093d1c5
commit a2154606ff

View File

@ -1335,6 +1335,8 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
internal->disable_flags = disable_flags; internal->disable_flags = disable_flags;
data->dev_link = pmd_link; data->dev_link = pmd_link;
data->dev_flags = RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE; 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; eth_dev->dev_ops = &ops;