summaryrefslogtreecommitdiff
path: root/trafgen_lexer.l
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-09-22 23:55:37 +0300
committerTobias Klauser <tklauser@distanz.ch>2016-10-04 17:20:28 +0200
commitf014afe52c3a4a5556475471bac54a5103552eba (patch)
tree9c34241c4c759467191ebf7d71e1c2331283c20a /trafgen_lexer.l
parent8aa7e5bf95e452cec43412036b59c04014149cde (diff)
trafgen: parser: Add 'pfc()' function for PFC header
Add 'pfc()' function for PFC header creation with fields: code - MAC Control opcode prio - Priority enable vector prio(0)..prio(7) - Enable/disable pause for prio X time(0)..time(7) - Set pause time for prio X Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_lexer.l')
-rw-r--r--trafgen_lexer.l4
1 files changed, 3 insertions, 1 deletions
diff --git a/trafgen_lexer.l b/trafgen_lexer.l
index 324a171..025fbfe 100644
--- a/trafgen_lexer.l
+++ b/trafgen_lexer.l
@@ -118,8 +118,9 @@ ip6_addr (({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:
"etype" { return K_ETYPE; }
"type" { return K_TYPE; }
- /* IEEE 802.3X PAUSE */
+ /* PFC/IEEE 802.3X PAUSE */
"time" { return K_TIME; }
+"pri"|"prio" { return K_PRIO; }
/* VLAN (802.1Q & 802.1ad) */
"tpid" { return K_TPID; }
@@ -196,6 +197,7 @@ ip6_addr (({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:
"eth" { return K_ETH; }
"pause" { return K_PAUSE; }
+"pfc" { return K_PFC; }
"vlan" { return K_VLAN; }
"mpls" { return K_MPLS; }
"arp" { return K_ARP; }