From patchwork Tue Sep 27 10:13:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 675510 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 3sjyCj5XfBz9s3v for ; Tue, 27 Sep 2016 20:45:21 +1000 (AEST) Received: from localhost ([::1]:49476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bopt1-0001rP-Po for incoming@patchwork.ozlabs.org; Tue, 27 Sep 2016 06:45:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bopPG-0004aD-2V for qemu-devel@nongnu.org; Tue, 27 Sep 2016 06:14:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bopPE-0004Ui-B7 for qemu-devel@nongnu.org; Tue, 27 Sep 2016 06:14:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bopPE-0004UV-4t for qemu-devel@nongnu.org; Tue, 27 Sep 2016 06:14:32 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B6AF29E615; Tue, 27 Sep 2016 10:14:31 +0000 (UTC) Received: from jason-ThinkPad-T450s.redhat.com (vpn1-6-155.pek2.redhat.com [10.72.6.155]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8RAD8Je010083; Tue, 27 Sep 2016 06:14:29 -0400 From: Jason Wang To: qemu-devel@nongnu.org Date: Tue, 27 Sep 2016 18:13:03 +0800 Message-Id: <1474971187-15627-24-git-send-email-jasowang@redhat.com> In-Reply-To: <1474971187-15627-1-git-send-email-jasowang@redhat.com> References: <1474971187-15627-1-git-send-email-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 27 Sep 2016 10:14:31 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL V2 23/27] e1000e: Fix spurious RX TCP ACK interrupts 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: Dmitry Fleytman , peter.maydell@linaro.org, Jason Wang Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Dmitry Fleytman Do not raise ACK interrupts when RFCTL.ACKDIS bit is set (see spec. 10.2.5.16). Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index d26b611..0298136 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -1710,7 +1710,8 @@ e1000e_receive_iov(E1000ECore *core, const struct iovec *iov, int iovcnt) } /* Perform ACK receive detection */ - if (e1000e_is_tcp_ack(core, core->rx_pkt)) { + if (!(core->mac[RFCTL] & E1000_RFCTL_ACK_DIS) && + (e1000e_is_tcp_ack(core, core->rx_pkt))) { n |= E1000_ICS_ACK; }