From: Stefan Hajnoczi <stefanha@redhat.com>
To: Amos Kong <akong@redhat.com>
Cc: vyasevic@redhat.com, Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] net: move rxfilter_notify() to net.c
Date: Mon, 18 Nov 2013 15:12:15 +0100 [thread overview]
Message-ID: <20131118141215.GA2955@stefanha-thinkpad.hitronhub.home> (raw)
In-Reply-To: <20131118133926.GA24582@amosk.info>
On Mon, Nov 18, 2013 at 09:39:26PM +0800, Amos Kong wrote:
> On Mon, Nov 18, 2013 at 02:25:40PM +0100, Stefan Hajnoczi wrote:
> > On Mon, Nov 18, 2013 at 04:20:12PM +0800, Amos Kong wrote:
> > > @@ -967,6 +968,27 @@ void print_net_client(Monitor *mon, NetClientState *nc)
> > > nc->info_str);
> > > }
> > >
> > > +void rxfilter_notify(NetClientState *nc, Object *obj)
> > > +{
> > > + QObject *event_data;
> > > + gchar *path = object_get_canonical_path(obj);
> > > +
> > > + if (nc->rxfilter_notify_enabled) {
> > > + if (nc->name) {
> > > + event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }",
> > > + nc->name, path);
> > > + } else {
> > > + event_data = qobject_from_jsonf("{ 'path': %s }", path);
> > > + }
> > > + monitor_protocol_event(QEVENT_NIC_RX_FILTER_CHANGED, event_data);
> > > + qobject_decref(event_data);
> > > +
> > > + /* disable event notification to avoid events flooding */
> > > + nc->rxfilter_notify_enabled = 0;
> >
> > Only hw/net/virtio-net.c uses nc->rxfilter_notify_enabled. This
> > function isn't reusable in its current form so I'm left wondering what
> > the point of this patch is?
> >
> > If you have patches that invoke rxfilter_notify() from other NICs then
> > please submit them together in a series.
>
> I don't have patch to change other NICs to send rxfilter notify right
> now.
>
> So I will send a patch to fix the leak. We can move the function to
> net.c in future.
Okay, sounds good.
Stefan
prev parent reply other threads:[~2013-11-18 15:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 8:20 [Qemu-devel] [PATCH v2] net: move rxfilter_notify() to net.c Amos Kong
2013-11-18 13:25 ` Stefan Hajnoczi
2013-11-18 13:39 ` Amos Kong
2013-11-18 14:12 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131118141215.GA2955@stefanha-thinkpad.hitronhub.home \
--to=stefanha@redhat.com \
--cc=akong@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=vyasevic@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).