Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754829AbbBTVFa (ORCPT ); Fri, 20 Feb 2015 16:05:30 -0500 Received: from mga14.intel.com ([192.55.52.115]:39966 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754512AbbBTVF2 (ORCPT ); Fri, 20 Feb 2015 16:05:28 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,616,1418112000"; d="scan'208";a="530544189" From: "Skidmore, Donald C" To: Edward Cree , Hiroshi Shimamoto CC: "vyasevic@redhat.com" , "Kirsher, Jeffrey T" , Alexander Duyck , =?utf-8?B?QmrDuHJuIE1vcms=?= , "e1000-devel@lists.sourceforge.net" , "netdev@vger.kernel.org" , "Choi, Sy Jong" , "linux-kernel@vger.kernel.org" , David Laight , Hayato Momma Subject: RE: [PATCH v2 2/3] if_link: Add VF multicast promiscuous control Thread-Topic: [PATCH v2 2/3] if_link: Add VF multicast promiscuous control Thread-Index: AdBMqJo0/LLpsu2NTFaRZnHct8YppwArslAAAAJM5JA= Date: Fri, 20 Feb 2015 21:05:26 +0000 Message-ID: References: <7F861DC0615E0C47A872E6F3C5FCDDBD05E38840@BPXM14GP.gisp.nec.co.jp> <54E73BE4.2040505@solarflare.com> In-Reply-To: <54E73BE4.2040505@solarflare.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t1KL5cc0004793 Content-Length: 3720 Lines: 31 -----Original Message----- From: Edward Cree [mailto:ecree@solarflare.com] Sent: Friday, February 20, 2015 5:52 AM To: Hiroshi Shimamoto Cc: Skidmore, Donald C; vyasevic@redhat.com; Kirsher, Jeffrey T; Alexander Duyck; Bjørn Mork; e1000-devel@lists.sourceforge.net; netdev@vger.kernel.org; Choi, Sy Jong; linux-kernel@vger.kernel.org; David Laight; Hayato Momma Subject: Re: [PATCH v2 2/3] if_link: Add VF multicast promiscuous control On 20/02/15 01:00, Hiroshi Shimamoto wrote: > From: Hiroshi Shimamoto > > Add netlink directives and ndo entry to allow VF multicast promiscuous mode. > > The administrator wants to allow dedicatedly multicast promiscuous per VF. If I'm properly understanding, this seems to be an ixgbe-specific option to work around an ixgbe limitation; is it really appropriate to implement as a generic net_device_op? What would this ndo mean to a driver which can support thousands of multicast groups without MC promisc? Is it expected to limit the number of MC groups when this is set to disallow? Or just fulfil the letter of the option but not its spirit? The option doesn't seem to have well-defined semantics outside of ixgbe. I would suggest that the right place for this sort of driver-specific device control is in sysfs. I'm also a little perplexed as to why anyone would need to disallow this; what security, or even administrative convenience, is gained by allowing a VF to join 30 multicast groups but not multicast promiscuous mode? Especially as, afaik, there are no restrictions on which multicast groups are joined, so the VF can receive any particular multicast traffic it cares about. The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited. If a vender specific interface is objectionable maybe a simpler and more generic interface would be for the PF to be able to set a given VF into "trusted" mode. Then when the VF requested to enter multicast promiscuous mode via the mailbox message the PF would just allow it? This could then be used to address other issues where we don't want to allow a VF to do something due to isolation or performance concerns. I admit exactly what 'trusted' meant would vary from vender to vender, but it would be a way for the driver to know it could allow configurations such as this. Just an idea, since we seem to be getting more requests for things such as this. As to why someone may want to block a VF from entering multicast promiscuous it has more to do with performance that security. The issue is this could have a very noticeably effect on the overall system. If any other VFs (or the PF) are receiving MC packets these will have to be replicated which will be a performance hit. When we use the MC hash this is limited vs. when anyone is in MC promiscuous every MC packet used by another pool would be replicated. . If too many VF's were in this mode you run the risk for flooding the PCIe interface. I could imagine in some environments (i.e. public clouds) where you don't trust what is running in your VM you might what to block this from happening. - Don Skidmore ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?