PKT_SCHED: dsmark should ignore ECN bits
Subsystems (3)
PATCH 1/1 PKT_SCHED: dsmark should ignore ECN bits
Taking ECN bits into account doesn't make sense. The two bits were still unused at the time the code was written so this brings back the old behaviour.
Signed-off-by Thomas Graf <[email protected]>
net/sched/sch_dsmark.c +5 -2
@@ -14,6 +14,7 @@#include <linux/rtnetlink.h> #include <net/pkt_sched.h> #include <net/dsfield.h> +#include <net/inet_ecn.h> #include <asm/byteorder.h>
@@ -198,10 +199,12 @@/* FIXME: Safe with non-linear skbs? --RR */ switch (skb->protocol) {case __constant_htons (ETH_P_IP ): - skb->tc_index =ipv4_get_dsfield (skb->nh.iph); + skb->tc_index =ipv4_get_dsfield (skb->nh.iph) + & ~INET_ECN_MASK ;break ;case __constant_htons (ETH_P_IPV6 ): - skb->tc_index =ipv6_get_dsfield (skb->nh.ipv6h); + skb->tc_index =ipv6_get_dsfield (skb->nh.ipv6h) + & ~INET_ECN_MASK ;break ;default : skb->tc_index =0 ;
David S. Miller
maintainerQuoted 5 lines · On Mon, 27 Dec 2004 20:38:22 +0100 Thomas Graf <[email protected]> wrote:
Taking ECN bits into account doesn't make sense. The two bits were still unused at the time the code was written so this brings back the old behaviour.
Signed-off-by Thomas Graf <[email protected]>
Looks good, I put this into my 2.4 tree as well.
Thanks.