[PATCH] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta

2021-04-08 Thread wenxu
From: wenxu In the nft_offload there is the mate flow_dissector with no ingress_ifindex but with ingress_iftype that only be used in the software. So if the mask of ingress_ifindex in meta is 0, this meta check should be bypass. Fixes: 6d65bc64e232 ("net/mlx5e: Add mlx5e_flower_parse

[PATCH net] net/mlx5e: Fix ipsec/tls netdev features build

2021-03-23 Thread wenxu
From: wenxu Ipsec and tls netdev features build should be done after the mlx5e_init_ipesc/tls which finishs the init for the ipsec/tls in the driver. Fixes: 3ef14e463f6e ("net/mlx5e: Separate between netdev objects and mlx5e profiles initialization") Signed-off-by: wenxu --- d

Re: [PATCH net] net/sched: act_ct: clear post_ct if doing ct_clear

2021-03-23 Thread wenxu
Reviewed-by: wenxu BR wenxu On 3/23/2021 2:13 AM, Marcelo Ricardo Leitner wrote: > From: Marcelo Ricardo Leitner > > Invalid detection works with two distinct moments: act_ct tries to find > a conntrack entry and set post_ct true, indicating that that was > attempted.

[PATCH net v2] net/sched: cls_flower: fix only mask bit check in the validate_ct_state

2021-03-16 Thread wenxu
From: wenxu The ct_state validate should not only check the mask bit and also check mask_bit & key_bit.. For the +new+est case example, The 'new' and 'est' bits should be set in both state_mask and state flags. Or the -new-est case also will be reject by kernel. When Op

[PATCH net] net/sched: act_api: fix miss set post_ct for ovs after do conntrack in act_ct

2021-03-16 Thread wenxu
From: wenxu When openvswitch conntrack offload with act_ct action. The first rule do conntrack in the act_ct in tc subsystem. And miss the next rule in the tc and fallback to the ovs datapath but miss set post_ct flag which will lead the ct_state_key with -trk flag. Fixes: 7baf2429a1a9 (&quo

[PATCH net] net/sched: cls_flower: fix only mask bit check in the validate_ct_state

2021-03-16 Thread wenxu
From: wenxu The ct_state validate should not only check the mask bit and also check the state bit. For the +new+est case example, The 'new' and 'est' bits should be set in both state_mask and state flags. Or the -new-est case also will be reject by kernel. Fixes: 1bcc

Re: [ovs-dev] tc-conntrack: inconsistent behaviour with icmpv6

2021-03-16 Thread wenxu
viour, I have not figured > out what to do about it yet. > > On 2021/03/13 00:06, Marcelo Leitner wrote: >> Hi there, >> >> On Wed, Mar 10, 2021 at 12:06:52PM +0100, Ilya Maximets wrote: >>> Hi, Louis.  Thanks for your report! >>> >>> Marcelo, Paul

[PATCH net-next v2] net/sched: cls_flower: validate ct_state for invalid and reply flags

2021-02-22 Thread wenxu
From: wenxu Add invalid and reply flags validate in the fl_validate_ct_state. This makes the checking complete if compared to ovs' validate_ct_state(). Signed-off-by: wenxu --- net/sched/cls_flower.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/net/sched/cls_flowe

[PATCH net-next] net/sched: cls_flower: validate ct_state for invalid and reply flags

2021-02-21 Thread wenxu
From: wenxu Add invalid and reply flags validate in the fl_validate_ct_state. Signed-off-by: wenxu --- net/sched/cls_flower.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 2409e52..18430db 100644 --- a/net/sched

[PATCH net v5] net/sched: cls_flower: Reject invalid ct_state flags rules

2021-02-08 Thread wenxu
From: wenxu Reject the unsupported and invalid ct_state flags of cls flower rules. Fixes: e0ace68af2ac ("net/sched: cls_flower: Add matching on conntrack info") Signed-off-by: wenxu --- include/uapi/linux/pkt_cls.h | 2 ++ net/sched/cls_flower.c

[PATCH net v4] net/sched: cls_flower: Reject invalid ct_state flags rules

2021-02-06 Thread wenxu
From: wenxu Reject the unsupported and invalid ct_state flags of cls flower rules. Fixes: e0ace68af2ac ("net/sched: cls_flower: Add matching on conntrack info") Signed-off-by: wenxu --- net/sched/cls_flower.c | 36 +++- 1 file changed, 35 insert

[PATCH net v3] net/sched: cls_flower: Reject invalid ct_state flags rules

2021-02-04 Thread wenxu
From: wenxu Reject the unsupported and invalid ct_state flags of cls flower rules. Fixes: e0ace68af2ac ("net/sched: cls_flower: Add matching on conntrack info") Signed-off-by: wenxu --- v3: using NLA_POLICY_MASK and NL_SET_ERR_MSG_ATTR include/uapi/linux/pkt_cls.h | 7 +++

Re: [PATCH net] net/sched: cls_flower: Return invalid for unknown ct_state flags rules

2021-02-04 Thread wenxu
在 2021/2/4 21:38, Marcelo Ricardo Leitner 写道: > Hi, > > On Thu, Feb 04, 2021 at 12:17:24PM +0800, we...@ucloud.cn wrote: >> From: wenxu >> >> Reject the unknown ct_state flags of cls flower rules. This also make >> the userspace like ovs to probe the ct_sta

[PATCH net v2] net/sched: cls_flower: Reject invalid ct_state flags rules

2021-02-04 Thread wenxu
From: wenxu Reject the unsupported and invalid ct_state flags of cls flower rules. Fixes: e0ace68af2ac ("net/sched: cls_flower: Add matching on conntrack info") Signed-off-by: wenxu --- include/uapi/linux/pkt_cls.h | 7 +++ net/sched/cls_flower.c

[PATCH net] net/sched: cls_flower: Return invalid for unknown ct_state flags rules

2021-02-03 Thread wenxu
From: wenxu 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 --- include/uapi/linux/pkt_cls.h | 9 + net/sched/cls_flower.c | 4 2 files changed, 13

Re: [PATCH v2 net-next ] net/sched: cls_flower add CT_FLAGS_INVALID flag support

2021-01-20 Thread wenxu
On 1/21/2021 9:09 AM, Cong Wang wrote: > On Wed, Jan 20, 2021 at 3:40 PM Marcelo Ricardo Leitner > wrote: >> On Wed, Jan 20, 2021 at 02:18:41PM -0800, Cong Wang wrote: >>> On Tue, Jan 19, 2021 at 12:33 AM wrote: diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index

[PATCH iproute2-next v2] tc: flower: add tc conntrack inv ct_state support

2021-01-19 Thread wenxu
From: wenxu Matches on conntrack inv ct_state. Signed-off-by: wenxu --- v2: change the description include/uapi/linux/pkt_cls.h | 1 + man/man8/tc-flower.8 | 2 ++ tc/f_flower.c| 1 + 3 files changed, 4 insertions(+) diff --git a/include/uapi/linux/pkt_cls.h b

[PATCH iproute2-next] tc: flower: add tc conntrack inv ct_state support

2021-01-19 Thread wenxu
From: wenxu Matches on conntrack inv ct_state. Signed-off-by: wenxu --- include/uapi/linux/pkt_cls.h | 1 + man/man8/tc-flower.8 | 2 ++ tc/f_flower.c| 1 + 3 files changed, 4 insertions(+) diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h index

[PATCH v2 net-next ] net/sched: cls_flower add CT_FLAGS_INVALID flag support

2021-01-19 Thread wenxu
From: wenxu This patch add the TCA_FLOWER_KEY_CT_FLAGS_INVALID flag to match the ct_state with invalid for conntrack. Signed-off-by: wenxu --- v2: initialize post_ct right on the declaration include/linux/skbuff.h | 4 ++-- include/net/sch_generic.h| 1 + include/uapi/linux

Re: [PATCH net-next] net/sched: cls_flower add CT_FLAGS_INVALID flag support

2021-01-18 Thread wenxu
On 1/19/2021 2:21 AM, Marcelo Ricardo Leitner wrote: > On Mon, Jan 18, 2021 at 01:18:47PM +0800, we...@ucloud.cn wrote: > ... >> --- a/net/sched/cls_flower.c >> +++ b/net/sched/cls_flower.c >> @@ -305,6 +305,9 @@ static int fl_classify(struct sk_buff *skb, const struct >> tcf_proto *tp, >>

[PATCH net-next] net/sched: cls_flower add CT_FLAGS_INVALID flag support

2021-01-17 Thread wenxu
From: wenxu This patch add the TCA_FLOWER_KEY_CT_FLAGS_INVALID flag to match the ct_state with invalid for conntrack. Signed-off-by: wenxu --- include/linux/skbuff.h | 4 ++-- include/net/sch_generic.h| 1 + include/uapi/linux/pkt_cls.h | 1 + net/core/dev.c | 2

Ktls RX offload in CX6 of mellanox

2021-01-14 Thread wenxu
-hw-rx-offload: off [fixed] But I found the RX offload is not supported currently? I found the mlx5_accel_is_ktls_rx(mdev) will return false and it leads this feature not supported. So it means the current FW also does not support RX offload? BR wenxu

Re: [PATCH net-next] net/sched: act_ct: enable stats for HW offloaded entries

2020-11-26 Thread wenxu
; - nf_ct_acct_update(ct, dir, skb->len); > + if (nf_ft->flags & NF_FLOWTABLE_COUNTER) > + nf_ct_acct_update(ct, dir, skb->len); > > return true; > } Acked-by: wenxu BR wenxu

[PATCH v4 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-24 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v4 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-24 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v4: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v4 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-24 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v4: no change net/core/dev.c | 2 ++ 1 file

[PATCH v4 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-24 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

Re: [PATCH v3 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-24 Thread wenxu
在 2020/11/25 3:24, Jakub Kicinski 写道: > On Fri, 20 Nov 2020 07:38:36 +0800 we...@ucloud.cn wrote: >> +int tcf_dev_queue_xmit(struct sk_buff *skb, int (*xmit)(struct sk_buff >> *skb)) >> +{ >> +xmit_hook_func *xmit_hook; >> + >> +xmit_hook = rcu_dereference(tcf_xmit_hook); >> +if (xmi

[PATCH v3 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-19 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v3 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-19 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v3 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-19 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v3: no change net/core/dev.c | 2 ++ 1 file

[PATCH v3 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-19 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v3: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

Re: [PATCH v2 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-18 Thread wenxu
在 2020/11/18 15:00, Cong Wang 写道: > On Tue, Nov 17, 2020 at 5:37 PM wrote: >> From: wenxu >> >> Currently kernel tc subsystem can do conntrack in cat_ct. But when several >> fragment packets go through the act_ct, function tcf_ct_handle_fragments >> will def

[PATCH v2 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-17 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v2 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-17 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v2: no change net/core/dev.c | 2 ++ 1 file

[PATCH v2 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-17 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v2: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v2 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-17 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-17 Thread wenxu
在 2020/11/18 6:43, Cong Wang 写道: > On Mon, Nov 16, 2020 at 8:06 PM wenxu wrote: >> >> On 11/17/2020 3:01 AM, Cong Wang wrote: >>> On Sun, Nov 15, 2020 at 5:06 AM wenxu wrote: >>>> 在 2020/11/15 2:05, Cong Wang 写道: >>>>> On Wed, Nov 11, 20

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-16 Thread wenxu
On 11/17/2020 3:01 AM, Cong Wang wrote: > On Sun, Nov 15, 2020 at 5:06 AM wenxu wrote: >> >> 在 2020/11/15 2:05, Cong Wang 写道: >>> On Wed, Nov 11, 2020 at 9:44 PM wrote: >>>> diff --git a/net/sched/act_frag.c b/net/sched/act_frag.c >>>>

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-15 Thread wenxu
> On 2020-11-15 8:05 a.m., wenxu wrote: >> >> 在 2020/11/15 2:05, Cong Wang 写道: >>> On Wed, Nov 11, 2020 at 9:44 PM wrote: >>>> diff --git a/net/sched/act_frag.c b/net/sched/act_frag.c >>>> new file mode 100644 >>>> index 000..3a7ab92 >>

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-15 Thread wenxu
在 2020/11/15 2:05, Cong Wang 写道: > On Wed, Nov 11, 2020 at 9:44 PM wrote: >> diff --git a/net/sched/act_frag.c b/net/sched/act_frag.c >> new file mode 100644 >> index 000..3a7ab92 >> --- /dev/null >> +++ b/net/sched/act_frag.c > It is kinda confusing to see this is a module. It provides some

[PATCH v11 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-12 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v11: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v11 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-12 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v11 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-12 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v11 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-12 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v11: no change net/core/dev.c | 2 ++ 1 file

[PATCH v10 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-11 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v10: no change net/core/dev.c | 2 ++ 1 file

[PATCH v10 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-11 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v10 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-11 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v10: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-11 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v9 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-11 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v9: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v9 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-11 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v9: no change net/core/dev.c | 2 ++ 1 file

[PATCH v9 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-11 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v9 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-11 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v8 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-10 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v8: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v8 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-10 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v5: new patch v8: no change net/core/dev.c | 2

[PATCH v8 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-10 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v8 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-10 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v7 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-10 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v7 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-10 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v5: new patch v6: no change vr76: no change net/

[PATCH v7 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-10 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v7: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v7 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-10 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v6 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v6 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-09 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v6 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-09 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v5: new patch v6: no change net/core/dev.c | 2

[PATCH v6 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-09 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v6: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

Re: [PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread wenxu
在 2020/11/9 21:24, Vlad Buslov 写道: > On Sun 08 Nov 2020 at 01:30, we...@ucloud.cn wrote: >> From: wenxu >> >> Currently kernel tc subsystem can do conntrack in act_ct. But when several >> fragment packets go through the act_ct, function tcf_ct_handle_fragments >

[PATCH v5 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-07 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v5 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-07 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v5: new patch net/core/dev.c | 2 ++ 1 file

[PATCH v5 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-07 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v5: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-07 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

Re: [PATCH v4 net-next 2/2] net/sched: act_frag: add implict packet fragment support.

2020-11-07 Thread wenxu
7 > [ 558.694101] skb linear: 00f0: 38 39 30 31 32 33 34 35 36 37 38 39 30 > 31 32 33 > [ 558.695523] skb linear: 0100: 34 35 36 37 38 39 30 31 32 33 34 35 36 > 37 38 39 Hi Vlad, I find the packet in the warning is not a defrag one. It is a gso packet. The tcf_frag_xmit_hook should first check the mru. I think the problem is qdisc_skb_cb(skb)->mru is not init in the sch_handle_ingress. BR wenxu >

[PATCH v4 net-next 2/2] net/sched: act_frag: add implict packet fragment support.

2020-11-06 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH v4 net-next 1/2] net/sched: act_mirred: refactor the handle of xmit

2020-11-06 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v4: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

Re: [PATCH v2 net-next 2/2] net/sched: act_frag: add implict packet fragment support.

2020-11-05 Thread wenxu
On 11/5/2020 4:14 PM, Marcelo Ricardo Leitner wrote: > On Thu, Nov 05, 2020 at 03:52:27PM +0800, we...@ucloud.cn wrote: > > We cross-posted :) > I think my comments on the v1 still applies, btw. > > ... >> This patch add support for a xmit hook to mirred, that gets executed before >> xmiting the

[PATCH v3 net-next 1/2] net/sched: act_mirred: refactor the handle of xmit

2020-11-05 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v3: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v3 net-next 2/2] net/sched: act_frag: add implict packet fragment support.

2020-11-05 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

Re: [PATCH net-next 2/2] net/sched: act_frag: add implict packet fragment support.

2020-11-05 Thread wenxu
On 11/5/2020 4:04 PM, Marcelo Ricardo Leitner wrote: > On Wed, Nov 04, 2020 at 04:56:32PM +0800, we...@ucloud.cn wrote: > > > >> + >> static void tcf_action_goto_chain_exec(const struct tc_action *a, >> struct tcf_result *res) >> { >> diff --git a/net/sched/a

[PATCH v2 net-next 1/2] net/sched: act_mirred: refactor the handle of xmit

2020-11-05 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v2: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net

[PATCH v2 net-next 2/2] net/sched: act_frag: add implict packet fragment support.

2020-11-05 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH net-next 2/2] net/sched: act_frag: add implict packet fragment support.

2020-11-04 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet

[PATCH net-next 1/2] net/sched: act_mirred: refactor the handle of xmit

2020-11-04 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index

Re: [resend] Solution for the problem conntrack in tc subsystem

2020-11-01 Thread wenxu
On 10/30/2020 6:59 AM, Marcelo Ricardo Leitner wrote: > Cc'ing Cong, Paul, Oz and Davide. > > On Thu, Oct 29, 2020 at 10:22:04AM +0800, wenxu wrote: >> Only do gso for the reassembly big packet is also can't fix all the >> case such for icmp packet. > Good

Re: mlx5_vdpa problem

2020-10-30 Thread wenxu
Cohen wrote: > On Thu, Oct 22, 2020 at 06:40:56PM +0800, wenxu wrote: > > Please make sure your firmware is updated. > > https://www.mellanox.com/support/firmware/connectx6dx > >> Hi mellanox team, >> >> >> I test the mlx5 vdpa  in linux-5.9 and meet severa

[PATCH net v2] ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags

2020-10-29 Thread wenxu
From: wenxu The tunnel dvice such as vxlan, bareudp and geneve in the lwt mode set the outer df only based TUNNEL_DONT_FRAGMENT. And this is also the some behavior for gre device before switching to use ip_md_tunnel_xmit as the following patch. 962924f ip_gre: Refactor collect metatdata mode

[resend] Solution for the problem conntrack in tc subsystem

2020-10-28 Thread wenxu
So there are some proper solution for this problem. In the Internet we can't avoid the fragment packets. BR wenxu

Re: [PATCH net] ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags

2020-10-28 Thread wenxu
On 10/27/2020 11:55 PM, Jakub Kicinski wrote: > On Tue, 27 Oct 2020 08:51:07 -0600 David Ahern wrote: >>> Is this another incarnation of 4cb47a8644cc ("tunnels: PMTU discovery >>> support for directly bridged IP packets")? Sounds like non-UDP tunnels >>> need the same treatment to make PMTUD work

Re: [PATCH net] ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags

2020-10-26 Thread wenxu
On 10/24/2020 5:12 AM, Jakub Kicinski wrote: > On Wed, 21 Oct 2020 17:21:55 +0800 we...@ucloud.cn wrote: >> From: wenxu >> >> The TUNNEL_DONT_FRAGMENT flags specific the tunnel outer ip can do >> fragment or not in the md mode. Without the TUNNEL_DONT_FRAGMENT >&

mlx5_vdpa problem

2020-10-22 Thread wenxu
#x27;t  cut the big tso packet to several small tcp packet and send to virtio  net device? BR wenxu

Re: [PATCH net] vdpa/mlx5: Fix miss to set VIRTIO_NET_S_LINK_UP for virtio_net_config

2020-10-22 Thread wenxu
;t  cut the big tso packet to several small tcp packet and send to virtio  net device? BR wenxu

[PATCH net] ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags

2020-10-21 Thread wenxu
From: wenxu The TUNNEL_DONT_FRAGMENT flags specific the tunnel outer ip can do fragment or not in the md mode. Without the TUNNEL_DONT_FRAGMENT should always do fragment. So it should not care the frag_off in inner ip. Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel&quo

[PATCH net] vdpa/mlx5: Fix miss to set VIRTIO_NET_S_LINK_UP for virtio_net_config

2020-10-19 Thread wenxu
From: wenxu Qemu get virtio_net_config from the vdpa driver. So The vdpa driver should set the VIRTIO_NET_S_LINK_UP flag to virtio_net_config like vdpa_sim. Or the link of virtio net NIC in the virtual machine will never up. Fixes:1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported

[PATCH net-next v2 2/2] openvswitch: using ip6_fragment in ipv6_stub

2020-08-28 Thread wenxu
From: wenxu Using ipv6_stub->ipv6_fragment to avoid the netfilter dependency Signed-off-by: wenxu --- net/openvswitch/actions.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 2611657..fd34089 100644 --

[PATCH net-next v2 1/2] ipv6: add ipv6_fragment hook in ipv6_stub

2020-08-28 Thread wenxu
From: wenxu Add ipv6_fragment to ipv6_stub to avoid calling netfilter when access ip6_fragment. Signed-off-by: wenxu --- v2: add default one eafnosupport_ipv6_fragment include/net/ipv6_stubs.h | 3 +++ net/ipv6/addrconf_core.c | 8 net/ipv6/af_inet6.c | 1 + 3 files changed, 12

[PATCH net-next v2 0/2] Add ip6_fragment in ipv6_stub

2020-08-28 Thread wenxu
From: wenxu Add ip6_fragment in ipv6_stub and use it in openvswitch This version add default function eafnosupport_ipv6_fragment wenxu (2): ipv6: add ipv6_fragment hook in ipv6_stub openvswitch: using ip6_fragment in ipv6_stub include/net/ipv6_stubs.h | 3 +++ net/ipv6/addrconf_core.c

Re: [PATCH net-next 1/2] ipv6: add ipv6_fragment hook in ipv6_stub

2020-08-27 Thread wenxu
Thu, Aug 27, 2020 at 07:51:47AM -0700, David Miller wrote: >> From: we...@ucloud.cn >> Date: Thu, 27 Aug 2020 18:39:51 +0800 >> >>> From: wenxu >>> >>> Add ipv6_fragment to ipv6_stub to avoid calling netfilter when >>> access ip6_fragment. >&

[PATCH net-next 2/2] openvswitch: using ip6_fragment in ipv6_stub

2020-08-27 Thread wenxu
From: wenxu Using ipv6_stub->ipv6_fragment to avoid the netfilter dependency Signed-off-by: wenxu --- net/openvswitch/actions.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 2611657..1f3d406 100644 --

[PATCH net-next 1/2] ipv6: add ipv6_fragment hook in ipv6_stub

2020-08-27 Thread wenxu
From: wenxu Add ipv6_fragment to ipv6_stub to avoid calling netfilter when access ip6_fragment. Signed-off-by: wenxu --- include/net/ipv6_stubs.h | 3 +++ net/ipv6/af_inet6.c | 1 + 2 files changed, 4 insertions(+) diff --git a/include/net/ipv6_stubs.h b/include/net/ipv6_stubs.h index

[PATCH net-next 0/2] Put ip6_fragment in ipv6_stub

2020-08-27 Thread wenxu
From: wenxu Add ip6_fragment in ipv6_stub and use it in openvswitch wenxu (2): ipv6: add ipv6_fragment hook in ipv6_stub openvswitch: using ip6_fragment in ipv6_stub include/net/ipv6_stubs.h | 2 ++ net/ipv6/af_inet6.c | 1 + net/openvswitch/actions.c | 6 ++ 3 files changed, 5

Re: [PATCH net-next] net/sched: add act_ct_output support

2020-08-26 Thread wenxu
> +static DEFINE_PER_CPU(unsigned int, ct_output_rec_level); > Wenxu, first of all, thanks for doing this. > > Hopefully this helps to show how much duplicated code this means. > Later on, any bug that we find on mirrer, we also need to fix in > act_ct_output, which is not good. &g

[PATCH net-next] net/sched: add act_ct_output support

2020-08-24 Thread wenxu
From: wenxu The fragment packets do defrag in act_ct module. If the reassembled packet should send out to another net device. This over mtu big packet should be fragmented to send out. This patch add the act ct_output to archive this. Signed-off-by: wenxu --- include/net/tc_act/tc_ct_output.h

  1   2   3   4   5   >