netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Suman Ghosh <sumang@marvell.com>
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
Subject: Re: [PATCH V3] octeontx2-pf: Add additional check for MCAM rules
Date: Tue, 4 Jul 2023 14:47:04 +0100	[thread overview]
Message-ID: <ZKQi2HiT/yu/vSr8@corigine.com> (raw)
In-Reply-To: <20230703170054.2152662-1-sumang@marvell.com>

On Mon, Jul 03, 2023 at 10:30:54PM +0530, Suman Ghosh wrote:
> Due to hardware limitation, MCAM drop rule with
> ether_type == 802.1Q and vlan_id == 0 is not supported. Hence rejecting
> such rules.
> 
> Fixes: dce677da57c0 ("octeontx2-pf: Add vlan-etype to ntuple filters")
> Signed-off-by: Suman Ghosh <sumang@marvell.com>
> ---
> Changes since v2:
> - Added "fixes" tag
> 
>  .../net/ethernet/marvell/octeontx2/nic/otx2_flows.c |  7 +++++++
>  .../net/ethernet/marvell/octeontx2/nic/otx2_tc.c    | 13 +++++++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
> index 10e11262d48a..49ba27875111 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
> @@ -871,6 +871,13 @@ static int otx2_prepare_flow_request(struct ethtool_rx_flow_spec *fsp,
>  			if (be16_to_cpu(fsp->m_ext.vlan_etype) != 0xFFFF)
>  				return -EINVAL;
>  
> +			/* Drop rule with vlan_etype == 802.1Q
> +			 * and vlan_id == 0 is not supported
> +			 */
> +			if (vlan_etype == ETH_P_8021Q && !fsp->m_ext.vlan_tci &&
> +			    fsp->ring_cookie == RX_CLS_FLOW_DISC)
> +				return -EINVAL;
> +

Hi Suman,

vlan_etype appears to be uninitialised here.

>  			vlan_etype = be16_to_cpu(fsp->h_ext.vlan_etype);

Perhaps the new check should go here.

>  			/* Only ETH_P_8021Q and ETH_P_802AD types supported */
>  			if (vlan_etype != ETH_P_8021Q &&

As noted by Jakub elsewhere, please allow 24h from the posting of v3
before posting v4.

-- 
pw-bot: changes-requested

  parent reply	other threads:[~2023-07-04 13:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03 17:00 [PATCH V3] octeontx2-pf: Add additional check for MCAM rules Suman Ghosh
2023-07-03 20:01 ` Jakub Kicinski
2023-07-04 13:47 ` Simon Horman [this message]
2023-07-06 17:34   ` [EXT] " Suman Ghosh
2023-07-06 14:48 ` kernel test robot

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=ZKQi2HiT/yu/vSr8@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=sumang@marvell.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;
as well as URLs for NNTP newsgroup(s).