From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhang, Helin" Subject: Re: [PATCH v2] kni: Add set_rx_mode callback to handle multicast groups Date: Tue, 2 Jun 2015 07:31:44 +0000 Message-ID: References: <20150602092155.588bbb2e@miho> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Simon Kagstrom Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 21280C32E for ; Tue, 2 Jun 2015 09:31:49 +0200 (CEST) In-Reply-To: <20150602092155.588bbb2e@miho> Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Simon Kagstrom [mailto:simon.kagstrom@netinsight.net] > Sent: Tuesday, June 2, 2015 3:22 PM > To: dev@dpdk.org; Zhang, Helin; stephen@networkplumber.org > Subject: [PATCH v2] kni: Add set_rx_mode callback to handle multicast gro= ups >=20 > 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., >=20 >=20 > http://superuser.com/questions/324824/linux-built-in-or-open-source-progr= am- > to-join-multicast-group >=20 > 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. >=20 > Signed-off-by: Simon Kagstrom > Signed-off-by: Johan Faltstrom Acked-by: Helin Zhang > --- > ChangeLog: >=20 > v2: Improve motivation for the patch >=20 > lib/librte_eal/linuxapp/kni/kni_net.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c > b/lib/librte_eal/linuxapp/kni/kni_net.c index dd95db5..cf93c4b 100644 > --- a/lib/librte_eal/linuxapp/kni/kni_net.c > +++ b/lib/librte_eal/linuxapp/kni/kni_net.c > @@ -495,6 +495,11 @@ kni_net_ioctl(struct net_device *dev, struct ifreq *= rq, int > cmd) return 0; } >=20 > +static void > +kni_net_set_rx_mode(struct net_device *dev) { } > + > static int > kni_net_change_mtu(struct net_device *dev, int new_mtu) { @@ -645,6 > +650,7 @@ static const struct net_device_ops kni_net_netdev_ops =3D > { .ndo_start_xmit =3D kni_net_tx, > .ndo_change_mtu =3D kni_net_change_mtu, > .ndo_do_ioctl =3D kni_net_ioctl, > + .ndo_set_rx_mode =3D kni_net_set_rx_mode, > .ndo_get_stats =3D kni_net_stats, > .ndo_tx_timeout =3D kni_net_tx_timeout, > .ndo_set_mac_address =3D kni_net_set_mac, > -- > 1.9.1