Received: by 10.192.165.156 with SMTP id m28csp70026imm; Tue, 10 Apr 2018 16:38:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Qx5zKXNtUhwsIPL60svub1M4bao98wEAQcRb+5J4RDmAIQoLytg2QpZqV0oYV8czBmcAY X-Received: by 2002:a17:902:8:: with SMTP id 8-v6mr2411615pla.291.1523403482058; Tue, 10 Apr 2018 16:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523403482; cv=none; d=google.com; s=arc-20160816; b=ojLfdOjZLbDbQ9pa6JRC1BtisszMkqYa+NDIjI8/q2WS1knj61ezQFKZ1wqCjHeKSC A+gEyuObTmk1Ove2DVSMDPwqB39SU9/AgZ+vfQ/oZ2wsoS2UCZBIHIB2z0ZD/FJYDGyt rfcCQ0o/sQ0G4xWXbHGmxUcQOW9Bc4AZ4KSRpn6hr4R7QQVm+BiyRV2G4FI+2soTMN0f /unGJu1bljvhRu0Z9KKEMhbnEQnGTo3qbDI6BuYAooNjSrGBrZ5ffDRO5ti9v6QO1qui ZtCTv4ziyT7cv+LHn2KuADj53sY3ss56Gm/58PA//RU1Fh2AvYpgfLS8mRzHU1rqJt9I xJjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=CHpVUMOiwffBCGW1kvpi+dPnHRU+8xCtK79+hIGb9QE=; b=WxjNDplOEDOONJEq1g/ZY1TeICg9IbCEJxZp5m7tf4pIxAJOQ4szZpXZuDHGBAj0u8 eYunAb8UJFnxVpVtwPlnPL7TzJfxad5DWvffw8n7X6pe+QIZyjJsaxp5VV/ry3Bfic5M T7VwBja3+dZVy4lnbOA5VBPSXIh8fCs5BmYvv+pku1dOdJP4WaXhig+UwoOueZtXPAFZ CPptBrd+3NEPadAtX5Hc9iP/dc0PTdOX4IxfmN4LVXaO7460htPXHR75euLGUQyQG6rU nX1GlhEcmqXRfRRnU0nXYccAWNZJg3K3vBEXrk1UU1D8Ot4uLavRJYyb5JXGyWpI6w9V 2ByQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6-v6si3678987pln.257.2018.04.10.16.37.25; Tue, 10 Apr 2018 16:38:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754832AbeDJXdH (ORCPT + 99 others); Tue, 10 Apr 2018 19:33:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38996 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753990AbeDJW2U (ORCPT ); Tue, 10 Apr 2018 18:28:20 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6C723D0B; Tue, 10 Apr 2018 22:28:19 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Marciniszyn , Alex Estrin , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.15 037/168] IB/ipoib: Fix for notify send CQ failure messages Date: Wed, 11 Apr 2018 00:22:59 +0200 Message-Id: <20180410212801.774621395@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alex Estrin [ Upstream commit 809cb6955650d892c6ef95f1d55f28fceded0ce1 ] If IB_CQ_REPORT_MISSED_EVENTS flag is passed in ib_req_notify_cq() it may return positive value indicating non-empty CQ. If return code not verified the log might be flooded with false warning messages "request notify on send CQ failed". Fixes: 8966e28d2e40 ("IB/ipoib: Use NAPI in UD/TX flows") Reviewed-by: Mike Marciniszyn Signed-off-by: Alex Estrin Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 10 ++++++---- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -766,12 +766,14 @@ void ipoib_cm_send(struct net_device *de skb_orphan(skb); skb_dst_drop(skb); - if (netif_queue_stopped(dev)) - if (ib_req_notify_cq(priv->send_cq, IB_CQ_NEXT_COMP | - IB_CQ_REPORT_MISSED_EVENTS)) { + if (netif_queue_stopped(dev)) { + rc = ib_req_notify_cq(priv->send_cq, IB_CQ_NEXT_COMP | + IB_CQ_REPORT_MISSED_EVENTS); + if (unlikely(rc < 0)) ipoib_warn(priv, "IPoIB/CM:request notify on send CQ failed\n"); + else if (rc) napi_schedule(&priv->send_napi); - } + } rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1), tx_req); if (unlikely(rc)) { --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -644,7 +644,7 @@ int ipoib_send(struct net_device *dev, s if (netif_queue_stopped(dev)) if (ib_req_notify_cq(priv->send_cq, IB_CQ_NEXT_COMP | - IB_CQ_REPORT_MISSED_EVENTS)) + IB_CQ_REPORT_MISSED_EVENTS) < 0) ipoib_warn(priv, "request notify on send CQ failed\n"); rc = post_send(priv, priv->tx_head & (ipoib_sendq_size - 1),