Received: from eggs.gnu.org ([208.118.235.92]:53278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfiMe-0007Qy-SF for qemu-devel@nongnu.org; Thu, 23 May 2013 23:08:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfiMc-0002Co-MF for qemu-devel@nongnu.org; Thu, 23 May 2013 23:08:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfiMc-0002CJ-Ci for qemu-devel@nongnu.org; Thu, 23 May 2013 23:08:18 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4O38Hn7030063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 May 2013 23:08:17 -0400 Date: Fri, 24 May 2013 11:08:13 +0800 From: Amos Kong Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130523120325.3113c687@redhat.com> 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: Luiz Capitulino Cc: qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com 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. 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. -- Amos.