Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp718719ybl; Fri, 24 Jan 2020 08:18:50 -0800 (PST) X-Google-Smtp-Source: APXvYqz+VHG/T4IhTCFkm581lGt3PhUNsmodI9arMMPRjiSgmUoUvTJtKL5MKLCybMtctmNYTI5F X-Received: by 2002:aca:3a05:: with SMTP id h5mr1608085oia.3.1579882730671; Fri, 24 Jan 2020 08:18:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579882730; cv=none; d=google.com; s=arc-20160816; b=XWFNxis3Psht9k1RHCP460SpOnavf6CYlYVnEw/VrxSS6rcHOQ3XrlpIWOukFIjLsu ni/cXEs04IBjtzEcQvYp7ciQbwXL5HRfjJox0wLO+DfdQrunBtkCznXTr4FsFDy9z3jW OLERDKvRzEUaskP0ZbgBRviu4umzKSilceVUPZZlbErtNUA3PMcv+7TCfscTj+NkdHf+ R+Nd0Apo4pNdSkTUrVhhFbRJekKj8mAm3lWgBRy+3VoqIwZ/uT+K0SsaVRyxudYLZ/rg lOFA9PR1GpyUSpdcJ5VP+sf+rGIqXEZWkoX6wmvB1ikWF+3NH7a36VdFBe7XuoXbLl8+ dJWg== 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=wcbUw9Xdy3tq/J6yXDgvTwVArngh4QxTISaCjS2+tq4=; b=XDKqekCtDeH++Gadwv+IBwvKu4uSYOm0VukcOC0m5RSB8Nm465rh9VseGkh02JzAwe QmjeEC5mRYiTMo3D0vOMfkiY5ELLiGupoGm36c6FChc+gubjHMhCMr1s998rEm1Qy9uk ocpP6R9ey4IyYXcTQeXAv7bTBf5GprLdugIro2qhGcQ06djskJdutANDaijJp9bARYJp 8QgGFwCKl3Rz8XhkVz35eiDurRiMzQW/o2ST6Vqz/4MzKcpDe8ITaMGJhtktWAr2eQqM C3Y3aT4LkBgES/MWZXG8NN/wd+pI/ldmjk4ubFsXSY6r/PenCmXRbRpV1aJ3bAPrtzMH +6og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZMz4denu; 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 l17si3083970otk.218.2020.01.24.08.18.38; Fri, 24 Jan 2020 08:18:50 -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=ZMz4denu; 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 S2387685AbgAXLB1 (ORCPT + 99 others); Fri, 24 Jan 2020 06:01:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:34248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730614AbgAXLB0 (ORCPT ); Fri, 24 Jan 2020 06:01:26 -0500 Received: from localhost (ip-213-127-102-57.ip.prioritytelecom.net [213.127.102.57]) (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 1636A2077C; Fri, 24 Jan 2020 11:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579863685; bh=BP7R04dc2l2DbOg8N+2HRcjcolSB/0sllc1I+f4cwps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZMz4denuw54CVcdUSBlaxpPqwcTbxrrR8YupK2MWx11eBenOzmIwkcWreOFmkXMLz VVr74RWEEKBeVkRxFNYzFsBUTb7Z/vtymwEVaPcwhH4VpKcG4lss520x9iirg5WdeH mUT1AOPLqispDoB7QSb8jz/YotXrz98lvU23Y0gY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Petr Machata , Ido Schimmel , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 060/639] mlxsw: reg: QEEC: Add minimum shaper fields Date: Fri, 24 Jan 2020 10:23:50 +0100 Message-Id: <20200124093054.932399262@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124093047.008739095@linuxfoundation.org> References: <20200124093047.008739095@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: Petr Machata [ Upstream commit 8b931821aa04823e2e5df0ae93937baabbd23286 ] Add QEEC.mise (minimum shaper enable) and QEEC.min_shaper_rate to enable configuration of minimum shaper. Increase the QEEC length to 0x20 as well: that's the length that the register has had for a long time now, but with the configurations that mlxsw typically exercises, the firmware tolerated 0x1C-sized packets. With mise=true however, FW rejects packets unless they have the full required length. Fixes: b9b7cee40579 ("mlxsw: reg: Add QoS ETS Element Configuration register") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index aee58b3892f20..c9895876a2317 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/reg.h +++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h @@ -3215,7 +3215,7 @@ static inline void mlxsw_reg_qtct_pack(char *payload, u8 local_port, * Configures the ETS elements. */ #define MLXSW_REG_QEEC_ID 0x400D -#define MLXSW_REG_QEEC_LEN 0x1C +#define MLXSW_REG_QEEC_LEN 0x20 MLXSW_REG_DEFINE(qeec, MLXSW_REG_QEEC_ID, MLXSW_REG_QEEC_LEN); @@ -3257,6 +3257,15 @@ MLXSW_ITEM32(reg, qeec, element_index, 0x04, 0, 8); */ MLXSW_ITEM32(reg, qeec, next_element_index, 0x08, 0, 8); +/* reg_qeec_mise + * Min shaper configuration enable. Enables configuration of the min + * shaper on this ETS element + * 0 - Disable + * 1 - Enable + * Access: RW + */ +MLXSW_ITEM32(reg, qeec, mise, 0x0C, 31, 1); + enum { MLXSW_REG_QEEC_BYTES_MODE, MLXSW_REG_QEEC_PACKETS_MODE, @@ -3273,6 +3282,17 @@ enum { */ MLXSW_ITEM32(reg, qeec, pb, 0x0C, 28, 1); +/* The smallest permitted min shaper rate. */ +#define MLXSW_REG_QEEC_MIS_MIN 200000 /* Kbps */ + +/* reg_qeec_min_shaper_rate + * Min shaper information rate. + * For CPU port, can only be configured for port hierarchy. + * When in bytes mode, value is specified in units of 1000bps. + * Access: RW + */ +MLXSW_ITEM32(reg, qeec, min_shaper_rate, 0x0C, 0, 28); + /* reg_qeec_mase * Max shaper configuration enable. Enables configuration of the max * shaper on this ETS element. -- 2.20.1