From: wenxu <redacted>
Reject the unknown ct_state flags of cls flower rules. This also make
the userspace like ovs to probe the ct_state flags support in the
kernel.
Signed-off-by: wenxu <redacted>
---
include/uapi/linux/pkt_cls.h | 9 +++++++++
net/sched/cls_flower.c | 4 ++++
2 files changed, 13 insertions(+)
@@ -591,8 +591,17 @@ 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_MAX,};+#define TCA_FLOWER_KEY_CT_FLAGS_MAX \+((__TCA_FLOWER_KEY_CT_FLAGS_MAX-1)<<1)+#define TCA_FLOWER_KEY_CT_FLAGS_MASK \+(TCA_FLOWER_KEY_CT_FLAGS_MAX-1)+#define TCA_FLOWER_KEY_CT_FLAGS_UNKNOWN(v) \+((v)&(~TCA_FLOWER_KEY_CT_FLAGS_MASK))+enum{TCA_FLOWER_KEY_ENC_OPTS_UNSPEC,TCA_FLOWER_KEY_ENC_OPTS_GENEVE,/* Nested
Hi,
On Thu, Feb 04, 2021 at 12:17:24PM +0800, wenxu@ucloud.cn wrote:
From: wenxu <redacted>
Reject the unknown ct_state flags of cls flower rules. This also make
the userspace like ovs to probe the ct_state flags support in the
kernel.
That's a good start but it could also do some combination sanity
checks, like ovs does in validate_ct_state(). For example, it does:
if (state && !(state & CS_TRACKED)) {
ds_put_format(ds, "%s: invalid connection state: "
"If \"trk\" is unset, no other flags are set\n",
...
Hi,
On Thu, Feb 04, 2021 at 12:17:24PM +0800, wenxu@ucloud.cn wrote:
quoted
From: wenxu <redacted>
Reject the unknown ct_state flags of cls flower rules. This also make
the userspace like ovs to probe the ct_state flags support in the
kernel.
That's a good start but it could also do some combination sanity
checks, like ovs does in validate_ct_state(). For example, it does:
if (state && !(state & CS_TRACKED)) {
ds_put_format(ds, "%s: invalid connection state: "
"If \"trk\" is unset, no other flags are set\n",
So this sanity checks maybe also need to be added in the ovs kernel modules?
The kernel datapath can work without ovs-vswitchd.
On Thu, Feb 04, 2021 at 11:50:53PM +0800, wenxu wrote:
在 2021/2/4 21:38, Marcelo Ricardo Leitner 写道:
quoted
Hi,
On Thu, Feb 04, 2021 at 12:17:24PM +0800, wenxu@ucloud.cn wrote:
quoted
From: wenxu <redacted>
Reject the unknown ct_state flags of cls flower rules. This also make
the userspace like ovs to probe the ct_state flags support in the
kernel.
That's a good start but it could also do some combination sanity
checks, like ovs does in validate_ct_state(). For example, it does:
if (state && !(state & CS_TRACKED)) {
ds_put_format(ds, "%s: invalid connection state: "
"If \"trk\" is unset, no other flags are set\n",
So this sanity checks maybe also need to be added in the ovs kernel modules?
The kernel datapath can work without ovs-vswitchd.