From: Pascal Mazon Date: Wed, 15 Mar 2017 14:48:17 +0000 (+0100) Subject: net/tap: add multicast addresses management X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=730651c27c9b88545e529c470bc491663707aad6;p=dpdk.git net/tap: add multicast addresses management A tap netdevice actually receives every packet, without any filtering whatsoever. There is no need for any multicast address registration to receive multicast packets. Signed-off-by: Pascal Mazon Reviewed-by: Ferruh Yigit --- diff --git a/doc/guides/nics/features/tap.ini b/doc/guides/nics/features/tap.ini index 6c07352088..6aa11874e2 100644 --- a/doc/guides/nics/features/tap.ini +++ b/doc/guides/nics/features/tap.ini @@ -10,6 +10,7 @@ Promiscuous mode = Y Allmulticast mode = Y Basic stats = Y MTU update = Y +Multicast MAC filter = Y Speed capabilities = Y Unicast MAC filter = Y Other kdrv = Y diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index c531febfc6..0a684813ed 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -750,6 +750,18 @@ tap_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) return err; } +static int +tap_set_mc_addr_list(struct rte_eth_dev *dev __rte_unused, + struct ether_addr *mc_addr_set __rte_unused, + uint32_t nb_mc_addr __rte_unused) +{ + /* + * Nothing to do actually: the tap has no filtering whatsoever, every + * packet is received. + */ + return 0; +} + static const struct eth_dev_ops ops = { .dev_start = tap_dev_start, .dev_stop = tap_dev_stop, @@ -769,6 +781,7 @@ static const struct eth_dev_ops ops = { .allmulticast_disable = tap_allmulti_disable, .mac_addr_set = tap_mac_set, .mtu_set = tap_mtu_set, + .set_mc_addr_list = tap_set_mc_addr_list, .stats_get = tap_stats_get, .stats_reset = tap_stats_reset, };