Skip to content

Commit

Permalink
compat: Add ct_state flags definitions
Browse files Browse the repository at this point in the history
Add TCA_FLOWER_KEY_CT_FLAGS_REPLY, and TCA_FLOWER_KEY_CT_FLAGS_INVALID.

Signed-off-by: Paul Blakey <paulb@nvidia.com>
Acked-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
Paul Blakey authored and ovsrobot committed Mar 3, 2021
1 parent cdaa7e0 commit 3972fc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions acinclude.m4
Expand Up @@ -209,10 +209,10 @@ dnl Configure Linux tc compat.
AC_DEFUN([OVS_CHECK_LINUX_TC], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([#include <linux/pkt_cls.h>], [
int x = TCA_ACT_FLAGS;
int x = TCA_FLOWER_KEY_CT_FLAGS_REPLY;
])],
[AC_DEFINE([HAVE_TCA_ACT_FLAGS], [1],
[Define to 1 if TCA_ACT_FLAGS is available.])])
[AC_DEFINE([HAVE_TCA_FLOWER_KEY_CT_FLAGS_REPLY], [1],
[Define to 1 if TCA_FLOWER_KEY_CT_FLAGS_REPLY is available.])])
AC_CHECK_MEMBERS([struct tcf_t.firstuse], [], [], [#include <linux/pkt_cls.h>])
Expand Down
5 changes: 4 additions & 1 deletion include/linux/pkt_cls.h
@@ -1,7 +1,7 @@
#ifndef __LINUX_PKT_CLS_WRAPPER_H
#define __LINUX_PKT_CLS_WRAPPER_H 1

#if defined(__KERNEL__) || defined(HAVE_TCA_ACT_FLAGS)
#if defined(__KERNEL__) || defined(HAVE_TCA_FLOWER_KEY_CT_FLAGS_REPLY)
#include_next <linux/pkt_cls.h>
#else

Expand Down Expand Up @@ -255,6 +255,9 @@ enum {
TCA_FLOWER_KEY_CT_FLAGS_ESTABLISHED = 1 << 1, /* Part of an existing connection. */
TCA_FLOWER_KEY_CT_FLAGS_RELATED = 1 << 2, /* Related to an established connection. */
TCA_FLOWER_KEY_CT_FLAGS_TRACKED = 1 << 3, /* Conntrack has occurred. */
TCA_FLOWER_KEY_CT_FLAGS_INVALID = 1 << 4, /* Conntrack is invalid. */
TCA_FLOWER_KEY_CT_FLAGS_REPLY = 1 << 5, /* Packet is in the reply direction. */
__TCA_FLOWER_KEY_CT_FLAGS_MAX,
};

enum {
Expand Down

0 comments on commit 3972fc4

Please sign in to comment.