From f014afe52c3a4a5556475471bac54a5103552eba Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Thu, 22 Sep 2016 23:55:37 +0300 Subject: 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 Signed-off-by: Tobias Klauser --- trafgen_lexer.l | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'trafgen_lexer.l') 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; } -- cgit v1.2.3-54-g00ecf