Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62CC91FDA for ; Mon, 31 Jul 2023 07:03:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2645CC433C8; Mon, 31 Jul 2023 07:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690787037; bh=z4A/IQIPWkayIF84XQQiMIyxWbCRT1XKTYCbJIaYDtU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mk5FRRct0o9cJ6r1gCqyZCnsTGuKTOOvLXpTMO0pypgjgN9+7k9hTo2GBM9dwhwqv x6Hf4oPVLCXDpUn1iE7YJYLBKMPuO/IDmH56k4SeWFXV5rfr+IYDz2I5SkSqfRe1/B xO7T8/pMWkBdJvlk3oBBzlGkRmR/zB69eZec2vRkiGtEhfdIcZ1aEPWYM+2IJ622W2 SCrRRPyV/0XMwYV9EJU1VvREqunHRujAOFs+tsbIHxphqpp2O+Zb0TH8qxWT8vEchX T19ulWQK4iK4J05J3Gci+PYBNUXOx3JZNaS6unENR5bli/+TKUlHpaNCNJ47GcqedI 0kA0KqXDQVAVQ== Date: Mon, 31 Jul 2023 09:03:52 +0200 From: Simon Horman To: Suman Ghosh Cc: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com, hkelam@marvell.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lcherian@marvell.com, jerinj@marvell.com, simon.horman@corigine.com Subject: Re: [net-next PATCH V2 2/2] octeontx2-af: TC flower offload support for inner VLAN Message-ID: References: <20230730080009.2842927-1-sumang@marvell.com> <20230730080009.2842927-3-sumang@marvell.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230730080009.2842927-3-sumang@marvell.com> 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 ... > 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; ...