summaryrefslogtreecommitdiff
path: root/lib/pbr.h
diff options
context:
space:
mode:
authorG. Paul Ziemba <paulz@labn.net>2023-07-30 21:33:10 -0700
committerG. Paul Ziemba <paulz@labn.net>2023-08-09 12:11:35 -0700
commit887367a01c0e978e992935ae93f3df4e3c1bd86c (patch)
tree533826535f9359febf6b935fb6ee44b63121c63a /lib/pbr.h
parentc47fd378f33b721cc32b788c6ce89353b1076416 (diff)
pbrd: use flags to indicate active fields
Before now, PBRD used non-zero values to imply that a rule's match or action field was active. This approach was getting cumbersome for fields where 0 is a valid active value and various field-specific magic values had to be used. This commit changes PBRD to use a flag bit per field to indicate that the field is active. Signed-off-by: G. Paul Ziemba <paulz@labn.net>
Diffstat (limited to 'lib/pbr.h')
-rw-r--r--lib/pbr.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/pbr.h b/lib/pbr.h
index 61a5eb07f6..ae01ae7978 100644
--- a/lib/pbr.h
+++ b/lib/pbr.h
@@ -57,7 +57,7 @@ struct pbr_filter {
struct prefix src_ip;
struct prefix dst_ip;
- /* Source and Destination higher-layer (TCP/UDP) port numbers */
+ /* Source and Destination layer 4 (TCP/UDP/etc.) port numbers */
uint16_t src_port;
uint16_t dst_port;
@@ -88,11 +88,11 @@ struct pbr_filter {
struct pbr_action {
uint32_t flags;
-#define PBR_ACTION_TABLE (1 << 0)
-#define PBR_ACTION_QUEUE_ID (1 << 1)
-#define PBR_ACTION_PCP (1 << 2)
-#define PBR_ACTION_VLAN_ID (1 << 3)
-#define PBR_ACTION_VLAN_FLAGS (1 << 4)
+#define PBR_ACTION_TABLE (1 << 0)
+#define PBR_ACTION_QUEUE_ID (1 << 1)
+#define PBR_ACTION_PCP (1 << 2)
+#define PBR_ACTION_VLAN_ID (1 << 3)
+#define PBR_ACTION_VLAN_STRIP_INNER_ANY (1 << 4)
uint32_t table;
uint32_t queue_id;
@@ -100,7 +100,6 @@ struct pbr_action {
/* VLAN */
uint8_t pcp;
uint16_t vlan_id;
- uint16_t vlan_flags;
};