Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Mar 2013 22:11:00 +0800
From:      Marcelo Araujo <>
To:        "Alexander V. Chernikov" <>
Cc:, Luigi Rizzo <>
Subject:   Re: [patch] setting/matching DSCP with ipfw
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
2013/3/14 Alexander V. Chernikov <>

> Hello list!
> This is the obvious thing which should be done at least 5 years ago.
> There are several PRs like kern/102471 and kern/121122 with similar
> functionality.
> Given patch adds setting DSCP support (O_SETDSCP) which works for both
> IPv4 and IPv6 packets. Fast checksum recalculation (RFC 1624) is done in
> former case. Dscp can be specified by name (AFXY, CSX, BE, EF), by value
> (0..63) or via tablearg.
> Matching DSCP is done via another opcode (O_DSCP) which accepts several
> classes at once (af11,af22,be). Classes are stored in bitmask (2 u32
> words).
> (Btw, current O_TOS can be modified to transparently match single DSCP
> point, probably later on..)
> Example:
> 00050  675  37800 setdscp ef ip from any to 2a02:978:11::/64 dscp be
> ipfw add 100 count ip from any to any dscp af11,cs3
> 00100 count ip from any to any dscp af11,cs3
> I'm planning to commit updated patch (docs, some style(9)) on Mon 18 if
> there are no objections.

Great that you will take care of those PR, a lot of people want it a long
time ago.

By the way, a long time ago, I tried to create a new entry called as
"modip" and there would concentrated everything related with QoS. Something
such like the examples below:
*ipfw add 10 modip tos:lowdelay ip from any to any
ipfw add 11 modip dscp:af14 ip from any to any
*ipfw add 12 modip ippre:flash ip from any to any*

Also, there are some discussion around "modip" you can google it.
Here is some patches, also the modip implementation:

Best Regards,
Marcelo Araujo

Want to link to this message? Use this URL: <>