mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <richardcochran@gmail.com>,
	<UNGLinuxDriver@microchip.com>, <larysa.zaremba@intel.com>
Subject: Re: [PATCH net-next v3] net: lan966x: Use automatic selection of VCAP rule actionset
Date: Fri, 17 Feb 2023 16:06:51 +0100	[thread overview]
Message-ID: <e85d5bed-6c62-d055-d696-085f447f8fd2@intel.com> (raw)
In-Reply-To: <20230217132831.2508465-1-horatiu.vultur@microchip.com>

From: Horatiu Vultur <horatiu.vultur@microchip.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@microchip.com>
> ---
> v2->v3:
> - fix typo hardcore -> hardcode

:D

Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.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

  reply	other threads:[~2023-02-17 15:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 13:28 Horatiu Vultur
2023-02-17 15:06 ` Alexander Lobakin [this message]
2023-02-20 11:40 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e85d5bed-6c62-d055-d696-085f447f8fd2@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kuba@kernel.org \
    --cc=larysa.zaremba@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®