const union odp_action actions[], size_t n_actions,
const struct ofpbuf *buf)
{
- struct odp_execute execute;
int error;
- memset(&execute, 0, sizeof execute);
- execute.in_port = in_port;
- execute.actions = (union odp_action *) actions;
- execute.n_actions = n_actions;
- execute.data = buf->data;
- execute.length = buf->size;
- error = do_ioctl(dpif, ODP_EXECUTE, NULL, &execute);
+ if (n_actions > 0) {
+ struct odp_execute execute;
+ memset(&execute, 0, sizeof execute);
+ execute.in_port = in_port;
+ execute.actions = (union odp_action *) actions;
+ execute.n_actions = n_actions;
+ execute.data = buf->data;
+ execute.length = buf->size;
+ error = do_ioctl(dpif, ODP_EXECUTE, NULL, &execute);
+ } else {
+ error = 0;
+ }
if (!(error ? VLOG_DROP_WARN(&error_rl) : VLOG_DROP_DBG(&dpmsg_rl))) {
struct ds ds = DS_EMPTY_INITIALIZER;