openvswitch: Add meter action support

Implements OVS kernel meter action support.

Signed-off-by: Andy Zhou <azhou@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andy Zhou
2017-11-10 12:09:43 -08:00
committed by David S. Miller
parent 96fbc13d7e
commit cd8a6c3369
4 changed files with 16 additions and 0 deletions

View File

@@ -1330,6 +1330,12 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
case OVS_ACTION_ATTR_POP_NSH:
err = pop_nsh(skb, key);
break;
case OVS_ACTION_ATTR_METER:
if (ovs_meter_execute(dp, skb, key, nla_get_u32(a))) {
consume_skb(skb);
return 0;
}
}
if (unlikely(err)) {