From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ufr1t-0006DX-Jq for qemu-devel@nongnu.org; Fri, 24 May 2013 08:23:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ufr1s-0007AI-7R for qemu-devel@nongnu.org; Fri, 24 May 2013 08:23:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ufr1r-00079j-UE for qemu-devel@nongnu.org; Fri, 24 May 2013 08:23:28 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4OCNRsq008385 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 24 May 2013 08:23:27 -0400 Date: Fri, 24 May 2013 08:23:26 -0400 From: Luiz Capitulino Message-ID: <20130524082326.452cc9f0@redhat.com> In-Reply-To: <20130524030813.GB1550@t430s.nay.redhat.com> References: <1369300080-31377-1-git-send-email-akong@redhat.com> <1369300080-31377-3-git-send-email-akong@redhat.com> <20130523120325.3113c687@redhat.com> <20130524030813.GB1550@t430s.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On Fri, 24 May 2013 11:08:13 +0800 Amos Kong wrote: > On Thu, May 23, 2013 at 12:03:25PM -0400, Luiz Capitulino wrote: > > On Thu, 23 May 2013 17:08:00 +0800 > > Amos Kong wrote: > > > > A flag is used to avoid events flooding, if user don't query > > > rx-filter after receives one event, new events won't be sent > > > to qmp monitor. > > > > > +RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name, > > > + Error **errp) > > > +{ > > > + NetClientState *nc; > > > + RxFilterInfoList *filter_list = NULL, *last_entry = NULL; > > > + > > > + QTAILQ_FOREACH(nc, &net_clients, next) { > > > + RxFilterInfoList *entry; > > > + RxFilterInfo *info; > > > + > > > + if (nc->info->type != NET_CLIENT_OPTIONS_KIND_NIC) { > > > + continue; > > > + } > > > + if (has_name && strcmp(nc->name, name) != 0) { > > > + continue; > > > + } > > > > I don't think we need this argument. This command is quite simple in its > > response, let's do this filtering in HMP only. > > Event message contains the net client name, management might only want > to query the single net client. The client can do the filtering itself. > > And we plan to use a flag for _each nic_ to control the event notification, > querying single net client will only clear it's flag. > > So we need to support query by net-client-name. >