summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/actions.c
diff options
context:
space:
mode:
authorAndy Zhou2017-11-10 21:09:43 +0100
committerDavid S. Miller2017-11-13 02:37:07 +0100
commitcd8a6c33693c1b89d2737ffdbf9611564e9ac907 (patch)
tree758c1ad7b4613b907669ee97f0a8c89d24763a05 /net/openvswitch/actions.c
parentopenvswitch: Add meter infrastructure (diff)
downloadkernel-qcow2-linux-cd8a6c33693c1b89d2737ffdbf9611564e9ac907.tar.gz
kernel-qcow2-linux-cd8a6c33693c1b89d2737ffdbf9611564e9ac907.tar.xz
kernel-qcow2-linux-cd8a6c33693c1b89d2737ffdbf9611564e9ac907.zip
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>
Diffstat (limited to 'net/openvswitch/actions.c')
-rw-r--r--net/openvswitch/actions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 9a6a6d51e421..30a5df27116e 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -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)) {