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: 9166489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E0043607DA for ; Thu, 9 Jun 2016 09:40:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF0012830C for ; Thu, 9 Jun 2016 09:40:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2FE328336; Thu, 9 Jun 2016 09:40:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AD88C2830C for ; Thu, 9 Jun 2016 09:40:09 +0000 (UTC) Received: from localhost ([::1]:33391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAwRb-0005xb-Pd for patchwork-qemu-devel@patchwork.kernel.org; Thu, 09 Jun 2016 05:40:07 -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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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);