Received: by 10.192.165.156 with SMTP id m28csp74773imm; Tue, 10 Apr 2018 16:45:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx49WMaeBirKtvm+aZQy4r3JtWQZt8g+dGrSETD2TsSMtj6yDNu4wLn9tmMn+rWfVszlADXeL X-Received: by 2002:a17:902:7405:: with SMTP id g5-v6mr2555969pll.4.1523403919913; Tue, 10 Apr 2018 16:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523403919; cv=none; d=google.com; s=arc-20160816; b=T7hi2PW1ipgexWft4SVJeqOYbcPbSxk4jGnbupbqpe6UZmZBdrzGatMK2VgOAzYLyw yQWIEYcumTEIM5frN7L+YX1hv1QE6tsbo9PdfR0Iov1jjsP/ZRxjDHesucHGa1sMRuXK mKCLWJEBl7SBOPC5YzswR24OYF6CavLHF4yMFvTRM35X+mgtPhsd/phaBvASuIMVuAjh P8FJdzazMvE1u4wH5tIgg4nWuhX6ZGdfWsr2LecKIWympmTOCr3P1wR2BrZbZKueBiEk 6mbCxOCco93nGUYIzn641eerHTJkUP8elCcZAslre0NDRbxSrosC/rCtf70n3GoBdsLn 2D6Q== 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=4jj3+lS9fuvbQXz2INAO5NW3pio0DAxuguA0mHEe1EA=; b=B6jPPirsuclqDCgNO09/QXtIXDA7/4qogoyJvRpI8su3+LXyMRRdC/Dnq4AtUQB2uE 8alAOSZDVO56nP3vVsZ/30x2GrBVknaI0gNqdVfWUNValAeM7JKNZEktNjQbfHwXC/jm l9oLUewS/PTp1bvBwsA8Q56GY0eOJ0BFfSWUH8vw/rd1KN0+swr8aXOh5Z7ZefMaWeDs RvMQFBgCYsynvt1bWCeR1XotswKJobcGXPRmAcguV7PWsnyCP8JFtZYj8geapmpiinYZ EfWIG+ZdeAKpchjj2YuIAJLff2CPJuEKw08vePYPgfEvgd/B/VU9pEyMdE6E+japafTe Cxzg== 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 y19si2371688pgc.540.2018.04.10.16.44.43; Tue, 10 Apr 2018 16:45:19 -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 S1753169AbeDJW0c (ORCPT + 99 others); Tue, 10 Apr 2018 18:26:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37222 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753127AbeDJW0b (ORCPT ); Tue, 10 Apr 2018 18:26:31 -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 45776DC3; Tue, 10 Apr 2018 22:26:30 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Moni Shoua , Maor Gottlieb , Tariq Toukan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.15 019/168] net/mlx4_en: Change default QoS settings Date: Wed, 11 Apr 2018 00:22:41 +0200 Message-Id: <20180410212801.028229454@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: Moni Shoua [ Upstream commit a42b63c1ac1986f17f71bc91a6b0aaa14d4dae71 ] Change the default mapping between TC and TCG as follows: Prio | TC/TCG | from to | (set by FW) (set by SW) ---------+----------------------------------- 0 | 0/0 0/7 1 | 1/0 0/6 2 | 2/0 0/5 3 | 3/0 0/4 4 | 4/0 0/3 5 | 5/0 0/2 6 | 6/0 0/1 7 | 7/0 0/0 These new settings cause that a pause frame for any prio stops traffic for all prios. Fixes: 564c274c3df0 ("net/mlx4_en: DCB QoS support") Signed-off-by: Moni Shoua Signed-off-by: Maor Gottlieb Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | 5 +++++ drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 7 +++++++ drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 + 3 files changed, 13 insertions(+) --- a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c @@ -310,6 +310,7 @@ static int mlx4_en_ets_validate(struct m } switch (ets->tc_tsa[i]) { + case IEEE_8021QAZ_TSA_VENDOR: case IEEE_8021QAZ_TSA_STRICT: break; case IEEE_8021QAZ_TSA_ETS: @@ -347,6 +348,10 @@ static int mlx4_en_config_port_scheduler /* higher TC means higher priority => lower pg */ for (i = IEEE_8021QAZ_MAX_TCS - 1; i >= 0; i--) { switch (ets->tc_tsa[i]) { + case IEEE_8021QAZ_TSA_VENDOR: + pg[i] = MLX4_EN_TC_VENDOR; + tc_tx_bw[i] = MLX4_EN_BW_MAX; + break; case IEEE_8021QAZ_TSA_STRICT: pg[i] = num_strict++; tc_tx_bw[i] = MLX4_EN_BW_MAX; --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -3336,6 +3336,13 @@ int mlx4_en_init_netdev(struct mlx4_en_d priv->msg_enable = MLX4_EN_MSG_LEVEL; #ifdef CONFIG_MLX4_EN_DCB if (!mlx4_is_slave(priv->mdev->dev)) { + u8 prio; + + for (prio = 0; prio < IEEE_8021QAZ_MAX_TCS; ++prio) { + priv->ets.prio_tc[prio] = prio; + priv->ets.tc_tsa[prio] = IEEE_8021QAZ_TSA_VENDOR; + } + priv->dcbx_cap = DCB_CAP_DCBX_VER_CEE | DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_IEEE; priv->flags |= MLX4_EN_DCB_ENABLED; --- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h @@ -479,6 +479,7 @@ struct mlx4_en_frag_info { #define MLX4_EN_BW_MIN 1 #define MLX4_EN_BW_MAX 100 /* Utilize 100% of the line */ +#define MLX4_EN_TC_VENDOR 0 #define MLX4_EN_TC_ETS 7 enum dcb_pfc_type {