[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e85d5bed-6c62-d055-d696-085f447f8fd2@intel.com>
Date: Fri, 17 Feb 2023 16:06:51 +0100
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Horatiu Vultur <horatiu.vultur@...rochip.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <richardcochran@...il.com>,
<UNGLinuxDriver@...rochip.com>, <larysa.zaremba@...el.com>
Subject: Re: [PATCH net-next v3] net: lan966x: Use automatic selection of VCAP
rule actionset
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
Date: Fri, 17 Feb 2023 14:28:31 +0100
> 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 hardcode the actionset in the
> driver, therefore it is OK to remove this.
>
> Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
> ---
> v2->v3:
> - fix typo hardcore -> hardcode
:D
Reviewed-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> - remove vcap_set_rule_set_actionset also for PTP rules
> v1->v2:
> - improve the commit message by mentioning the commit which allows
> to make this change
> ---
> drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 3 +--
> drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c | 2 --
> 2 files changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
> index a8348437dd87f..ded9ab79ccc21 100644
> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
> @@ -83,8 +83,7 @@ static int lan966x_ptp_add_trap(struct lan966x_port *port,
> if (err)
> goto free_rule;
>
> - err = vcap_set_rule_set_actionset(vrule, VCAP_AFS_BASE_TYPE);
> - err |= vcap_rule_add_action_bit(vrule, VCAP_AF_CPU_COPY_ENA, VCAP_BIT_1);
> + err = vcap_rule_add_action_bit(vrule, VCAP_AF_CPU_COPY_ENA, VCAP_BIT_1);
> err |= vcap_rule_add_action_u32(vrule, VCAP_AF_MASK_MODE, LAN966X_PMM_REPLACE);
> err |= vcap_val_rule(vrule, proto);
> if (err)
> 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;
>
Thanks,
Olek
Powered by blists - more mailing lists