ericpaulbishop / gargoyle

Gargoyle Router Management Utility
http://www.gargoyle-router.com
468 stars 221 forks source link

RFC: Replace IMQ with IFB for QoS/Quotas #951

Closed lantis1008 closed 1 year ago

lantis1008 commented 2 years ago

Offering the opportunity to express feedback, criticisms or concerns for replacing IMQ with IFB for QoS and Quotas. Rationale: IMQ is patched into the kernel and has to be maintained. Future versions of OpenWrt are moving to nftables, and there does not currently exist and IMQ patch for nftables. We could write one, but IFB may serve the same purpose with a lot less effort.

Initial commit here: https://github.com/ericpaulbishop/gargoyle/commit/6198601c8b1c2842d5254f46144d961d3511bad8

@pbix @ericpaulbishop @obsy tagged as most relevant. Particularly pbix has a lot of history with QoS and Qosmon.

The idea is that we attach the IFB (ifb0) to the ingress of the WAN interface, and then attach qdiscs to the egress of ifb0. To achieve pre/post NAT visibility, we still tag everything in mangle as we did before, and all of the chain jumps still occur in INPUT+FORWARD and OUTPUT+POSTROUTING for ingress and egress respectively. As before, marks are assigned and saved to the connection tracking mark (connmark). We employ the act_connmark action which will restore the connmarks to the fwmark on each packet, and we use this along with IFBs redirect action to push the tagged packets through ifb0, where they will be filtered through qdiscs as before.

Two things that need to be done to keep everything humming nicely:

pbix commented 2 years ago

Hi Guys,
I am still around but not able to dedicate time to this project anymore. I do not have much I can add to this conversation.

I made some comments about my concerns here https://forum.archive.openwrt.org/viewtopic.php?id=28947 but that was years ago and things change.

If you think you have found a way to surmount those concerns then that is great as I am sure that its a royal pain to maintain support of IMQ.

My hat is off to anyone who would be willing to take up the challenge of replacing IMQ with IFB.

lantis1008 commented 2 years ago

Appreciate that, and I think I have cracked the lack of NAT visibility (or at least I hope I have).

Thanks for taking the time to leave your thoughts, all the best.

lantis1008 commented 1 year ago

Will be done in 1.15