From: Simon Kagstrom Date: Tue, 2 Jun 2015 07:21:55 +0000 (+0200) Subject: kni: fix multicast ioctl handling X-Git-Tag: spdx-start~9060 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3c8aa16a89c52728e9110a8dfb9fa58588e9532d;p=dpdk.git kni: fix multicast ioctl handling We did some (very basic) tests with IGMP, which involves adding multicast addresses to ETH interfaces. This is done via the ip tool, an example can be found on e.g., http://superuser.com/questions/324824/linux-built-in-or-open-source-program-to-join-multicast-group and this will fail on KNI interfaces because of an unimplemented ioctl SIOCADDMULTI. The patch simply adds an empty callback for set_rx_mode (typically used for setting up hardware) so that the ioctl succeeds. This is the same thing as the Linux tap interface does. Signed-off-by: Simon Kagstrom Signed-off-by: Johan Faltstrom Reviewed-by: Stephen Hemminger Acked-by: Helin Zhang --- diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c b/lib/librte_eal/linuxapp/kni/kni_net.c index 75986c6eb5..5c9ca1923b 100644 --- a/lib/librte_eal/linuxapp/kni/kni_net.c +++ b/lib/librte_eal/linuxapp/kni/kni_net.c @@ -491,6 +491,11 @@ kni_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) return 0; } +static void +kni_net_set_rx_mode(struct net_device *dev) +{ +} + static int kni_net_change_mtu(struct net_device *dev, int new_mtu) { @@ -652,6 +657,7 @@ static const struct net_device_ops kni_net_netdev_ops = { .ndo_start_xmit = kni_net_tx, .ndo_change_mtu = kni_net_change_mtu, .ndo_do_ioctl = kni_net_ioctl, + .ndo_set_rx_mode = kni_net_set_rx_mode, .ndo_get_stats = kni_net_stats, .ndo_tx_timeout = kni_net_tx_timeout, .ndo_set_mac_address = kni_net_set_mac,