[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filte
From: |
Amos Kong |
Subject: |
Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information |
Date: |
Fri, 24 May 2013 11:03:48 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, May 23, 2013 at 06:14:19AM -0600, Eric Blake wrote:
> On 05/23/2013 03:08 AM, Amos Kong wrote:
> > +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) {
>
> Do you need the has_name argument here, or can you ensure that the
> caller passes NULL when the caller's has_name was false,
hmp_info_rx_filter() passes NULL name when has_name is false.
'has_name' is need here. Or we can change it to:
if (name && strcmp(nc->name, name) != 0) {
I think using 'has_name' is clearer.
> for one less parameter and the same amount of information?
qmp_query_rx_filter() define is generated by QAPI infrastructure,
the parameters are fixed. We also use it in hmp_info_rx_filter().
--
Amos.
- Re: [Qemu-devel] [PATCH v3 1/2] net: introduce RX_FILTER_CHANGED event, (continued)
- Re: [Qemu-devel] [PATCH v3 1/2] net: introduce RX_FILTER_CHANGED event, Michael S. Tsirkin, 2013/05/23
- Re: [Qemu-devel] [PATCH v3 1/2] net: introduce RX_FILTER_CHANGED event, Eric Blake, 2013/05/23
- Re: [Qemu-devel] [PATCH v3 1/2] net: introduce RX_FILTER_CHANGED event, Michael S. Tsirkin, 2013/05/23
- Re: [Qemu-devel] [PATCH v3 1/2] net: introduce RX_FILTER_CHANGED event, Luiz Capitulino, 2013/05/23
- Re: [Qemu-devel] [PATCH v3 1/2] net: introduce RX_FILTER_CHANGED event, Amos Kong, 2013/05/23
Re: [Qemu-devel] [PATCH v3 1/2] net: introduce RX_FILTER_CHANGED event, Eric Blake, 2013/05/23
[Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Amos Kong, 2013/05/23
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Michael S. Tsirkin, 2013/05/23
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Eric Blake, 2013/05/23
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information,
Amos Kong <=
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Luiz Capitulino, 2013/05/23
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Amos Kong, 2013/05/23
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Luiz Capitulino, 2013/05/24
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Eric Blake, 2013/05/24
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Luiz Capitulino, 2013/05/24
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Eric Blake, 2013/05/24
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Markus Armbruster, 2013/05/24
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Michael S. Tsirkin, 2013/05/24
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Eric Blake, 2013/05/24
- Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information, Luiz Capitulino, 2013/05/24