[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230722094238.2520044-4-amorenoz@redhat.com>
Date: Sat, 22 Jul 2023 11:42:33 +0200
From: Adrian Moreno <amorenoz@...hat.com>
To: netdev@...r.kernel.org
Cc: Adrian Moreno <amorenoz@...hat.com>,
dev@...nvswitch.org,
aconole@...hat.com,
i.maximets@....org,
eric@...ver.life
Subject: [PATCH net-next 3/7] net: openvswitch: add meter drop reason
By using an independent drop reason it makes it easy to ditinguish
between QoS-triggered or flow-triggered drop.
Signed-off-by: Adrian Moreno <amorenoz@...hat.com>
---
net/openvswitch/actions.c | 2 +-
net/openvswitch/drop.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 194379d58b62..9279bb186e9f 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -1454,7 +1454,7 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
case OVS_ACTION_ATTR_METER:
if (ovs_meter_execute(dp, skb, key, nla_get_u32(a))) {
- consume_skb(skb);
+ kfree_skb_reason(skb, OVS_DROP_METER);
return 0;
}
break;
diff --git a/net/openvswitch/drop.h b/net/openvswitch/drop.h
index f9e9c1610f6b..2440c836727f 100644
--- a/net/openvswitch/drop.h
+++ b/net/openvswitch/drop.h
@@ -11,6 +11,7 @@
R(OVS_DROP_FLOW) \
R(OVS_DROP_EXPLICIT_ACTION) \
R(OVS_DROP_EXPLICIT_ACTION_ERROR) \
+ R(OVS_DROP_METER) \
/* deliberate comment for trailing \ */
enum ovs_drop_reason {
--
2.41.0
Powered by blists - more mailing lists