mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
ofp-actions: Switch away from odd use of "q" in "enqueue" action format.
The formatting of the "enqueue" action uses a "q" to separate the port number from the queue number, as in "enqueue:123q456". This is different from every other action. This commit improves the situation by: * Switching the formatting to use a colon (e.g. "enqueue:123:456"), which is a little less odd-looking but still accepted by older versions of Open vSwitch. * Improving the parser to accept "enqueue(123,456)" also. Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -179,12 +179,13 @@ static char * WARN_UNUSED_RESULT
|
||||
parse_enqueue(char *arg, struct ofpbuf *ofpacts)
|
||||
{
|
||||
char *sp = NULL;
|
||||
char *port = strtok_r(arg, ":q", &sp);
|
||||
char *port = strtok_r(arg, ":q,", &sp);
|
||||
char *queue = strtok_r(NULL, "", &sp);
|
||||
struct ofpact_enqueue *enqueue;
|
||||
|
||||
if (port == NULL || queue == NULL) {
|
||||
return xstrdup("\"enqueue\" syntax is \"enqueue:PORT:QUEUE\"");
|
||||
return xstrdup("\"enqueue\" syntax is \"enqueue:PORT:QUEUE\" or "
|
||||
"\"enqueue(PORT,QUEUE)\"");
|
||||
}
|
||||
|
||||
enqueue = ofpact_put_ENQUEUE(ofpacts);
|
||||
|
Reference in New Issue
Block a user