Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7278212imu; Wed, 14 Nov 2018 14:44:36 -0800 (PST) X-Google-Smtp-Source: AJdET5fDSnEfTIyCyIx6KD5R/7MccD5fKeQ5vuRTCCVkFk4/L5nCjbDxUAgG5gIeNp3yd4TClIsL X-Received: by 2002:a63:790e:: with SMTP id u14mr3475708pgc.452.1542235476532; Wed, 14 Nov 2018 14:44:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542235476; cv=none; d=google.com; s=arc-20160816; b=Q+FenUJeVduEIKAw1txS+FaU2d9piAcABS7SLnoaYq6rMwJlHVBdQtqdZy6cRRgfvB 8KuERhwMKf0p9Iao1QZRLzj7Zixe7j4Q9khtzCPwjlXVZ0bOc1vYBU3szGwz8Tynpvs3 hQHlfGKp0q1SUl3krE++9oa6YXvLu4IV/Ov4HPwQ2pYT7+Me2WYrXCQYo5PkwNPA0nqn 0bseKJ6zfFHe/IfAWGKW2o/6ohBaIszE/B6Ndfxu87OS1ME2bMiGQBWQunX7j2HdGBJy hqd/29HQyaRGPD3CcvQeAWzn6PHHqS8vSwOVEbr+MkIbgraYdTK1OXUnOw3GwMAzo77E ZP/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=u6ZmI5NEYObFhb+yadq8RM6YOuZYYxaxER1oEu9Ag58=; b=RlCOiVXrqcnLV1nMxG8wM9ejgIyBvLrO5XuNVzC47vYua7Vkwv7jNCHafKgA7DtV2j Nak04SPJiDYCE87yl+VtQ+x3eV9Cd9hmE88Q2QXaZsoZ7BUfRWeYVLZjmh5r8Aqsk53r Lhf28dNPrlLSWpZNmS9Nd5lTUFLzN72T6/wuEErnFr2k56wIB6BmMjzTWWRUn43sF9L4 0W90juHn3M0yi2QNmj9VkkHi3rg/t5eCjKfkC3eKqbD4EGV40W6XJiM1waVrGLEnnF14 K9jf96rL08KTJR14V+2wUcQpJfcPcWeI+zl8Kni2neLKIbIPn+8wgZ1dppezErfhegeD aqDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V9lg8P23; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22-v6si25320268pfs.13.2018.11.14.14.44.22; Wed, 14 Nov 2018 14:44:36 -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=V9lg8P23; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728586AbeKOI1T (ORCPT + 99 others); Thu, 15 Nov 2018 03:27:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:34408 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728526AbeKOI1S (ORCPT ); Thu, 15 Nov 2018 03:27:18 -0500 Received: from sasha-vm.mshome.net (unknown [64.114.255.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EBCD12252E; Wed, 14 Nov 2018 22:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542234135; bh=3YjUD5jnfZOFBbs99hn+DueBbA90XJuNrWm6x9PLkHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V9lg8P23k+ZdWfY7AkW5KB6nq6OXy6/co2JxPr2Utxbx0TMwnZgD8FSZ0dljRuD/t TR7ooHW7Pv/b1i/i0WLBI1/vdMGbZnImZQNgPZ2eqrljV2jq97O9miFZHrdxREe7VV eZy13guedV/drJSfbIw1Sezq/kC1e7HN7ePHXioA= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Shalom Toledo , Ido Schimmel , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.19 27/73] mlxsw: spectrum: Fix IP2ME CPU policer configuration Date: Wed, 14 Nov 2018 17:21:21 -0500 Message-Id: <20181114222207.98701-27-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222207.98701-1-sashal@kernel.org> References: <20181114222207.98701-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shalom Toledo [ Upstream commit 96801552f846460fe9ac10f1b189602992f004e1 ] The CPU policer used to police packets being trapped via a local route (IP2ME) was incorrectly configured to police based on bytes per second instead of packets per second. Change the policer to police based on packets per second and avoid packet loss under certain circumstances. Fixes: 9148e7cf73ce ("mlxsw: spectrum: Add policers for trap groups") Signed-off-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index 30bb2c533cec..ada644d90029 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -3519,7 +3519,6 @@ static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core) burst_size = 7; break; case MLXSW_REG_HTGT_TRAP_GROUP_SP_IP2ME: - is_bytes = true; rate = 4 * 1024; burst_size = 4; break; -- 2.17.1