mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 06:39:05 +00:00

This patch is to add helper support in act_ct for OVS actions=ct(alg=xxx)
offloading, which is corresponding to Commit cae3a26275
("openvswitch:
Allow attaching helpers to ct action") in OVS kernel part.
The difference is when adding TC actions family and proto cannot be got
from the filter/match, other than helper name in tb[TCA_CT_HELPER_NAME],
we also need to send the family in tb[TCA_CT_HELPER_FAMILY] and the
proto in tb[TCA_CT_HELPER_PROTO] to kernel.
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
45 lines
1.0 KiB
C
45 lines
1.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef __UAPI_TC_CT_H
|
|
#define __UAPI_TC_CT_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/pkt_cls.h>
|
|
|
|
enum {
|
|
TCA_CT_UNSPEC,
|
|
TCA_CT_PARMS,
|
|
TCA_CT_TM,
|
|
TCA_CT_ACTION, /* u16 */
|
|
TCA_CT_ZONE, /* u16 */
|
|
TCA_CT_MARK, /* u32 */
|
|
TCA_CT_MARK_MASK, /* u32 */
|
|
TCA_CT_LABELS, /* u128 */
|
|
TCA_CT_LABELS_MASK, /* u128 */
|
|
TCA_CT_NAT_IPV4_MIN, /* be32 */
|
|
TCA_CT_NAT_IPV4_MAX, /* be32 */
|
|
TCA_CT_NAT_IPV6_MIN, /* struct in6_addr */
|
|
TCA_CT_NAT_IPV6_MAX, /* struct in6_addr */
|
|
TCA_CT_NAT_PORT_MIN, /* be16 */
|
|
TCA_CT_NAT_PORT_MAX, /* be16 */
|
|
TCA_CT_PAD,
|
|
TCA_CT_HELPER_NAME, /* string */
|
|
TCA_CT_HELPER_FAMILY, /* u8 */
|
|
TCA_CT_HELPER_PROTO, /* u8 */
|
|
__TCA_CT_MAX
|
|
};
|
|
|
|
#define TCA_CT_MAX (__TCA_CT_MAX - 1)
|
|
|
|
#define TCA_CT_ACT_COMMIT (1 << 0)
|
|
#define TCA_CT_ACT_FORCE (1 << 1)
|
|
#define TCA_CT_ACT_CLEAR (1 << 2)
|
|
#define TCA_CT_ACT_NAT (1 << 3)
|
|
#define TCA_CT_ACT_NAT_SRC (1 << 4)
|
|
#define TCA_CT_ACT_NAT_DST (1 << 5)
|
|
|
|
struct tc_ct {
|
|
tc_gen;
|
|
};
|
|
|
|
#endif /* __UAPI_TC_CT_H */
|