[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230809153833.2363265-3-amorenoz@redhat.com>
Date: Wed, 9 Aug 2023 17:38:22 +0200
From: Adrian Moreno <amorenoz@...hat.com>
To: netdev@...r.kernel.org
Cc: Adrian Moreno <amorenoz@...hat.com>,
aconole@...hat.com,
i.maximets@....org,
eric@...ver.life,
dev@...nvswitch.org
Subject: [net-next v4 2/7] net: openvswitch: add action error drop reason
Add a drop reason for packets that are dropped because an action
returns a non-zero error code.
Acked-by: Aaron Conole <aconole@...hat.com>
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 1234e95a9ce8..b4859629bfc6 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -1488,7 +1488,7 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
}
if (unlikely(err)) {
- kfree_skb(skb);
+ kfree_skb_reason(skb, OVS_DROP_ACTION_ERROR);
return err;
}
}
diff --git a/net/openvswitch/drop.h b/net/openvswitch/drop.h
index ffdb8ab045bd..513c7f941ffc 100644
--- a/net/openvswitch/drop.h
+++ b/net/openvswitch/drop.h
@@ -9,6 +9,7 @@
#define OVS_DROP_REASONS(R) \
R(OVS_DROP_LAST_ACTION) \
+ R(OVS_DROP_ACTION_ERROR) \
/* deliberate comment for trailing \ */
enum ovs_drop_reason {
--
2.41.0
Powered by blists - more mailing lists