Commit 5ae8c0d5 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: dsa: bcm_sf2: Check earlier for FLOW_EXT and FLOW_MAC_EXT

We do not currently support matching on FLOW_EXT or FLOW_MAC_EXT, but we
were not checking for those bits being set in the flow specification.

The check for FLOW_EXT and FLOW_MAC_EXT are separated out because a
subsequent commit will add support for matching VLAN TCI which are
covered by FLOW_EXT.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8b6b208b
...@@ -878,8 +878,9 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port, ...@@ -878,8 +878,9 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port,
int ret = -EINVAL; int ret = -EINVAL;
/* Check for unsupported extensions */ /* Check for unsupported extensions */
if ((fs->flow_type & FLOW_EXT) && (fs->m_ext.vlan_etype || if ((fs->flow_type & FLOW_EXT) ||
fs->m_ext.data[1])) (fs->flow_type & FLOW_MAC_EXT) ||
fs->m_ext.data[1])
return -EINVAL; return -EINVAL;
if (fs->location != RX_CLS_LOC_ANY && if (fs->location != RX_CLS_LOC_ANY &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment