Message ID | 20230216122907.2207291-1-horatiu.vultur@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp275470wrn; Thu, 16 Feb 2023 04:38:50 -0800 (PST) X-Google-Smtp-Source: AK7set/4IRE8JalVe9O3paTZkqaZUwJOPFk7dPoRfhvLqjlP7iFB8gUB/4YexennjMFcd71+YyA5 X-Received: by 2002:a17:906:f8d1:b0:885:a62c:5a5c with SMTP id lh17-20020a170906f8d100b00885a62c5a5cmr5161884ejb.46.1676551130515; Thu, 16 Feb 2023 04:38:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676551130; cv=none; d=google.com; s=arc-20160816; b=pNxruDFF3nt4wCR+3gISoTt+TjLLcHu+a6eN8KoSDWhiHBpYHomGIv3/vAKO7AEnP/ oD0iR6xPb8qI1Vbr/L9u2RSJk+XfLIeqQNhsSdtu1qYYilK4ljCEJXjt9lnCde5YY5oT FulQTJM87eAdeFbnd2y/SxssjNzieeY9wribTncpb4Z2clcU8lrJkSnLXLCtuCa/SSf2 jOZQ1g41XjSTd0LegERpw7kEK9YIrQLMSNxxVq2Shht4Wef+1BAtCF0r+ZL1q7q0/7Ge POLZtPJsWRddVGxgmu7H6rc/fCIyfuBJ/WRFpU9Q1b4ppPCUoY2OTvN0iLPUwpAsr5VP PAww== 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=w4AxyIYnqxHA15Rrd6ASplvTjquGUzt2dzpUQkhcdWM=; b=ykmOk6jOqrLyrOZICLOnYH4Wdl57Rn6K+1LYHXRCNPZIfBh6zDAmBpluhD1Yz37ksv OAkcp7W1bG8f+d7WUZ40dNX402ilxwG3ymL8FIR1Z993jFMyQa/cZEp7/iWVah955CfP OQbcPMewOpK/6Hymt4MZNkmBEd1+VCghxmS8vEyM6vCq1L27znv/Jbt/cBN7ubSyZtVU okTHzS1WFiSeXn/Ul9Qza8lQD62JhncGBOjZgf3z35A2Rg9hKmEibMrQrZR/hQ2a9w53 6Rh/QX53qVFADVMF4XYY1gH1vVkhAfEJXzOdpDXn4ZToqglEANupI1O196se/rtNnlAm d66w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=ge45uuMd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 14-20020a170906014e00b0087868ccbcf9si2725325ejh.885.2023.02.16.04.38.26; Thu, 16 Feb 2023 04:38:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=ge45uuMd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbjBPM3p (ORCPT <rfc822;aimixsaka@gmail.com> + 99 others); Thu, 16 Feb 2023 07:29:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjBPM3n (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 16 Feb 2023 07:29:43 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8416A2202E; Thu, 16 Feb 2023 04:29:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1676550580; x=1708086580; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZnC8Lw8j7ydHwV6zv8nsmB+fLdFDL3MJ3B1RYeFSeuw=; b=ge45uuMdfsn0lvSh7EvnLg0ZTHWlyH6SEpYUIoAkJUUpxlDv2Q/iGQ8a Tg2m3OjP7Ox4ZJg25vxCc1nJpUuaOitOVdG0i4Pt/RgjkBEdlyFl6Zdmu ntBWm62bn1mSwZSD57o/sp+X5AeVuNYeG2D3xcxMpp0ZgMw5geX9Md8/z 5kmb4p3MKJC1vHUf0q+NQeQnYAZshXyuBumb1hRZZbw+3KxU48190nWAH ZAjQ60aai6pXV1HzqqnW6hpvCfkYBmdXAim/Bs+g0UFvpt82DwALBI2/l KffjdmtxbXY8ZbRnHqFQl87AZVgizSSHjU61mMO9wLSxpmLIX7I5fAOv+ g==; X-IronPort-AV: E=Sophos;i="5.97,302,1669100400"; d="scan'208";a="200971009" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Feb 2023 05:29:39 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 16 Feb 2023 05:29:39 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Thu, 16 Feb 2023 05:29:38 -0700 From: Horatiu Vultur <horatiu.vultur@microchip.com> To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <UNGLinuxDriver@microchip.com>, Horatiu Vultur <horatiu.vultur@microchip.com> Subject: [PATCH net-next v2] net: lan966x: Use automatic selection of VCAP rule actionset Date: Thu, 16 Feb 2023 13:29:07 +0100 Message-ID: <20230216122907.2207291-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757795578239050233?= X-GMAIL-MSGID: =?utf-8?q?1757991278209960895?= |
Series |
[net-next,v2] net: lan966x: Use automatic selection of VCAP rule actionset
|
|
Commit Message
Horatiu Vultur
Feb. 16, 2023, 12:29 p.m. UTC
Since commit 81e164c4aec5 ("net: microchip: sparx5: Add automatic
selection of VCAP rule actionset") the VCAP API has the capability to
select automatically the actionset based on the actions that are attached
to the rule. So it is not needed anymore to hardcore the actionset in the
driver, therefore it is OK to remove this.
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
v1->v2:
- improve the commit message by mentioning the commit which allows
to make this change
---
drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Thu, Feb 16, 2023 at 01:29:07PM +0100, Horatiu Vultur wrote: > Since commit 81e164c4aec5 ("net: microchip: sparx5: Add automatic > selection of VCAP rule actionset") the VCAP API has the capability to > select automatically the actionset based on the actions that are attached > to the rule. So it is not needed anymore to hardcore the actionset in the I am sure, you've meant 'hardcode' > driver, therefore it is OK to remove this. > > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> > --- > v1->v2: > - improve the commit message by mentioning the commit which allows > to make this change > --- > drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c b/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c > index bd10a71897418..f960727ecaeec 100644 > --- a/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c > +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c > @@ -261,8 +261,6 @@ static int lan966x_tc_flower_add(struct lan966x_port *port, > 0); > err |= vcap_rule_add_action_u32(vrule, VCAP_AF_MASK_MODE, > LAN966X_PMM_REPLACE); > - err |= vcap_set_rule_set_actionset(vrule, > - VCAP_AFS_BASE_TYPE); Is this the only location, where this can be done? I'm not very familiar with this driver, would it maybe make sense to check out lan966x_ptp_add_trap() too? > if (err) > goto out; > > -- > 2.38.0 >
The 02/16/2023 14:54, Larysa Zaremba wrote: Hi Larysa, > > On Thu, Feb 16, 2023 at 01:29:07PM +0100, Horatiu Vultur wrote: > > Since commit 81e164c4aec5 ("net: microchip: sparx5: Add automatic > > selection of VCAP rule actionset") the VCAP API has the capability to > > select automatically the actionset based on the actions that are attached > > to the rule. So it is not needed anymore to hardcore the actionset in the > > I am sure, you've meant 'hardcode' Yes, I will change this in the next version. > > > driver, therefore it is OK to remove this. > > > > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> > > --- > > v1->v2: > > - improve the commit message by mentioning the commit which allows > > to make this change > > --- > > drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c b/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c > > index bd10a71897418..f960727ecaeec 100644 > > --- a/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c > > +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c > > @@ -261,8 +261,6 @@ static int lan966x_tc_flower_add(struct lan966x_port *port, > > 0); > > err |= vcap_rule_add_action_u32(vrule, VCAP_AF_MASK_MODE, > > LAN966X_PMM_REPLACE); > > - err |= vcap_set_rule_set_actionset(vrule, > > - VCAP_AFS_BASE_TYPE); > > Is this the only location, where this can be done? I'm not very familiar with > this driver, would it maybe make sense to check out lan966x_ptp_add_trap() too? Good catch! Also in lan966x_ptp_add_trap, the function vcap_set_rule_set_actionset can be removed. > > > if (err) > > goto out; > > > > -- > > 2.38.0 > >
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c b/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c index bd10a71897418..f960727ecaeec 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c @@ -261,8 +261,6 @@ static int lan966x_tc_flower_add(struct lan966x_port *port, 0); err |= vcap_rule_add_action_u32(vrule, VCAP_AF_MASK_MODE, LAN966X_PMM_REPLACE); - err |= vcap_set_rule_set_actionset(vrule, - VCAP_AFS_BASE_TYPE); if (err) goto out;