From patchwork Wed Jan 20 12:50:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 8071881 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0AF5F9F818 for ; Wed, 20 Jan 2016 13:01:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0D46220456 for ; Wed, 20 Jan 2016 13:00:59 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2D3820120 for ; Wed, 20 Jan 2016 13:00:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLsKd-0007TG-Es; Wed, 20 Jan 2016 12:57:51 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLsKb-0007TB-52 for xen-devel@lists.xenproject.org; Wed, 20 Jan 2016 12:57:49 +0000 Received: from [193.109.254.147] by server-9.bemta-14.messagelabs.com id 1A/AE-13475-B448F965; Wed, 20 Jan 2016 12:57:47 +0000 X-Env-Sender: prvs=8205088c3=Paul.Durrant@citrix.com X-Msg-Ref: server-8.tower-27.messagelabs.com!1453294665!14373330!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26898 invoked from network); 20 Jan 2016 12:57:46 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-8.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 20 Jan 2016 12:57:46 -0000 X-IronPort-AV: E=Sophos;i="5.22,320,1449532800"; d="scan'208";a="326413198" From: Paul Durrant To: Date: Wed, 20 Jan 2016 12:50:49 +0000 Message-ID: <1453294249-6346-1-git-send-email-paul.durrant@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA2 Cc: Keir Fraser , Ian Campbell , Tim Deegan , Ian Jackson , Paul Durrant , Jan Beulich Subject: [Xen-devel] [PATCH] public/io/netif.h: change semantics of "request-multicast-control" flag X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP My patch b2700877 "move and amend multicast control documentation" clarified use of the multicast control protocol between frontend and backend. However, it transpires that the restrictions that documentation placed on the "request-multicast-control" flag make it hard for a frontend to enable 'all multicast' promiscuous mode, in that to do so would require the frontend and backend to disconnect and re-connect. This patch adds a new "feature-dynamic-multicast-control" flag to allow a backend to advertise that it will watch "request-multicast-control" hence allowing it to be meaningfully modified by the frontend at any time rather than only when the frontend and backend are disconnected. Signed-off-by: Paul Durrant Cc: Ian Campbell Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan Acked-by: Wei Liu --- xen/include/public/io/netif.h | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/xen/include/public/io/netif.h b/xen/include/public/io/netif.h index fe0a87f..8816e0f 100644 --- a/xen/include/public/io/netif.h +++ b/xen/include/public/io/netif.h @@ -136,18 +136,28 @@ */ /* - * "feature-multicast-control" advertises the capability to filter ethernet - * multicast packets in the backend. To enable use of this capability the - * frontend must set "request-multicast-control" before moving into the - * connected state. - * - * If "request-multicast-control" is set then the backend transmit side should - * no longer flood multicast packets to the frontend, it should instead drop any - * multicast packet that does not match in a filter list. The list is - * amended by the frontend by sending dummy transmit requests containing - * XEN_NETIF_EXTRA_TYPE_MCAST_{ADD,DEL} extra-info fragments as specified below. - * Once enabled by the frontend, the feature cannot be disabled except by - * closing and re-connecting to the backend. + * "feature-multicast-control" and "feature-dynamic-multicast-control" + * advertise the capability to filter ethernet multicast packets in the + * backend. If the frontend wishes to take advantage of this feature then + * it may set "request-multicast-control". If the backend only advertises + * "feature-multicast-control" then "request-multicast-control" must be set + * before the frontend moves into the connected state. The backend will + * sample the value on this state transition and any subsequent change in + * value will have no effect. However, if the backend also advertises + * "feature-dynamic-multicast-control" then "request-multicast-control" + * may be set by the frontend at any time. In this case, the backend will + * watch the value and re-sample on watch events. + * + * If the sampled value of "request-multicast-control" is set then the + * backend transmit side should no longer flood multicast packets to the + * frontend, it should instead drop any multicast packet that does not + * match in a filter list. + * The list is amended by the frontend by sending dummy transmit requests + * containing XEN_NETIF_EXTRA_TYPE_MCAST_{ADD,DEL} extra-info fragments as + * specified below. + * Note that the filter list may be amended even if the sampled value of + * "request-multicast-control" is not set, however the filter should only + * be applied if it is set. */ /*