ofpbuf_use_stub(&ofpacts, ofpacts_stub, sizeof ofpacts_stub);
next_table_id = lflow->table_id < 31 ? lflow->table_id + 17 : 0;
error = actions_parse_string(lflow->actions, &symtab, &ldp->ports,
- next_table_id, &ofpacts, &prereqs);
+ next_table_id, 64, &ofpacts, &prereqs);
if (error) {
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1);
VLOG_WARN_RL(&rl, "error parsing actions \"%s\": %s",
struct lexer *lexer; /* Lexer for pulling more tokens. */
const struct shash *symtab; /* Symbol table. */
uint8_t next_table_id; /* OpenFlow table for 'next' to resubmit. */
+ uint8_t output_table_id; /* OpenFlow table for 'output' to resubmit. */
const struct simap *ports; /* Map from port name to number. */
/* State. */
action_error(ctx, "\"next\" action not allowed here.");
}
} else if (lexer_match_id(ctx->lexer, "output")) {
- /* Table 64 does logical-to-physical translation. */
- emit_resubmit(ctx, 64);
+ emit_resubmit(ctx, ctx->output_table_id);
} else {
action_syntax_error(ctx, "expecting action");
}
* 'next_table_id' should be the OpenFlow table to which the "next" action will
* resubmit, or 0 to disable "next".
*
+ * 'output_table_id' should be the OpenFlow table to which the "output" action
+ * will resubmit
+ *
* Some actions add extra requirements (prerequisites) to the flow's match. If
* so, this function sets '*prereqsp' to the actions' prerequisites; otherwise,
* it sets '*prereqsp' to NULL. The caller owns '*prereqsp' and must
char * OVS_WARN_UNUSED_RESULT
actions_parse(struct lexer *lexer, const struct shash *symtab,
const struct simap *ports, uint8_t next_table_id,
- struct ofpbuf *ofpacts, struct expr **prereqsp)
+ uint8_t output_table_id, struct ofpbuf *ofpacts,
+ struct expr **prereqsp)
{
size_t ofpacts_start = ofpacts->size;
ctx.symtab = symtab;
ctx.ports = ports;
ctx.next_table_id = next_table_id;
+ ctx.output_table_id = output_table_id;
ctx.error = NULL;
ctx.ofpacts = ofpacts;
ctx.prereqs = NULL;
char * OVS_WARN_UNUSED_RESULT
actions_parse_string(const char *s, const struct shash *symtab,
const struct simap *ports, uint8_t next_table_id,
- struct ofpbuf *ofpacts, struct expr **prereqsp)
+ uint8_t output_table_id, struct ofpbuf *ofpacts,
+ struct expr **prereqsp)
{
struct lexer lexer;
char *error;
lexer_init(&lexer, s);
lexer_get(&lexer);
error = actions_parse(&lexer, symtab, ports, next_table_id,
- ofpacts, prereqsp);
+ output_table_id, ofpacts, prereqsp);
lexer_destroy(&lexer);
return error;
char *actions_parse(struct lexer *, const struct shash *symtab,
const struct simap *ports, uint8_t next_table_id,
- struct ofpbuf *ofpacts, struct expr **prereqsp)
+ uint8_t output_table_id, struct ofpbuf *ofpacts,
+ struct expr **prereqsp)
OVS_WARN_UNUSED_RESULT;
char *actions_parse_string(const char *s, const struct shash *symtab,
const struct simap *ports, uint8_t next_table_id,
- struct ofpbuf *ofpacts, struct expr **prereqsp)
+ uint8_t output_table_id, struct ofpbuf *ofpacts,
+ struct expr **prereqsp)
OVS_WARN_UNUSED_RESULT;
#endif /* ovn/actions.h */