aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/octeon
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2019-06-05 18:31:47 +0100
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2019-07-25 10:20:59 +0100
commitdba5a01358d98cf5a83826f1890f9aa31a49a4d4 (patch)
tree20cd21547acc59ccd7b41a28a3be2ef13fffd24e /target/linux/octeon
parent1aad1d17ed8bee2a22d235980a6c80b6dc1b74e0 (diff)
downloadupstream-dba5a01358d98cf5a83826f1890f9aa31a49a4d4.tar.gz
upstream-dba5a01358d98cf5a83826f1890f9aa31a49a4d4.tar.bz2
upstream-dba5a01358d98cf5a83826f1890f9aa31a49a4d4.zip
kernel: netfilter add connmark savedscp support
savedscp is a method of storing the DSCP of an ip packet into conntrack mark. In combination with a suitable tc filter action (conndscp but may end up being integrated into connmark) DSCP values are able to be stored on egress and restored on ingress across links that otherwise alter or bleach DSCP. This is useful for qdiscs such as CAKE which are able to shape according to policies based on DSCP. Ingress classification is traditionally a challenging task since iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT lookups, hence are unable to see internal IPv4 addresses as used on the typical home masquerading gateway. The ingress problem is solved by the tc filter, but the tc people didn't like the idea of tc setting conntrack mark values, though they are ok with reading conntrack values and hence restoring DSCP from conntrack marks. x_tables CONNMARK with the new savedscp action solves the problem of storing the DSCP to the conntrack mark. It accepts 2 parameters. The mark is a 32bit value with usually one 1 bit set. This bit is set when savedscp saves the DSCP to the mark. This is useful to implement a 'one shot' iptables based classification where the 'complicated' iptables rules are only run once to classify the connection on initial (egress) packet and subsequent packets are all marked/restored with the same DSCP. A mark of zero disables the setting of a status bit/s. The mask is a 32bit value of at least 6 contiguous bits and represents the area where the DSCP will be stored. e.g. iptables -A QOS_MARK_eth0 -t mangle -j CONNMARK --savedscp-mark 0xfc000000/0x01000000 Would store the DSCP in the top 6 bits of the 32bit mark field, and use the LSB of the top byte as the 'DSCP has been stored' marker. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Diffstat (limited to 'target/linux/octeon')
0 files changed, 0 insertions, 0 deletions