On Wed, Nov 18, 2020 at 12:04 AM wenxu <we...@ucloud.cn> wrote:
>
>
> 在 2020/11/18 15:00, Cong Wang 写道:
> > On Tue, Nov 17, 2020 at 5:37 PM <we...@ucloud.cn> wrote:
> >> From: wenxu <we...@ucloud.cn>
> >>
> >> 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 over the mtu
> >> of target device.
> >>
> >> This patch add support for a xmit hook to mirred, that gets executed before
> >> xmiting the packet. Then, when act_ct gets loaded, it configs that hook.
> >> The frag xmit hook maybe reused by other modules.
> >>
> >> Signed-off-by: wenxu <we...@ucloud.cn>
> >> ---
> >> v2: make act_frag just buildin for tc core but not a module
> >>     return an error code from tcf_fragment
> >>     depends on INET for ip_do_fragment
> > Much better now.
> >
> >
> >> +#ifdef CONFIG_INET
> >> +               ret = ip_do_fragment(net, skb->sk, skb, sch_frag_xmit);
> >> +#endif
> >
> > Doesn't the whole sch_frag need to be put under CONFIG_INET?
> > I don't think fragmentation could work without CONFIG_INET.
>
> I have already test with this. Without CONFIG_INET it is work.
>
> And only the ip_do_fragment depends on CONFIG_INET

Passing the compiler test is not what I meant. The whole ipv4/ directory
is under CONFIG_INET:

 obj-$(CONFIG_INET)              += ipv4/

Without it, what code does the fragmentation? I suggest you to just put
the sch_frag in this way:

obj-$(CONFIG_INET)              += sch_frag.o

(and remove the #ifdef CONFIG_INET within it.)

Thanks.

Reply via email to