From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 02 Jun 2015 00:31:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,538,1427785200"; d="scan'208";a="703776991" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by orsmga001.jf.intel.com with ESMTP; 02 Jun 2015 00:31:46 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 2 Jun 2015 15:31:46 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.94]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.50]) with mapi id 14.03.0224.002; Tue, 2 Jun 2015 15:31:44 +0800 From: "Zhang, Helin" To: Simon Kagstrom Thread-Topic: [PATCH v2] kni: Add set_rx_mode callback to handle multicast groups Thread-Index: AQHQnQTawSP9ZWEiKUita62KUNu0cp2Y0iIw Date: Tue, 2 Jun 2015 07:31:44 +0000 Message-ID: References: <20150602092155.588bbb2e@miho> In-Reply-To: <20150602092155.588bbb2e@miho> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2] kni: Add set_rx_mode callback to handle multicast groups X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 07:31:50 -0000 > -----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