* [Cake] cake and nat in openwrt... on by default? @ 2020-04-05 4:17 Dave Taht 2020-04-05 7:57 ` Kevin Darbyshire-Bryant 0 siblings, 1 reply; 6+ messages in thread From: Dave Taht @ 2020-04-05 4:17 UTC (permalink / raw) To: Cake List 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. -- Make Music, Not War Dave Täht CTO, TekLibre, LLC http://www.teklibre.com Tel: 1-831-435-0729 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Cake] cake and nat in openwrt... on by default? 2020-04-05 4:17 [Cake] cake and nat in openwrt... on by default? Dave Taht @ 2020-04-05 7:57 ` Kevin Darbyshire-Bryant 2020-04-05 15:22 ` Dave Taht 0 siblings, 1 reply; 6+ messages in thread From: Kevin Darbyshire-Bryant @ 2020-04-05 7:57 UTC (permalink / raw) To: Dave Taht; +Cc: Cake List [-- Attachment #1: Type: text/plain, Size: 2114 bytes --] > On 5 Apr 2020, at 05:17, Dave Taht <dave.taht@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@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/cake Cheers, Kevin D-B gpg: 012C ACB2 28C6 C53E 9775 9123 B3A2 389B 9DE2 334A [-- Attachment #2: Message signed with OpenPGP --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Cake] cake and nat in openwrt... on by default? 2020-04-05 7:57 ` Kevin Darbyshire-Bryant @ 2020-04-05 15:22 ` Dave Taht 2020-04-05 18:03 ` Dave Taht 2020-04-05 19:56 ` Kevin Darbyshire-Bryant 0 siblings, 2 replies; 6+ messages in thread From: Dave Taht @ 2020-04-05 15:22 UTC (permalink / raw) To: Kevin Darbyshire-Bryant; +Cc: Cake List On Sun, Apr 5, 2020 at 12:57 AM Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> wrote: > > > > > On 5 Apr 2020, at 05:17, Dave Taht <dave.taht@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. I'd still be willing to bet, then, that the majority of instances were not turning nat mode on, when they should have been. > > > > > -- > > Make Music, Not War > > > > Dave Täht > > CTO, TekLibre, LLC > > http://www.teklibre.com > > Tel: 1-831-435-0729 > > _______________________________________________ > > Cake mailing list > > Cake@lists.bufferbloat.net > > https://lists.bufferbloat.net/listinfo/cake > > > Cheers, > > Kevin D-B > > gpg: 012C ACB2 28C6 C53E 9775 9123 B3A2 389B 9DE2 334A > -- Make Music, Not War Dave Täht CTO, TekLibre, LLC http://www.teklibre.com Tel: 1-831-435-0729 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Cake] cake and nat in openwrt... on by default? 2020-04-05 15:22 ` Dave Taht @ 2020-04-05 18:03 ` Dave Taht 2020-04-05 19:56 ` Kevin Darbyshire-Bryant 1 sibling, 0 replies; 6+ messages in thread From: Dave Taht @ 2020-04-05 18:03 UTC (permalink / raw) To: Kevin Darbyshire-Bryant; +Cc: Cake List https://www.reddit.com/search/?q=bufferbloat&t=week anyway I posted a PSA. Grump. it looks like comment threads are not unified across forums. https://www.reddit.com/r/HomeNetworking/comments/fvhr4w/psa_sqm_cake_nat_and_bufferbloat_tuning/ I do wish our mailing lists showed up on google searches. On Sun, Apr 5, 2020 at 8:22 AM Dave Taht <dave.taht@gmail.com> wrote: > > On Sun, Apr 5, 2020 at 12:57 AM Kevin Darbyshire-Bryant > <kevin@darbyshire-bryant.me.uk> wrote: > > > > > > > > > On 5 Apr 2020, at 05:17, Dave Taht <dave.taht@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. > > I'd still be willing to bet, then, that the majority of instances were > not turning nat mode on, when > they should have been. > > > > > > > > > -- > > > Make Music, Not War > > > > > > Dave Täht > > > CTO, TekLibre, LLC > > > http://www.teklibre.com > > > Tel: 1-831-435-0729 > > > _______________________________________________ > > > Cake mailing list > > > Cake@lists.bufferbloat.net > > > https://lists.bufferbloat.net/listinfo/cake > > > > > > Cheers, > > > > Kevin D-B > > > > gpg: 012C ACB2 28C6 C53E 9775 9123 B3A2 389B 9DE2 334A > > > > > -- > Make Music, Not War > > Dave Täht > CTO, TekLibre, LLC > http://www.teklibre.com > Tel: 1-831-435-0729 -- Make Music, Not War Dave Täht CTO, TekLibre, LLC http://www.teklibre.com Tel: 1-831-435-0729 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Cake] cake and nat in openwrt... on by default? 2020-04-05 15:22 ` Dave Taht 2020-04-05 18:03 ` Dave Taht @ 2020-04-05 19:56 ` Kevin Darbyshire-Bryant 2020-04-06 10:15 ` Toke Høiland-Jørgensen 1 sibling, 1 reply; 6+ messages in thread From: Kevin Darbyshire-Bryant @ 2020-04-05 19:56 UTC (permalink / raw) To: Dave Taht; +Cc: Cake List [-- Attachment #1: Type: text/plain, Size: 742 bytes --] > On 5 Apr 2020, at 16:22, Dave Taht <dave.taht@gmail.com> wrote: > >> > > I'd still be willing to bet, then, that the majority of instances were > not turning nat mode on, when > they should have been. If memory serves, at the time there was a lot of concern about cpu usage and (I felt) that every line, every potential instruction and cache hit was being scrutinised. NAT lookup by default was deemed too much. Cake ended up being ‘cpu heavy’ though I’ve yet to see a better combination of shaper, aqm, flow fairness, host fairness, DSCP awareness and ack filtering in one overall package, let alone one that did it in less cpu. Cheers, Kevin D-B gpg: 012C ACB2 28C6 C53E 9775 9123 B3A2 389B 9DE2 334A [-- Attachment #2: Message signed with OpenPGP --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Cake] cake and nat in openwrt... on by default? 2020-04-05 19:56 ` Kevin Darbyshire-Bryant @ 2020-04-06 10:15 ` Toke Høiland-Jørgensen 0 siblings, 0 replies; 6+ messages in thread From: Toke Høiland-Jørgensen @ 2020-04-06 10:15 UTC (permalink / raw) To: Kevin Darbyshire-Bryant, Dave Taht; +Cc: Cake List Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> writes: >> On 5 Apr 2020, at 16:22, Dave Taht <dave.taht@gmail.com> wrote: >> >>> >> >> I'd still be willing to bet, then, that the majority of instances were >> not turning nat mode on, when >> they should have been. > > If memory serves, at the time there was a lot of concern about cpu > usage and (I felt) that every line, every potential instruction and > cache hit was being scrutinised. NAT lookup by default was deemed too > much. Cake ended up being ‘cpu heavy’ though I’ve yet to see a better > combination of shaper, aqm, flow fairness, host fairness, DSCP > awareness and ack filtering in one overall package, let alone one that > did it in less cpu. Well, one thing we could do is change the defaults in sqm-scripts? :) -Toke ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-06 10:15 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-05 4:17 [Cake] cake and nat in openwrt... on by default? Dave Taht 2020-04-05 7:57 ` Kevin Darbyshire-Bryant 2020-04-05 15:22 ` Dave Taht 2020-04-05 18:03 ` Dave Taht 2020-04-05 19:56 ` Kevin Darbyshire-Bryant 2020-04-06 10:15 ` Toke Høiland-Jørgensen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox