From: Adrian Moreno <amorenoz@redhat.com>
To: netdev@vger.kernel.org
Cc: Adrian Moreno <amorenoz@redhat.com>,
aconole@redhat.com, i.maximets@ovn.org, eric@garver.life,
dev@openvswitch.org
Subject: [net-next v3 4/7] net: openvswitch: add meter drop reason
Date: Mon, 7 Aug 2023 18:45:45 +0200 [thread overview]
Message-ID: <20230807164551.553365-5-amorenoz@redhat.com> (raw)
In-Reply-To: <20230807164551.553365-1-amorenoz@redhat.com>
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@redhat.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 285b1243b94f..e204c7eee8ef 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 be51ff5039fb..1ba866c408e5 100644
--- a/net/openvswitch/drop.h
+++ b/net/openvswitch/drop.h
@@ -12,6 +12,7 @@
R(OVS_DROP_ACTION_ERROR) \
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
next prev parent reply other threads:[~2023-08-07 16:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 16:45 [net-next v3 0/7] openvswitch: add drop reasons Adrian Moreno
2023-08-07 16:45 ` [net-next v3 1/7] net: openvswitch: add datapath flow drop reason Adrian Moreno
2023-08-08 14:36 ` Aaron Conole
2023-08-08 18:02 ` Ilya Maximets
2023-08-09 6:47 ` Adrian Moreno
2023-08-07 16:45 ` [net-next v3 2/7] net: openvswitch: add action error " Adrian Moreno
2023-08-08 14:37 ` Aaron Conole
2023-08-07 16:45 ` [net-next v3 3/7] net: openvswitch: add explicit drop action Adrian Moreno
2023-08-08 14:53 ` Aaron Conole
2023-08-09 6:49 ` Adrian Moreno
2023-08-08 18:10 ` Ilya Maximets
2023-08-09 7:03 ` Adrian Moreno
2023-08-07 16:45 ` Adrian Moreno [this message]
2023-08-08 14:53 ` [net-next v3 4/7] net: openvswitch: add meter drop reason Aaron Conole
2023-08-07 16:45 ` [net-next v3 5/7] net: openvswitch: add misc error drop reasons Adrian Moreno
2023-08-08 14:56 ` Aaron Conole
2023-08-07 16:45 ` [net-next v3 6/7] selftests: openvswitch: add drop reason testcase Adrian Moreno
2023-08-08 15:04 ` Aaron Conole
2023-08-07 16:45 ` [net-next v3 7/7] selftests: openvswitch: add explicit drop testcase Adrian Moreno
2023-08-08 15:02 ` Aaron Conole
2023-08-09 7:02 ` Adrian Moreno
2023-08-09 15:18 ` Aaron Conole
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230807164551.553365-5-amorenoz@redhat.com \
--to=amorenoz@redhat.com \
--cc=aconole@redhat.com \
--cc=dev@openvswitch.org \
--cc=eric@garver.life \
--cc=i.maximets@ovn.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).