netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: wenxu <wenxu@ucloud.cn>
To: Eric Dumazet <eric.dumazet@gmail.com>, paulb@mellanox.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] net/sched: act_mirred: fix fragment the packet after defrag in act_ct
Date: Wed, 1 Jul 2020 10:27:52 +0800	[thread overview]
Message-ID: <09f485dd-79ab-9978-e28a-703c9af318c2@ucloud.cn> (raw)
In-Reply-To: <b01df9df-4b46-ea62-9591-66c720a2a4ab@gmail.com>


On 6/30/2020 11:57 PM, Eric Dumazet wrote:
>
> On 6/29/20 7:54 PM, wenxu@ucloud.cn wrote:
>> From: wenxu <wenxu@ucloud.cn>
>>
>> The fragment packets do defrag in act_ct module. The reassembled packet
>> over the mtu in the act_mirred. This big packet should be fragmented
>> to send out.
>>
>> Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct")
>> Signed-off-by: wenxu <wenxu@ucloud.cn>
>> ---
>> This patch is based on
>> http://patchwork.ozlabs.org/project/netdev/patch/1593422178-26949-1-git-send-email-wenxu@ucloud.cn/
>>
>>  include/net/sch_generic.h |   6 +-
>>  net/sched/act_ct.c        |   7 ++-
>>  net/sched/act_mirred.c    | 157 ++++++++++++++++++++++++++++++++++++++++++++--
>>  3 files changed, 158 insertions(+), 12 deletions(-)
>>
>> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
>> index c510b03..3597244 100644
>> --- a/include/net/sch_generic.h
>> +++ b/include/net/sch_generic.h
>> @@ -384,6 +384,7 @@ struct qdisc_skb_cb {
>>  	};
>>  #define QDISC_CB_PRIV_LEN 20
>>  	unsigned char		data[QDISC_CB_PRIV_LEN];
>> +	u16			mru;
>>  };
>>
>
> Wow, this change is potentially a big problem.
>
> Explain why act_ct/act_mirred need to pollute qdisc_skb_cb 

Hi Eric,

In the act_ct the fragment packets will defrag to a big packet and do conntrack things.

But in the latter filter mirred action, the big packet normally send over the mtu of outgoing device.

In this case the packet should be fragment to send And the frag size should based on origin frag size

recored in act_ct.  In the act_ct the frag size should retore in qdisc_skb_cb and act_mirred get it to do fragment.


So there are any other good method?


BR

wenxu 

>
>
>

  reply	other threads:[~2020-07-01  2:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  2:54 [PATCH net] net/sched: act_mirred: fix fragment the packet after defrag in act_ct wenxu
2020-06-30 15:57 ` Eric Dumazet
2020-07-01  2:27   ` wenxu [this message]
2020-06-30 19:02 ` Cong Wang
2020-07-01  2:33   ` wenxu
2020-07-01  5:52     ` Cong Wang
2020-07-01  6:02       ` wenxu
2020-07-01  6:12         ` Cong Wang
2020-07-01  6:21           ` wenxu
2020-07-01  8:17             ` wenxu
2020-07-01 17:33               ` Cong Wang
2020-07-02  9:36                 ` wenxu
2020-07-02 17:32                   ` Marcelo Ricardo Leitner
2020-07-02 21:39                     ` Cong Wang
2020-07-03  0:47                       ` Marcelo Ricardo Leitner
2020-07-03 10:19                         ` wenxu
2020-07-03 17:50                           ` Marcelo Ricardo Leitner
2020-07-05 14:31                             ` wenxu
2020-07-06  6:02                               ` Cong Wang
2020-07-06  5:59                         ` Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09f485dd-79ab-9978-e28a-703c9af318c2@ucloud.cn \
    --to=wenxu@ucloud.cn \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulb@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).