Re: [net-next PATCH V2 2/2] octeontx2-af: TC flower offload support for inner VLAN

From: Simon Horman
Date: Mon Jul 31 2023 - 03:11:53 EST


On Sun, Jul 30, 2023 at 01:30:09PM +0530, Suman Ghosh wrote:
> This patch extends current TC flower offload support to allow filters
> involving inner VLAN matching, to be offloaded to HW.
>
> Signed-off-by: Suman Ghosh <sumang@xxxxxxxxxxx>

...

> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
> index f311fa6db7ce..29565680f6c4 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
> @@ -447,10 +447,11 @@ static int otx2_tc_process_vlan(struct otx2_nic *nic, struct flow_msg *flow_spec
> u16 vlan_tci, vlan_tci_mask;
>
> if (is_inner)
> - return -EOPNOTSUPP;
> + flow_rule_match_cvlan(rule, &match);
> + else
> + flow_rule_match_vlan(rule, &match);
>
> - flow_rule_match_vlan(rule, &match);
> - if (ntohs(match.key->vlan_tpid) != ETH_P_8021Q) {
> + if (!eth_type_vlan(ntohs(match.key->vlan_tpid))) {

Hi Suman,

I think this should be:

if (!eth_type_vlan(match.key->vlan_tpid)) {

Otherwise the patch-set looks good to me.

> netdev_err(nic->netdev, "vlan tpid 0x%x not supported\n",
> ntohs(match.key->vlan_tpid));
> return -EOPNOTSUPP;

...