aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mscc
diff options
context:
space:
mode:
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>2021-11-18 18:12:04 +0800
committerDavid S. Miller <davem@davemloft.net>2021-11-18 12:07:24 +0000
commita7e13edf37beee65f2c2ec60c42e5fb89a2958ce (patch)
tree035cff7ba7904e9d41bfe4a910a0c884d914e87c /drivers/net/ethernet/mscc
parentnet: dsa: felix: use vcap policer to set flow meter for psfp (diff)
downloadlinux-dev-a7e13edf37beee65f2c2ec60c42e5fb89a2958ce.tar.xz
linux-dev-a7e13edf37beee65f2c2ec60c42e5fb89a2958ce.zip
net: dsa: felix: restrict psfp rules on ingress port
PSFP rules take effect on the streams from any port of VSC9959 switch. This patch use ingress port to limit the rule only active on this port. Each stream can only match two ingress source ports in VSC9959. Streams from lowest port gets the configuration of SFID pointed by MAC Table lookup and streams from highest port gets the configuration of (SFID+1) pointed by MAC Table lookup. This patch defines the PSFP rule on highest port as dummy rule, which means that it does not modify the MAC table. Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc')
-rw-r--r--drivers/net/ethernet/mscc/ocelot_flower.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_flower.c b/drivers/net/ethernet/mscc/ocelot_flower.c
index b54b52fd9e1b..58fce173f95b 100644
--- a/drivers/net/ethernet/mscc/ocelot_flower.c
+++ b/drivers/net/ethernet/mscc/ocelot_flower.c
@@ -837,7 +837,7 @@ int ocelot_cls_flower_replace(struct ocelot *ocelot, int port,
if (filter->type == OCELOT_PSFP_FILTER_OFFLOAD) {
kfree(filter);
if (ocelot->ops->psfp_filter_add)
- return ocelot->ops->psfp_filter_add(ocelot, f);
+ return ocelot->ops->psfp_filter_add(ocelot, port, f);
NL_SET_ERR_MSG_MOD(extack, "PSFP chain is not supported in HW");
return -EOPNOTSUPP;