From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5LJl-0002z8-JR for qemu-devel@nongnu.org; Fri, 02 Aug 2013 15:47:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5LJf-0006Cu-NU for qemu-devel@nongnu.org; Fri, 02 Aug 2013 15:47:17 -0400 Received: from mout.web.de ([212.227.17.12]:57746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5LJf-0006CO-E6 for qemu-devel@nongnu.org; Fri, 02 Aug 2013 15:47:11 -0400 Received: from mchn199C.mchp.siemens.de ([95.157.58.223]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MeSGJ-1UgwhW3zZ9-00Q9yV for ; Fri, 02 Aug 2013 21:47:10 +0200 Message-ID: <51FC0CBC.5090801@web.de> Date: Fri, 02 Aug 2013 21:47:08 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mKhedsBhRrpsWTtBovQJsW5g3xdjfsV1b" Subject: [Qemu-devel] [PATCH] net: Rename send_queue to incoming_queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mKhedsBhRrpsWTtBovQJsW5g3xdjfsV1b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable From: Jan Kiszka Each networking client has a queue for packets that could not yet be delivered to that client. Calling this queue "send_queue" is highly confusing as it has nothing to to with packets send from this client but to it. Avoid this confusing by renaming it to "incoming_queue". Signed-off-by: Jan Kiszka --- include/net/net.h | 2 +- net/hub.c | 2 +- net/net.c | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 30e4b04..11e1468 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -69,7 +69,7 @@ struct NetClientState { int link_down; QTAILQ_ENTRY(NetClientState) next; NetClientState *peer; - NetQueue *send_queue; + NetQueue *incoming_queue; char *model; char *name; char info_str[256]; diff --git a/net/hub.c b/net/hub.c index df32074..33a99c9 100644 --- a/net/hub.c +++ b/net/hub.c @@ -347,7 +347,7 @@ bool net_hub_flush(NetClientState *nc) =20 QLIST_FOREACH(port, &source_port->hub->ports, next) { if (port !=3D source_port) { - ret +=3D qemu_net_queue_flush(port->nc.send_queue); + ret +=3D qemu_net_queue_flush(port->nc.incoming_queue); } } return ret ? true : false; diff --git a/net/net.c b/net/net.c index c0d61bf..5890e56 100644 --- a/net/net.c +++ b/net/net.c @@ -206,7 +206,7 @@ static void qemu_net_client_setup(NetClientState *nc,= } QTAILQ_INSERT_TAIL(&net_clients, nc, next); =20 - nc->send_queue =3D qemu_new_net_queue(nc); + nc->incoming_queue =3D qemu_new_net_queue(nc); nc->destructor =3D destructor; } =20 @@ -288,8 +288,8 @@ static void qemu_cleanup_net_client(NetClientState *n= c) =20 static void qemu_free_net_client(NetClientState *nc) { - if (nc->send_queue) { - qemu_del_net_queue(nc->send_queue); + if (nc->incoming_queue) { + qemu_del_net_queue(nc->incoming_queue); } if (nc->peer) { nc->peer->peer =3D NULL; @@ -430,7 +430,7 @@ void qemu_purge_queued_packets(NetClientState *nc) return; } =20 - qemu_net_queue_purge(nc->peer->send_queue, nc); + qemu_net_queue_purge(nc->peer->incoming_queue, nc); } =20 void qemu_flush_queued_packets(NetClientState *nc) @@ -443,7 +443,7 @@ void qemu_flush_queued_packets(NetClientState *nc) } return; } - if (qemu_net_queue_flush(nc->send_queue)) { + if (qemu_net_queue_flush(nc->incoming_queue)) { /* We emptied the queue successfully, signal to the IO thread to= repoll * the file descriptor (for tap, for example). */ @@ -467,7 +467,7 @@ static ssize_t qemu_send_packet_async_with_flags(NetC= lientState *sender, return size; } =20 - queue =3D sender->peer->send_queue; + queue =3D sender->peer->incoming_queue; =20 return qemu_net_queue_send(queue, sender, flags, buf, size, sent_cb)= ; } @@ -542,7 +542,7 @@ ssize_t qemu_sendv_packet_async(NetClientState *sende= r, return iov_size(iov, iovcnt); } =20 - queue =3D sender->peer->send_queue; + queue =3D sender->peer->incoming_queue; =20 return qemu_net_queue_send_iov(queue, sender, QEMU_NET_PACKET_FLAG_NONE, --=20 1.7.3.4 --mKhedsBhRrpsWTtBovQJsW5g3xdjfsV1b Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlH8DL0ACgkQitSsb3rl5xTv1QCeP6p/WsdKK5Zn0iD/WKyjFNzp LkoAoMI0s4Wc2g/A8JBFQq2Cw3lQah6v =mBfI -----END PGP SIGNATURE----- --mKhedsBhRrpsWTtBovQJsW5g3xdjfsV1b--