Development issues regarding the cerowrt test router project
 help / color / mirror / Atom feed
* [Cerowrt-devel] Fwd: Making sqm-scripts compatible with other packages (e.g. mwan3 multiwan)
       [not found]                       ` <534C2A58.8000604@travelguide.gr>
@ 2014-04-14 19:57                         ` Dave Taht
  0 siblings, 0 replies; only message in thread
From: Dave Taht @ 2014-04-14 19:57 UTC (permalink / raw)
  To: cerowrt-devel

some feedback on sqm. It's not clear to me how to mask out the
stuff in the tc filter....

---------- Forwarded message ----------
From: Kostas Papadopoulos
Date: Mon, Apr 14, 2014 at 11:35 AM
Subject: Making sqm-scripts compatible with other packages (e.g. mwan3 multiwan)
To: dave.taht@gmail.com


Hi David,

I was looking at the sqm-scripts you recently posted at
http://patchwork.openwrt.org/patch/5078/
https://github.com/dtaht/ceropackages-3.10/tree/master/net/sqm-scripts

and noticed that the way sqm-scripts using the iptables' mark feature
makes it incompatible with other packages which also use mark, such as
the mwan3 multiwan script. Please consider updating sqm-scripts to use
a /0xff mask, like qos-scripts does (it'd conflict with qos-scripts,
but it's of little concern since since qos-scripts and sqm-scripts
shouldn't be used together anyway).

Best regards,
KP

PS: iptables mark is a 32 bits field which you can manipulate. With a
mask (much like an ip subnetmask) you can tell which bits to write.
You'd need to replace "-j MARK --set-mark 0x1" with "-j MARK
--set-mark 0x1/0xff" which will only write over the first eight bits.
In this last case it would be compatible, as e.g. mwan3 uses bits 9 -
16

grep mark net/sqm-scripts/files/usr/lib/sqm/*

simple.qos:# this cleanly shows a means of going from diffserv marking
simple.qos:ipt -t mangle -A QOS_MARK_${IFACE} -j MARK --set-mark 0x2
simple.qos:ipt -t mangle -A QOS_MARK_${IFACE} -m dscp --dscp-class CS1
-j MARK --set-mark 0x3
simple.qos:ipt -t mangle -A QOS_MARK_${IFACE} -m dscp --dscp-class CS6
-j MARK --set-mark 0x1
simple.qos:ipt -t mangle -A QOS_MARK_${IFACE} -m dscp --dscp-class EF
-j MARK --set-mark 0x1
simple.qos:ipt -t mangle -A QOS_MARK_${IFACE} -m dscp --dscp-class
AF42 -j MARK --set-mark 0x1
simple.qos:ipt -t mangle -A QOS_MARK_${IFACE} -m tos  --tos
Minimize-Delay -j MARK --set-mark 0x1
simple.qos:ipt -t mangle -A POSTROUTING -o $DEV -m mark --mark 0x00 -g
QOS_MARK_${IFACE}
simple.qos:ipt -t mangle -A POSTROUTING -o $IFACE -m mark --mark 0x00
-g QOS_MARK_${IFACE}
simple.qos:# ipt -t mangle -A PREROUTING -i s+ -p tcp -m tcp
--tcp-flags SYN,RST,ACK SYN -j MARK --set-mark 0x01
simple.qos:ipt -t mangle -A PREROUTING -i vtun+ -p tcp -j MARK
--set-mark 0x2 # tcp tunnels need ordering
simple.qos:# ipv6 support. Note that the handle indicates the fw mark
bucket that is looked for

stop.sh:        ipt -t mangle -D POSTROUTING -o $DEV -m mark --mark
0x00 -g QOS_MARK_${IFACE}
stop.sh:        ipt -t mangle -D POSTROUTING -o $IFACE -m mark --mark
0x00 -g QOS_MARK_${IFACE}
stop.sh:        ipt -t mangle -D PREROUTING -i vtun+ -p tcp -j MARK
--set-mark 0x2





-- 
Dave Täht

NSFW: https://w2.eff.org/Censorship/Internet_censorship_bills/russell_0296_indecent.article

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-14 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5349B456.4060004@travelguide.gr>
     [not found] ` <B58D2234-F3D6-45BE-9548-04128A82974C@gmail.com>
     [not found]   ` <5349C94B.7020706@travelguide.gr>
     [not found]     ` <BD32AECB-E266-4AE4-B6CE-EE60109A53E5@gmail.com>
     [not found]       ` <534AD864.6030803@travelguide.gr>
     [not found]         ` <DDAC3FD1-E724-462D-80D6-CDF8502B03EB@gmail.com>
     [not found]           ` <534AEF68.5090002@travelguide.gr>
     [not found]             ` <CAKKVE-pkEe1QRwyZH5+dnb389iNfJz2=ydAqsqP-tn=oS6puyw@mail.gmail.com>
     [not found]               ` <534AF876.3050606@travelguide.gr>
     [not found]                 ` <889FDCED-AA32-4A65-B152-EA192DD82A07@gmail.com>
     [not found]                   ` <534AFB49.1040700@travelguide.gr>
     [not found]                     ` <611AED5F-D2AD-41D4-BD43-E5F9BEE2B664@gmail.com>
     [not found]                       ` <534C2A58.8000604@travelguide.gr>
2014-04-14 19:57                         ` [Cerowrt-devel] Fwd: Making sqm-scripts compatible with other packages (e.g. mwan3 multiwan) Dave Taht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox