From: Ilya Maximets <i.maximets@samsung.com>
To: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Cc: Ilya Maximets <i.maximets@samsung.com>,
Jason Wang <jasowang@redhat.com>,
Dyasly Sergey <s.dyasly@samsung.com>
Subject: [Qemu-devel] [PATCH 4/4] net: notify about link status only if it changed.
Date: Wed, 30 Mar 2016 18:14:09 +0300 [thread overview]
Message-ID: <1459350849-31989-5-git-send-email-i.maximets@samsung.com> (raw)
In-Reply-To: <1459350849-31989-1-git-send-email-i.maximets@samsung.com>
No need to notify nc->peer if nothing changed.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
net/net.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/net.c b/net/net.c
index 3b5a142..6f6a8ce 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1385,9 +1385,10 @@ void qmp_set_link(const char *name, bool up, Error **errp)
for (i = 0; i < queues; i++) {
ncs[i]->peer->link_down = !up;
}
- }
- if (nc->peer->info->link_status_changed) {
- nc->peer->info->link_status_changed(nc->peer);
+
+ if (nc->peer->info->link_status_changed) {
+ nc->peer->info->link_status_changed(nc->peer);
+ }
}
}
}
--
2.5.0
next prev parent reply other threads:[~2016-03-30 15:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 15:14 [Qemu-devel] [PATCH 0/4] Fix QEMU crash on vhost-user socket disconnect Ilya Maximets
2016-03-30 15:14 ` [Qemu-devel] [PATCH 1/4] vhost-user: fix crash on " Ilya Maximets
2016-03-30 15:14 ` [Qemu-devel] [PATCH 2/4] vhost: prevent double stop of vhost_net device Ilya Maximets
2016-03-30 15:14 ` [Qemu-devel] [PATCH 3/4] vhost: check for vhost_net device validity Ilya Maximets
2016-03-30 15:14 ` Ilya Maximets [this message]
2016-03-30 17:01 ` [Qemu-devel] [PATCH 0/4] Fix QEMU crash on vhost-user socket disconnect Michael S. Tsirkin
2016-03-31 6:02 ` Ilya Maximets
2016-03-31 9:21 ` Michael S. Tsirkin
2016-03-31 10:48 ` Ilya Maximets
2016-04-05 10:46 ` Michael S. Tsirkin
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=1459350849-31989-5-git-send-email-i.maximets@samsung.com \
--to=i.maximets@samsung.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=s.dyasly@samsung.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).