diff options
author | Baowen Zheng <baowen.zheng@corigine.com> | 2021-03-12 15:08:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-13 23:18:09 +0100 |
commit | 6a56e19902af01da447cd3104d5a6e8d01792ee1 (patch) | |
tree | 266ec2f336906f85bd0354c2cb04176146871efd /drivers/net/dsa/sja1105/sja1105_flower.c | |
parent | flow_offload: add support for packet-per-second policing (diff) | |
download | linux-6a56e19902af01da447cd3104d5a6e8d01792ee1.tar.xz linux-6a56e19902af01da447cd3104d5a6e8d01792ee1.zip |
flow_offload: reject configuration of packet-per-second policing in offload drivers
A follow-up patch will allow users to configures packet-per-second policing
in the software datapath. In preparation for this, teach all drivers that
support offload of the policer action to reject such configuration as
currently none of them support it.
Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Louis Peens <louis.peens@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_flower.c')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_flower.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_flower.c b/drivers/net/dsa/sja1105/sja1105_flower.c index 12e76020bea3..f78b767f86ee 100644 --- a/drivers/net/dsa/sja1105/sja1105_flower.c +++ b/drivers/net/dsa/sja1105/sja1105_flower.c @@ -322,6 +322,12 @@ int sja1105_cls_flower_add(struct dsa_switch *ds, int port, flow_action_for_each(i, act, &rule->action) { switch (act->id) { case FLOW_ACTION_POLICE: + if (act->police.rate_pkt_ps) { + NL_SET_ERR_MSG_MOD(extack, + "QoS offload not support packets per second"); + goto out; + } + rc = sja1105_flower_policer(priv, port, extack, cookie, &key, act->police.rate_bytes_ps, |