skbedit: allow the user to specify bitmask for mark
The user may want to use only some bits of the skb mark in his skbedit rules because the remaining part might be used by something else. Introduce the "mask" parameter to the skbedit actor in order to implement such functionality. When the mask is specified, only those bits selected by the latter are altered really changed by the actor, while the rest is left untouched. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
6edf10173a
commit
4fe77d82ef
@@ -28,6 +28,7 @@
|
||||
#define SKBEDIT_F_QUEUE_MAPPING 0x2
|
||||
#define SKBEDIT_F_MARK 0x4
|
||||
#define SKBEDIT_F_PTYPE 0x8
|
||||
#define SKBEDIT_F_MASK 0x10
|
||||
|
||||
struct tc_skbedit {
|
||||
tc_gen;
|
||||
@@ -42,6 +43,7 @@ enum {
|
||||
TCA_SKBEDIT_MARK,
|
||||
TCA_SKBEDIT_PAD,
|
||||
TCA_SKBEDIT_PTYPE,
|
||||
TCA_SKBEDIT_MASK,
|
||||
__TCA_SKBEDIT_MAX
|
||||
};
|
||||
#define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1)
|
||||
|
Reference in New Issue
Block a user