Message ID | 20231130193135.1580284-1-ivecera@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp632742vqy; Thu, 30 Nov 2023 11:32:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnPj4oNUss5zZbHTWEk3+VIoJKSDEQP5QSux3tKlDRxS3P4utTe8ChNBr6LlKyC2p03A6d X-Received: by 2002:a05:6871:4581:b0:1fa:38db:5486 with SMTP id nl1-20020a056871458100b001fa38db5486mr20681238oab.17.1701372725290; Thu, 30 Nov 2023 11:32:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701372725; cv=none; d=google.com; s=arc-20160816; b=ZZRSuk15cJAqumumCI7LyfVxRQ21yiLO6isIhikBGitpna9m6AJsQPFKU5HekqNGYb orBDgAQjk07d+zoXJM1Ojtod7PDNYrOx8Hbjmr2bEBocuQxlXXrtIKoltODSbBZO+lHh E5qgWq82Cz6SXW4qUJup15K+AhF6qFivCeWkTMaMd/tsDajY3nF7/3K8I8jHsQ331JM2 /l5mFFw4zb7hNz+rwDCZvBarzri8K9b/UkOyXk1JT97Xc7W3RIsBzW+/wQnRy3b092Bo AXH5W+Jf2/z4Og8q+H8L5W4NqSTYNHBoKSbzRX+Y2EI0ICz/Ui5QyD7HuROsdX7C1dm/ N5cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XUKjduYx0sBCtPzyCQgJXjX+AsFij/jhpdfQd/PC2MQ=; fh=5mYLtG5X98z5R3C8iBoeBSD0CSrGq+b+uSlmK232rX0=; b=kBb2k1XF5vjcpoq+FBLy1py/bUhaE4a+U4BD8EK4THJUPvAS++Yp5TYIF86AugKIqA eNh+Be0LJp1YlWWGhp2CwVuxRT2tGtJo+vUWKvpPi8jH5ATj+4yPERcU8FFccJAq2Ebc SGV9l25IRvauwanwJ7zld5F5LQU4i7K6FxByiNXYq9NrvM2E31A12pJn0v2IRX1I8IFA ko05AcJ9feSbcuwJTDkoyN3lQiP+Jmjny8ZDevkbDL4BNBhyTMUbn8GrKz6rLWr2hlus RVAeiZFvTpmx9A9jf17s4O4JivqjoSGRr17C4s51GxewIQfk86/SHixGRG9xwCQuR1fX cNqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KcraI4vP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d11-20020a056830138b00b006d8542f22c4si672004otq.293.2023.11.30.11.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 11:32:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KcraI4vP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 53C8480D44E1; Thu, 30 Nov 2023 11:31:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376436AbjK3Tbg (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Thu, 30 Nov 2023 14:31:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376388AbjK3Tbe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 30 Nov 2023 14:31:34 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8292B93 for <linux-kernel@vger.kernel.org>; Thu, 30 Nov 2023 11:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701372700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=XUKjduYx0sBCtPzyCQgJXjX+AsFij/jhpdfQd/PC2MQ=; b=KcraI4vPCsrmIED08agHmpQ/68la+sZcJtws8oC1QXEQDK1Qm0g0A3RX4mPY2IIbrdEhO3 bvnDBum4xJciZ6b79i5v67xAiV2VqJPZydlN8bzP+a+0qybRmlR1dnYINYdS8c16Dw9Q9b gsiwnDwlk5faHK8H2JRgKG3gm81CNiI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-84-ruzrkH6zNcqvsDcI07CyeA-1; Thu, 30 Nov 2023 14:31:38 -0500 X-MC-Unique: ruzrkH6zNcqvsDcI07CyeA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ACBB485A58C; Thu, 30 Nov 2023 19:31:37 +0000 (UTC) Received: from p1.luc.cera.cz (unknown [10.45.225.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 061F31C060AE; Thu, 30 Nov 2023 19:31:35 +0000 (UTC) From: Ivan Vecera <ivecera@redhat.com> To: netdev@vger.kernel.org Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>, Tony Nguyen <anthony.l.nguyen@intel.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Aleksandr Loktionov <aleksandr.loktionov@intel.com>, Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>, intel-wired-lan@lists.osuosl.org (moderated list:INTEL ETHERNET DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH iwl-net] i40e: Fix wrong mask used during DCB config Date: Thu, 30 Nov 2023 20:31:34 +0100 Message-ID: <20231130193135.1580284-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 30 Nov 2023 11:31:45 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784018606978937624 X-GMAIL-MSGID: 1784018606978937624 |
Series |
[iwl-net] i40e: Fix wrong mask used during DCB config
|
|
Commit Message
Ivan Vecera
Nov. 30, 2023, 7:31 p.m. UTC
Mask used for clearing PRTDCB_RETSTCC register in function
i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used
define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define
I40E_PRTDCB_RETSTCC_ETSTC_MASK.
The PRTDCB_RETSTCC register is used to configure whether ETS
or strict priority is used as TSA in Rx for particular TC.
In practice it means that once the register is set to use ETS
as TSA then it is not possible to switch back to strict priority
without CoreR reset.
Fix the value in the clearing mask.
Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
drivers/net/ethernet/intel/i40e/i40e_dcb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 11/30/23 20:31, Ivan Vecera wrote: > Mask used for clearing PRTDCB_RETSTCC register in function > i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used > define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define > I40E_PRTDCB_RETSTCC_ETSTC_MASK. > > The PRTDCB_RETSTCC register is used to configure whether ETS > or strict priority is used as TSA in Rx for particular TC. > > In practice it means that once the register is set to use ETS > as TSA then it is not possible to switch back to strict priority > without CoreR reset. > > Fix the value in the clearing mask. > > Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB") > Signed-off-by: Ivan Vecera <ivecera@redhat.com> > --- > drivers/net/ethernet/intel/i40e/i40e_dcb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c > index 68602fc375f6..073ffbfcbe8d 100644 > --- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c > +++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c > @@ -1576,7 +1576,7 @@ void i40e_dcb_hw_rx_ets_bw_config(struct i40e_hw *hw, u8 *bw_share, > reg = rd32(hw, I40E_PRTDCB_RETSTCC(i)); > reg &= ~(I40E_PRTDCB_RETSTCC_BWSHARE_MASK | > I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK | > - I40E_PRTDCB_RETSTCC_ETSTC_SHIFT); > + I40E_PRTDCB_RETSTCC_ETSTC_MASK); > reg |= ((u32)bw_share[i] << I40E_PRTDCB_RETSTCC_BWSHARE_SHIFT) & > I40E_PRTDCB_RETSTCC_BWSHARE_MASK; > reg |= ((u32)mode[i] << I40E_PRTDCB_RETSTCC_UPINTC_MODE_SHIFT) & Thank you! Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
On Thu, Nov 30, 2023 at 08:31:34PM +0100, Ivan Vecera wrote: > Mask used for clearing PRTDCB_RETSTCC register in function > i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used > define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define > I40E_PRTDCB_RETSTCC_ETSTC_MASK. > > The PRTDCB_RETSTCC register is used to configure whether ETS > or strict priority is used as TSA in Rx for particular TC. > > In practice it means that once the register is set to use ETS > as TSA then it is not possible to switch back to strict priority > without CoreR reset. > > Fix the value in the clearing mask. > > Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB") > Signed-off-by: Ivan Vecera <ivecera@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org>
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Ivan Vecera > Sent: Friday, December 1, 2023 1:02 AM > To: netdev@vger.kernel.org > Cc: moderated list:INTEL ETHERNET DRIVERS <intel-wired-lan@lists.osuosl.org>; Brandeburg, Jesse <jesse.brandeburg@intel.com>; Kubalewski, Arkadiusz <arkadiusz.kubalewski@intel.com>; Loktionov, Aleksandr <aleksandr.loktionov@intel.com>; Eric Dumazet <edumazet@google.com>; Nguyen, Anthony L <anthonyl.nguyen@intel.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; David S. Miller <davem@davemloft.net>; open list <linux-kernel@vger.kernel.org> > Subject: [Intel-wired-lan] [PATCH iwl-net] i40e: Fix wrong mask used during DCB config > > Mask used for clearing PRTDCB_RETSTCC register in function > i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used > define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define > I40E_PRTDCB_RETSTCC_ETSTC_MASK. > > The PRTDCB_RETSTCC register is used to configure whether ETS > or strict priority is used as TSA in Rx for particular TC. > > In practice it means that once the register is set to use ETS > as TSA then it is not possible to switch back to strict priority > without CoreR reset. > > Fix the value in the clearing mask. > > Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB") > Signed-off-by: Ivan Vecera <ivecera@redhat.com> > --- > drivers/net/ethernet/intel/i40e/i40e_dcb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c index 68602fc375f6..073ffbfcbe8d 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c +++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c @@ -1576,7 +1576,7 @@ void i40e_dcb_hw_rx_ets_bw_config(struct i40e_hw *hw, u8 *bw_share, reg = rd32(hw, I40E_PRTDCB_RETSTCC(i)); reg &= ~(I40E_PRTDCB_RETSTCC_BWSHARE_MASK | I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK | - I40E_PRTDCB_RETSTCC_ETSTC_SHIFT); + I40E_PRTDCB_RETSTCC_ETSTC_MASK); reg |= ((u32)bw_share[i] << I40E_PRTDCB_RETSTCC_BWSHARE_SHIFT) & I40E_PRTDCB_RETSTCC_BWSHARE_MASK; reg |= ((u32)mode[i] << I40E_PRTDCB_RETSTCC_UPINTC_MODE_SHIFT) &