[Cake] cake and nat in openwrt... on by default?

Kevin Darbyshire-Bryant kevin at darbyshire-bryant.me.uk
Sun Apr 5 03:57:11 EDT 2020



> On 5 Apr 2020, at 05:17, Dave Taht <dave.taht at gmail.com> wrote:
> 
> I see cake is moving to the upstreamed version. As best as I recall,
> nat mode was on by default in the openwrt code, but not the upstreamed
> code.
> 
> People not setting nat mode on would explain a few things i've seen
> 'round the intertubes this week.

From sch_cake repo and hence ‘out of tree’ cake

        if (tb[TCA_CAKE_NAT]) {
#if IS_REACHABLE(CONFIG_NF_CONNTRACK)
                q->flow_mode &= ~CAKE_FLOW_NAT_FLAG;
                q->flow_mode |= CAKE_FLOW_NAT_FLAG *
                        !!nla_get_u32(tb[TCA_CAKE_NAT]);
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
                NL_SET_ERR_MSG_ATTR(extack, tb[TCA_CAKE_NAT],
                                    "No conntrack support in kernel");
#endif
                return -EOPNOTSUPP;
#endif
        }


From kernel 5.4 as found in openwrt build dir

        if (tb[TCA_CAKE_NAT]) {
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
                q->flow_mode &= ~CAKE_FLOW_NAT_FLAG;
                q->flow_mode |= CAKE_FLOW_NAT_FLAG *
                        !!nla_get_u32(tb[TCA_CAKE_NAT]);
#else
                NL_SET_ERR_MSG_ATTR(extack, tb[TCA_CAKE_NAT],
                                    "No conntrack support in kernel");
                return -EOPNOTSUPP;
#endif



cake_init(…) in both does:

q->flow_mode  = CAKE_FLOW_TRIPLE;


So openwrt doesn’t, by default, enable NAT mode in cake.

I honestly don’t think that there are enough instances of cake out there, let alone instances of cake from openwrt, let alone instances of cake from master which switched to upstream cake 2-3 days ago, to make any sort of difference anyway.

> 
> --
> Make Music, Not War
> 
> Dave Täht
> CTO, TekLibre, LLC
> http://www.teklibre.com
> Tel: 1-831-435-0729
> _______________________________________________
> Cake mailing list
> Cake at lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cake


Cheers,

Kevin D-B

gpg: 012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://lists.bufferbloat.net/pipermail/cake/attachments/20200405/8845bf6d/attachment-0001.sig>


More information about the Cake mailing list