Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752504AbbBXU34 (ORCPT ); Tue, 24 Feb 2015 15:29:56 -0500 Received: from mga14.intel.com ([192.55.52.115]:5719 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751908AbbBXU3y convert rfc822-to-8bit (ORCPT ); Tue, 24 Feb 2015 15:29:54 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,641,1418112000"; d="scan'208";a="656651526" From: "Tantilov, Emil S" To: Hiroshi Shimamoto , "Skidmore, Donald C" , "vyasevic@redhat.com" , "Kirsher, Jeffrey T" CC: "e1000-devel@lists.sourceforge.net" , "netdev@vger.kernel.org" , "Choi, Sy Jong" , "linux-kernel@vger.kernel.org" , David Laight , Hayato Momma , =?iso-8859-1?Q?Bj=F8rn_Mork?= Subject: RE: [E1000-devel] [PATCH v2 3/3] ixgbe: Add new ndo to allow VF multicast promiscuous mode Thread-Topic: [E1000-devel] [PATCH v2 3/3] ixgbe: Add new ndo to allow VF multicast promiscuous mode Thread-Index: AdBMqK/iyr+mPXpITtC290u8yo2+tgDx5plQ Date: Tue, 24 Feb 2015 20:29:50 +0000 Message-ID: <87618083B2453E4A8714035B62D6799250241E02@FMSMSX105.amr.corp.intel.com> References: <7F861DC0615E0C47A872E6F3C5FCDDBD05E38867@BPXM14GP.gisp.nec.co.jp> In-Reply-To: <7F861DC0615E0C47A872E6F3C5FCDDBD05E38867@BPXM14GP.gisp.nec.co.jp> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.200.107] Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1804 Lines: 60 >-----Original Message----- >From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com] >Sent: Thursday, February 19, 2015 5:01 PM > Subject: [E1000-devel] [PATCH v2 3/3] ixgbe: Add new ndo to allow VF multicast promiscuous mode > >From: Hiroshi Shimamoto > >Implements the new netdev op to allow VF multicast promiscuous mode. > >The administrator can allow to VF multicast promiscuous mode for only >trusted VM. After allowing multicast promiscuous mode from the host, >we can use over 30 IPv6 addresses on VM. > # ./ip link set dev eth0 vf 1 mc_promisc on > >When disallowing multicast promiscuous mode, we can only use 30 IPv6 addresses. > # ./ip link set dev eth0 vf 1 mc_promisc off > >Signed-off-by: Hiroshi Shimamoto >Reviewed-by: Hayato Momma >CC: Choi, Sy Jong +int ixgbe_ndo_set_vf_mc_promisc(struct net_device *netdev, int vf, bool setting) +{ + struct ixgbe_adapter *adapter = netdev_priv(netdev); + struct ixgbe_hw *hw = &adapter->hw; + u32 vmolr; vmolr is unused variable in this function. + + if (vf >= adapter->num_vfs) + return -EINVAL; + + /* nothing to do */ + if (adapter->vfinfo[vf].mc_promisc_allowed == setting) + return 0; + + adapter->vfinfo[vf].mc_promisc_allowed = setting; + + /* if VF requests multicast promiscuous */ + if (adapter->vfinfo[vf].mc_promisc) { + if (setting) + ixgbe_enable_vf_mc_promisc(adapter, vf); + else + ixgbe_disable_vf_mc_promisc(adapter, vf); + } + + return 0; +} Thanks, Emil -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/