2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netdev-linux: Disallow setting policing when configured with hw offload

Notify as not supported. Otherwise the ingress qdisc is being removed and
offload rules will be removed.

Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
This commit is contained in:
Paul Blakey
2017-06-13 18:03:45 +03:00
committed by Simon Horman
parent 7ecdef27d4
commit d5ae4a6026

View File

@@ -2087,6 +2087,14 @@ netdev_linux_set_policing(struct netdev *netdev_,
int ifindex;
int error;
if (netdev_is_flow_api_enabled()) {
if (kbits_rate) {
VLOG_WARN_RL(&rl, "%s: policing with offload isn't supported",
netdev_name);
}
return EOPNOTSUPP;
}
kbits_burst = (!kbits_rate ? 0 /* Force to 0 if no rate specified. */
: !kbits_burst ? 8000 /* Default to 8000 kbits if 0. */
: kbits_burst); /* Stick with user-specified value. */