mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
dpif: Add support for OVS_ACTION_ATTR_CT_CLEAR
This supports using the ct_clear action in the kernel datapath. To preserve compatibility with current ct_clear behavior on old kernels, we only pass this action down to the datapath if a probe reveals the datapath actually supports it. Signed-off-by: Eric Garver <e@erig.me> Acked-by: William Tu <u9012063@gmail.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
committed by
Justin Pettit
parent
70bbaa4649
commit
1fe178d251
@@ -35,6 +35,7 @@
|
||||
#include "unaligned.h"
|
||||
#include "util.h"
|
||||
#include "csum.h"
|
||||
#include "conntrack.h"
|
||||
|
||||
/* Masked copy of an ethernet address. 'src' is already properly masked. */
|
||||
static void
|
||||
@@ -674,6 +675,7 @@ requires_datapath_assistance(const struct nlattr *a)
|
||||
case OVS_ACTION_ATTR_CLONE:
|
||||
case OVS_ACTION_ATTR_PUSH_NSH:
|
||||
case OVS_ACTION_ATTR_POP_NSH:
|
||||
case OVS_ACTION_ATTR_CT_CLEAR:
|
||||
return false;
|
||||
|
||||
case OVS_ACTION_ATTR_UNSPEC:
|
||||
@@ -874,6 +876,11 @@ odp_execute_actions(void *dp, struct dp_packet_batch *batch, bool steal,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OVS_ACTION_ATTR_CT_CLEAR:
|
||||
DP_PACKET_BATCH_FOR_EACH (packet, batch) {
|
||||
conntrack_clear(packet);
|
||||
}
|
||||
break;
|
||||
|
||||
case OVS_ACTION_ATTR_OUTPUT:
|
||||
case OVS_ACTION_ATTR_TUNNEL_PUSH:
|
||||
|
Reference in New Issue
Block a user