From patchwork Tue Oct 11 15:48:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Vrabel X-Patchwork-Id: 9371319 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 4C6CE607FD for ; Tue, 11 Oct 2016 15:51:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F08A289D5 for ; Tue, 11 Oct 2016 15:51:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3349528B8A; Tue, 11 Oct 2016 15:51:18 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 969F1289D5 for ; Tue, 11 Oct 2016 15:51:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btzIB-0004EQ-Iz; Tue, 11 Oct 2016 15:48:35 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btzI9-0004EK-P4 for xen-devel@lists.xenproject.org; Tue, 11 Oct 2016 15:48:33 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id 64/E9-06971-0D90DF75; Tue, 11 Oct 2016 15:48:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeJIrShJLcpLzFFi42JxWrrBXvc8599 wgy+rLS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1owtZ3+wFGznqOg9u5WlgXECexcjJ4eEgL/E veOLWEBsNgEdicdLZoDFRQRkJI72L2DrYuTiYBaYwiixfs8DVpCEsECURPfEacwgNouAqsTln /PYQGxeAXeJlmc/mSGGykmcPw5hCwmoSHxcu4oVokZQ4uTMJ2DLmAUkJA6+eAFUwwFUzy3xt9 t+AiPPLCRVs5BULWBkWsWoUZxaVJZapGtkpJdUlJmeUZKbmJmja2hgqpebWlycmJ6ak5hUrJe cn7uJERgk9QwMjDsY97T7HWKU5GBSEuUtK/8TLsSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mC9wfH 33AhwaLU9NSKtMwcYLjCpCU4eJREeC+BpHmLCxJzizPTIVKnGHU5Pky+vpZJiCUvPy9VSpz3F UiRAEhRRmke3AhY7FxilJUS5mVkYGAQ4ilILcrNLEGVf8UozsGoJMy7AmQKT2ZeCdymV0BHMA EdYTPpD8gRJYkIKakGxkibnVc7/vDNej23e5HSfnnZo3vMfwXzLb9uaVJ65+zy3Sd+XhCeM1f Fe8FBvvvX7Cb68b15y//9W9RaqYev57/tSV0r0SW1wOu8G4/WDOOlZw2vsDCs+LBXjTnzYfpM jsD0vOrqG49Ppi9gKO4RO5026cGT6pAb/DuOTDP6seGqLseO6V/nFZxRYinOSDTUYi4qTgQAC QOL75gCAAA= X-Env-Sender: prvs=0856d2846=david.vrabel@citrix.com X-Msg-Ref: server-3.tower-206.messagelabs.com!1476200910!60718868!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18464 invoked from network); 11 Oct 2016 15:48:31 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 11 Oct 2016 15:48:31 -0000 X-IronPort-AV: E=Sophos;i="5.31,329,1473120000"; d="scan'208";a="391851514" From: David Vrabel To: Date: Tue, 11 Oct 2016 16:48:27 +0100 Message-ID: <1476200907-16085-1-git-send-email-david.vrabel@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA1 Cc: xen-devel@lists.xenproject.org, Paul Durrant , Wei Liu , David Vrabel Subject: [Xen-devel] [PATCHv1 net] xen-netback: fix guest Rx stall detection (after guest Rx refactor) X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP If a VIF has been ready for rx_stall_timeout (60s by default) and an Rx ring is drained of all requests an Rx stall will be incorrectly detected. When this occurs and the guest Rx queue is empty, the Rx ring's event index will not be set and the frontend will not raise an event when new requests are placed on the ring, permanently stalling the VIF. This is a regression introduced by eb1723a29b9a7 (xen-netback: refactor guest rx). Fix this by reinstating the setting of queue->last_rx_time when placing a packet onto the guest Rx ring. Signed-off-by: David Vrabel Reviewed-by: Paul Durrant --- drivers/net/xen-netback/rx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/xen-netback/rx.c b/drivers/net/xen-netback/rx.c index 8e9ade6..d69f2a9 100644 --- a/drivers/net/xen-netback/rx.c +++ b/drivers/net/xen-netback/rx.c @@ -425,6 +425,8 @@ void xenvif_rx_skb(struct xenvif_queue *queue) xenvif_rx_next_skb(queue, &pkt); + queue->last_rx_time = jiffies; + do { struct xen_netif_rx_request *req; struct xen_netif_rx_response *rsp;