]> git.droids-corp.org - dpdk.git/commitdiff
drivers/net: enable promiscuous and multicast by default
authorCiara Power <ciara.power@intel.com>
Mon, 21 Oct 2019 12:22:38 +0000 (13:22 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:10 +0000 (16:43 +0200)
The promiscuous and multicast fields are now initialised as enabled for
some virtual PMDs. This allows the devices to be used when running
applications that attempt to enable promiscuous or multicast mode.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/kni/rte_eth_kni.c
drivers/net/null/rte_eth_null.c
drivers/net/pcap/rte_eth_pcap.c
drivers/net/ring/rte_eth_ring.c

index 547e08c3de919c217ead6225c8ccf37f005f9ff6..7cba92e2ed253fecf4ad4e81d4cb9039af5ca854 100644 (file)
@@ -377,6 +377,8 @@ eth_kni_create(struct rte_vdev_device *vdev,
        data->nb_tx_queues = 1;
        data->dev_link = pmd_link;
        data->mac_addrs = &internals->eth_addr;
+       data->promiscuous = 1;
+       data->all_multicast = 1;
 
        data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
 
index 3a8904729b9c720d966c559c153c67c8145ab980..025b73acb366fec51e44bf761959ad22043da1fd 100644 (file)
@@ -514,6 +514,8 @@ eth_dev_null_create(struct rte_vdev_device *dev,
        data->nb_tx_queues = (uint16_t)nb_tx_queues;
        data->dev_link = pmd_link;
        data->mac_addrs = &internals->eth_addr;
+       data->promiscuous = 1;
+       data->all_multicast = 1;
 
        eth_dev->dev_ops = &ops;
 
index 5801915a8272f9c32f2c4b527f269cebeacb142f..5186d8fe5ca49d69fabcbc9407a4ddc944cc4ef1 100644 (file)
@@ -1129,6 +1129,8 @@ pmd_init_internals(struct rte_vdev_device *vdev,
        data->nb_tx_queues = (uint16_t)nb_tx_queues;
        data->dev_link = pmd_link;
        data->mac_addrs = &(*internals)->eth_addr;
+       data->promiscuous = 1;
+       data->all_multicast = 1;
 
        /*
         * NOTE: we'll replace the data element, of originally allocated
index c6733ee2b170ee72921824a1c26fbb7010e3cda2..41acbc513d4ccccf16e9e87af4d301297d96d774 100644 (file)
@@ -318,6 +318,8 @@ do_eth_dev_ring_create(const char *name,
        data->nb_tx_queues = (uint16_t)nb_tx_queues;
        data->dev_link = pmd_link;
        data->mac_addrs = &internals->address;
+       data->promiscuous = 1;
+       data->all_multicast = 1;
 
        eth_dev->dev_ops = &ops;
        data->kdrv = RTE_KDRV_NONE;