From 68dfc25b62e5edc2939bcae791a35fddfecb5d20 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 15 Oct 2015 09:46:21 -0700 Subject: ofp-parse: Fix parsing, formatting of multiple fields in NTR extension. Until now, the only way to specify multiple fields in the "fields" parameter for the Netronome groups extension, was to specify "fields" more than once, e.g. fields=eth_dst,fields=ip_dst However, this wasn't documented and the code in ofp-print didn't use it, generating output that couldn't be parsed. This commit fixes the situation by introducing a more straightforward syntax, e.g. fields(eth_dst,ip_dst), documents it, and adjusts ofp-print code to use it when there is more than one field (it retains the previous format for backward compatibility when there is exactly one field) Signed-off-by: Ben Pfaff Acked-by: Simon Horman --- tests/ofp-print.at | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/ofp-print.at') diff --git a/tests/ofp-print.at b/tests/ofp-print.at index 25cf950c6..fce7671ff 100644 --- a/tests/ofp-print.at +++ b/tests/ofp-print.at @@ -2043,7 +2043,7 @@ ff ff 00 3b 00 00 15 40 00 00 00 01 00 00 00 00 \ 14 01 ff 00 00 00 00 00 \ "], [0], [dnl OFPST_GROUP_DESC reply (OF1.5) (xid=0x2): - group_id=8192,type=select,selection_method=hash,fields=ip_dst=255.255.255.0,nw_proto,tcp_src,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3 + group_id=8192,type=select,selection_method=hash,fields(ip_dst=255.255.255.0,nw_proto,tcp_src),bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3 ]) AT_CLEANUP -- cgit v1.2.1