From 58a2a79f4083fa614637cab13fe7df99b92b6fcf Mon Sep 17 00:00:00 2001 From: Torsten Schmidt Date: Mon, 21 Dec 2009 21:30:44 +0100 Subject: [PATCH 2/2] ipv4: add missing DSCP classes This patch adds the missing IANA DSCP registry entries to ipv4 DSCP statistic counter. See /proc/net/ipdscp Signed-off-by: Torsten Schmidt --- include/net/ipdscp.h | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/include/net/ipdscp.h b/include/net/ipdscp.h index d5bce81..14cc8a6 100644 --- a/include/net/ipdscp.h +++ b/include/net/ipdscp.h @@ -58,7 +58,25 @@ static inline void ipv4_dscp_stat(struct net *net, __u8 dsfield) switch (dsfield >> 2) { case IP_DSCP_CS0: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_CS0);break; case IP_DSCP_EF: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_EF);break; - /* add new entrys here ... */ + case IP_DSCP_CS1: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_CS1);break; + case IP_DSCP_CS2: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_CS2);break; + case IP_DSCP_CS3: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_CS3);break; + case IP_DSCP_CS4: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_CS4);break; + case IP_DSCP_CS5: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_CS5);break; + case IP_DSCP_CS6: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_CS6);break; + case IP_DSCP_CS7: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_CS7);break; + case IP_DSCP_AF11: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF11);break; + case IP_DSCP_AF12: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF12);break; + case IP_DSCP_AF13: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF13);break; + case IP_DSCP_AF21: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF21);break; + case IP_DSCP_AF22: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF22);break; + case IP_DSCP_AF23: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF23);break; + case IP_DSCP_AF31: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF31);break; + case IP_DSCP_AF32: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF32);break; + case IP_DSCP_AF33: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF33);break; + case IP_DSCP_AF41: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF41);break; + case IP_DSCP_AF42: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF42);break; + case IP_DSCP_AF43: IP_DSCP_INC_STATS_BH(net, LINUX_MIB_IPDSCP_AF43);break; } } -- 1.6.3.3