From patchwork Wed Jul 25 12:17:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Dovgalyuk X-Patchwork-Id: 10543981 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C235112E for ; Wed, 25 Jul 2018 12:38:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEC8929DC8 for ; Wed, 25 Jul 2018 12:38:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2D4229DD2; Wed, 25 Jul 2018 12:38:46 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 92EFB29DC8 for ; Wed, 25 Jul 2018 12:38:46 +0000 (UTC) Received: from localhost ([::1]:49315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiJ41-0004h7-Lx for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 Jul 2018 08:38:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiIj6-0003Ud-WA for qemu-devel@nongnu.org; Wed, 25 Jul 2018 08:17:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiIj3-0007MT-U4 for qemu-devel@nongnu.org; Wed, 25 Jul 2018 08:17:08 -0400 Received: from mail.ispras.ru ([83.149.199.45]:36970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiIj3-0007LX-Js for qemu-devel@nongnu.org; Wed, 25 Jul 2018 08:17:05 -0400 Received: from [127.0.1.1] (unknown [85.142.117.226]) by mail.ispras.ru (Postfix) with ESMTPSA id A370A54006B; Wed, 25 Jul 2018 15:17:04 +0300 (MSK) From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 25 Jul 2018 15:17:06 +0300 Message-ID: <20180725121706.12867.98787.stgit@pasha-VirtualBox> In-Reply-To: <20180725121311.12867.21729.stgit@pasha-VirtualBox> References: <20180725121311.12867.21729.stgit@pasha-VirtualBox> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 83.149.199.45 Subject: [Qemu-devel] [PATCH v5 24/24] slirp: fix ipv6 timers 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: kwolf@redhat.com, peter.maydell@linaro.org, war2jordan@live.com, pavel.dovgaluk@ispras.ru, pbonzini@redhat.com, quintela@redhat.com, ciro.santilli@gmail.com, jasowang@redhat.com, crosthwaite.peter@gmail.com, zuban32s@gmail.com, armbru@redhat.com, maria.klimushenkova@ispras.ru, mst@redhat.com, kraxel@redhat.com, boost.lists@gmail.com, thomas.dullien@googlemail.com, dovgaluk@ispras.ru, mreitz@redhat.com, alex.bennee@linaro.org, dgilbert@redhat.com, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP ICMP implementation for IPv6 uses timers based on virtual clock. This is incorrect because this service is not related to the guest state. This patch changes using virtual clock to the realtime. Signed-off-by: Pavel Dovgalyuk --- slirp/ip6_icmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slirp/ip6_icmp.c b/slirp/ip6_icmp.c index ee333d0..e25818e 100644 --- a/slirp/ip6_icmp.c +++ b/slirp/ip6_icmp.c @@ -17,7 +17,7 @@ static void ra_timer_handler(void *opaque) { Slirp *slirp = opaque; timer_mod(slirp->ra_timer, - qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + NDP_Interval); + qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + NDP_Interval); ndp_send_ra(slirp); } @@ -27,9 +27,9 @@ void icmp6_init(Slirp *slirp) return; } - slirp->ra_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, ra_timer_handler, slirp); + slirp->ra_timer = timer_new_ms(QEMU_CLOCK_REALTIME, ra_timer_handler, slirp); timer_mod(slirp->ra_timer, - qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + NDP_Interval); + qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + NDP_Interval); } void icmp6_cleanup(Slirp *slirp)