From patchwork Thu Jun 9 09:39:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Lieven X-Patchwork-Id: 632697 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rQKzh4MXZz9sC3 for ; Thu, 9 Jun 2016 19:40:32 +1000 (AEST) Received: from localhost ([::1]:33397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAwRy-0006Mr-Lv for incoming@patchwork.ozlabs.org; Thu, 09 Jun 2016 05:40:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAwRC-0005wP-V1 for qemu-devel@nongnu.org; Thu, 09 Jun 2016 05:39:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAwR4-0007kn-Vj for qemu-devel@nongnu.org; Thu, 09 Jun 2016 05:39:41 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:41249 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAwR4-0007kR-M4 for qemu-devel@nongnu.org; Thu, 09 Jun 2016 05:39:34 -0400 Received: (qmail 5533 invoked by uid 89); 9 Jun 2016 09:39:30 -0000 Received: from [195.62.97.28] by client-16-kamp (envelope-from , uid 89) with qmail-scanner-2010/03/19-MF (clamdscan: 0.99.2/21697. hbedv: 8.3.40.38/7.12.98.154. avast: 1.2.2/16060801. spamassassin: 3.4.1. Clear:RC:1(195.62.97.28):. Processed in 0.081109 secs); 09 Jun 2016 09:39:30 -0000 Received: from smtp.kamp.de (HELO submission.kamp.de) ([195.62.97.28]) by mx01.kamp.de with ESMTPS (DHE-RSA-AES256-GCM-SHA384 encrypted); 9 Jun 2016 09:39:29 -0000 X-GL_Whitelist: yes Received: (qmail 11730 invoked from network); 9 Jun 2016 09:39:28 -0000 Received: from lieven-pc.kamp-intra.net (HELO lieven-pc) (relay@kamp.de@::ffff:172.21.12.60) by submission.kamp.de with ESMTPS (DHE-RSA-AES256-GCM-SHA384 encrypted) ESMTPA; 9 Jun 2016 09:39:28 -0000 Received: by lieven-pc (Postfix, from userid 1000) id A2DA7203D0; Thu, 9 Jun 2016 11:39:28 +0200 (CEST) From: Peter Lieven To: qemu-devel@nongnu.org Date: Thu, 9 Jun 2016 11:39:27 +0200 Message-Id: <1465465167-4698-1-git-send-email-pl@kamp.de> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a02:248:0:51::16 Subject: [Qemu-devel] [PATCH V3] net: fix qemu_announce_self not emitting packets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: s.priebe@profihost.ag, jasowang@redhat.com, Peter Lieven , qemu-stable@nongnu.org, pbonzini@redhat.com, hongyang.yang@easystack.cn Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" commit fefe2a78 accidently dropped the code path for injecting raw packets. This feature is needed for sending gratuitous ARPs after an incoming migration has completed. The result is increased network downtime for vservers where the network card is not virtio-net with the VIRTIO_NET_F_GUEST_ANNOUNCE feature. Fixes: fefe2a78abde932e0f340b21bded2c86def1d242 Cc: qemu-stable@nongnu.org Cc: hongyang.yang@easystack.cn Signed-off-by: Peter Lieven --- v1->v2: assert that only raw packets with a plain buffer come in. [Paolo] v2->v3: nc_senv_compat can take care of raw packets [Paolo, Jason] net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index 5f3e5a9..75bb177 100644 --- a/net/net.c +++ b/net/net.c @@ -722,7 +722,7 @@ ssize_t qemu_deliver_packet_iov(NetClientState *sender, return 0; } - if (nc->info->receive_iov) { + if (nc->info->receive_iov && !(flags & QEMU_NET_PACKET_FLAG_RAW)) { ret = nc->info->receive_iov(nc, iov, iovcnt); } else { ret = nc_sendv_compat(nc, iov, iovcnt, flags);