Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11814716pjo; Thu, 2 Jan 2020 14:45:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwAVyVzNCm3YlZ7fa375X2t0whC/z+5K+P8U04cfaKHXa9QwfUkiuYtTOKMDaLK39hPTbkp X-Received: by 2002:aca:d0c:: with SMTP id 12mr3304199oin.26.1578005130093; Thu, 02 Jan 2020 14:45:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578005130; cv=none; d=google.com; s=arc-20160816; b=yKGFjhtYKXcadYygIXi+BLAU7s1KEM3DffqH3pQJptVWuBZsJNZ5ZAA+uzKW0UKeYf b9iO4K0NJMFgWqHH9cdZx6tM2WXw1Ro2XKxQN6xP0PQi4yzyUbPEWr3r61+fs9EpuX7b llWkoZvBsETz+rDCPPBQdIJI0OmL68FC6cBmoapie5t0a5Uu67GFYC8BViMMIbZgjZ3F pkzG4y7CnTSZxyTlKbzedTiCsWgw87BVT6ESTAQOf5cKNtESiXCB8HQIKKQ3W2TNujRe qaGHpV5F6O33BbNNouthDUksxhv2dlEvGEUa2f1XrCdP2Dk5sxSJiRasnWIopzyGCAu3 1KAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8FJ97kRsYhQvpYKCuOnQ/tL/yREzUafyQ0K/73j0qkM=; b=MJuiH4mIYQGuVyV31vfSO1er6wQHwzYxPo21t9Rwgkk9bWpaCwDQN5JmQLpQ69FDnY TAklp9cJmH7tZaoY5xfHPmqnUOPYJrusTpbya/b68wXbVE9+oQY/XzFcGFgr8pgxixRA CAWvMxNYv/46gIwcZaJKpEmi0Aq25/5b7UmymG+dJFMytqS5d9nW0MO7RtsDtZBRSxLc XhT1sKMPZGW4m+AupQvTIlsYptJYUGGtdS5GPkgFLUfElhCmiDEKEtMkELW4Fuayez4E WE4savicRNBDAbdE9CBqfPyTA2GbxpVZPMBj+kS9fXfrCMJ+4tPW0QxeeA9E94lzneLF R/5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Sspxrw3Q; 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 c5si25038940oig.75.2020.01.02.14.45.18; Thu, 02 Jan 2020 14:45:30 -0800 (PST) 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=Sspxrw3Q; 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 S1731041AbgABWnL (ORCPT + 99 others); Thu, 2 Jan 2020 17:43:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:44456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730771AbgABWfE (ORCPT ); Thu, 2 Jan 2020 17:35:04 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 D307021835; Thu, 2 Jan 2020 22:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004504; bh=Q8ckFmLk3fzclWZ/XYT5Lu6vhrYngCaehPp/248MpIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sspxrw3Qcf4dcVEBZA8VqWsc7bFk6etIf1uOExgKCj9lUH1B9DUtUYMGQFl4EdwRS xtrccq86ohmwgu2YRRbw458Vf6pP8W1nKZDap+79fcFHkBherX3PqzTDk+23UFNoL8 JwDauWkDlEwIJF5G9ZkISrcT2S/+b3Ev6x7HDxX4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Manish Chopra , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 035/137] bnx2x: Fix PF-VF communication over multi-cos queues. Date: Thu, 2 Jan 2020 23:06:48 +0100 Message-Id: <20200102220551.371362423@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Manish Chopra [ Upstream commit dc5a3d79c345871439ffe72550b604fcde9770e1 ] PF driver doesn't enable tx-switching for all cos queues/clients, which causes packets drop from PF to VF. Fix this by enabling tx-switching on all cos queues/clients. Signed-off-by: Manish Chopra Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c index 5780830f78ad..55a7774e8ef5 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c @@ -2384,15 +2384,21 @@ static int bnx2x_set_pf_tx_switching(struct bnx2x *bp, bool enable) /* send the ramrod on all the queues of the PF */ for_each_eth_queue(bp, i) { struct bnx2x_fastpath *fp = &bp->fp[i]; + int tx_idx; /* Set the appropriate Queue object */ q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; - /* Update the Queue state */ - rc = bnx2x_queue_state_change(bp, &q_params); - if (rc) { - BNX2X_ERR("Failed to configure Tx switching\n"); - return rc; + for (tx_idx = FIRST_TX_COS_INDEX; + tx_idx < fp->max_cos; tx_idx++) { + q_params.params.update.cid_index = tx_idx; + + /* Update the Queue state */ + rc = bnx2x_queue_state_change(bp, &q_params); + if (rc) { + BNX2X_ERR("Failed to configure Tx switching\n"); + return rc; + } } } -- 2.20.1