Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1949459imm; Thu, 24 May 2018 03:27:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqxMjqtYBOUZR0EsXC3tQHx600wN7flwiJqMnOt/2CbGvb/JvP1ut+IbrCCBLohuw8uwwMr X-Received: by 2002:a65:4945:: with SMTP id q5-v6mr5224212pgs.177.1527157671086; Thu, 24 May 2018 03:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527157671; cv=none; d=google.com; s=arc-20160816; b=tntRaaWDfsuMoFCxZBwjHhcATGu+ZbhTQu9H+hLtClXpIlCM6rbdtbXPbzMfhZOcHp 3YMcY4D0uZEm+NKX0xQgDaGGY3EuqD+StBgnE1WBumR+1F5CGArqDrwkX+rT/hoKpv4A WhdrAqu38ViIT4gIlayUwQtFTHbkLp2Z/PeSiDENrETxlCy4wRXMdJE0q0ej41nY3USz 77eK0QNlzmtpDWGMzsWArhm7JiAGz3XBuSaLDbEDSw/z9NbS78Qg+LsCJM0e3Hlq+Q2G 0zVPyW7yCqnFQu+sk1X1zXHG6pWhsmCq4CahkRgBdGSzYdI9q4WHFG9riN5EJdpbBxjV nLOA== 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:dkim-signature :arc-authentication-results; bh=ZWqKNejgJb6VE/q6kJmBXihJjzbyuXy8yc8NhxHqJGE=; b=MX4QlCJ+c0ZKECFBC6LoboCANROrjJTwd6c7is304wjcbG5kgvOo6tOxskdrZ7pWyS 4bjw4uIrdc4Cy/1RHrKcZ2oenuwJzvLf0ZjNkiOvMK8YOlba/7gkFIgkxoX0T7UT2Gnx QY9ccm7OgEh2B0n0vcosgpLXClQzLr5jSY+tHRYl/DDZNqdaa6TFf1oILMhb4IKLWcp7 /iGn6hQQNsf4t5UyKlM7EaAV9KnwQncYx7V/QXvxLD3LkOx+4pRaE+Oy7+arvCS+7Sas AcwjqwceBmCaL5hwLLNWCGaVsKiQ5kQxZiuMTKR8b7lf1stEfm0Knn4S5x/Q8LmRHLcb jPZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v4nxg0kF; 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 v12-v6si20067067plo.264.2018.05.24.03.27.36; Thu, 24 May 2018 03:27:51 -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; dkim=pass header.i=@kernel.org header.s=default header.b=v4nxg0kF; 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 S1031994AbeEXK0z (ORCPT + 99 others); Thu, 24 May 2018 06:26:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:47738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030993AbeEXKBp (ORCPT ); Thu, 24 May 2018 06:01:45 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3752520893; Thu, 24 May 2018 10:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156104; bh=cwIHBXX0NO69X78BFfqvWkbuhoJHHoreNjkq31SPkoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v4nxg0kFJIa4p7f56GkqY+/l88xHveZ/N9D6Z+mFDhSRc4hxJ1ghSXQQPsEwZOv+E xQGZEkGWYMGcQ6ss9eeN8BBmJFBBscy/Zr3U/Gr1icHx3CxgT4dgPLZUgKTQip2WuZ lY7eJzNZR+I4063rb9NNgQ07MmfwPK986ral9n4k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ariel Elior , Michal Kalderon , "David S. Miller" Subject: [PATCH 4.16 030/161] qed: LL2 flush isles when connection is closed Date: Thu, 24 May 2018 11:37:35 +0200 Message-Id: <20180524093021.949524719@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@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.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michal Kalderon [ Upstream commit f9bcd60274a565751abef622f9018badd01a17c8 ] Driver should free all pending isles once it gets a FLUSH cqe from FW. Part of iSCSI out of order flow. Fixes: 1d6cff4fca4366 ("qed: Add iSCSI out of order packet handling") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) --- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c +++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c @@ -601,6 +601,27 @@ static u8 qed_ll2_convert_rx_parse_to_tx return bd_flags; } +static bool +qed_ll2_lb_rxq_handler_slowpath(struct qed_hwfn *p_hwfn, + struct core_rx_slow_path_cqe *p_cqe) +{ + struct ooo_opaque *iscsi_ooo; + u32 cid; + + if (p_cqe->ramrod_cmd_id != CORE_RAMROD_RX_QUEUE_FLUSH) + return false; + + iscsi_ooo = (struct ooo_opaque *)&p_cqe->opaque_data; + if (iscsi_ooo->ooo_opcode != TCP_EVENT_DELETE_ISLES) + return false; + + /* Need to make a flush */ + cid = le32_to_cpu(iscsi_ooo->cid); + qed_ooo_release_connection_isles(p_hwfn, p_hwfn->p_ooo_info, cid); + + return true; +} + static int qed_ll2_lb_rxq_handler(struct qed_hwfn *p_hwfn, struct qed_ll2_info *p_ll2_conn) { @@ -627,6 +648,11 @@ static int qed_ll2_lb_rxq_handler(struct cq_old_idx = qed_chain_get_cons_idx(&p_rx->rcq_chain); cqe_type = cqe->rx_cqe_sp.type; + if (cqe_type == CORE_RX_CQE_TYPE_SLOW_PATH) + if (qed_ll2_lb_rxq_handler_slowpath(p_hwfn, + &cqe->rx_cqe_sp)) + continue; + if (cqe_type != CORE_RX_CQE_TYPE_REGULAR) { DP_NOTICE(p_hwfn, "Got a non-regular LB LL2 completion [type 0x%02x]\n",