projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: Remove implementation of port groups.
[openvswitch]
/
lib
/
odp-util.c
diff --git
a/lib/odp-util.c
b/lib/odp-util.c
index ccf05c6bd4259eb99783201edd160db06892556d..8278c22865d2a002dd876d04c48eb030380d1c21 100644
(file)
--- a/
lib/odp-util.c
+++ b/
lib/odp-util.c
@@
-30,13
+30,10
@@
union odp_action *
odp_actions_add(struct odp_actions *actions, uint16_t type)
{
union odp_action *a;
odp_actions_add(struct odp_actions *actions, uint16_t type)
{
union odp_action *a;
- if (actions->n_actions < MAX_ODP_ACTIONS) {
- a = &actions->actions[actions->n_actions++];
- } else {
- COVERAGE_INC(odp_overflow);
- actions->n_actions = MAX_ODP_ACTIONS + 1;
- a = &actions->actions[MAX_ODP_ACTIONS - 1];
- }
+ size_t idx;
+
+ idx = actions->n_actions++ & (MAX_ODP_ACTIONS - 1);
+ a = &actions->actions[idx];
memset(a, 0, sizeof *a);
a->type = type;
return a;
memset(a, 0, sizeof *a);
a->type = type;
return a;
@@
-49,9
+46,6
@@
format_odp_action(struct ds *ds, const union odp_action *a)
case ODPAT_OUTPUT:
ds_put_format(ds, "%"PRIu16, a->output.port);
break;
case ODPAT_OUTPUT:
ds_put_format(ds, "%"PRIu16, a->output.port);
break;
- case ODPAT_OUTPUT_GROUP:
- ds_put_format(ds, "g%"PRIu16, a->output_group.group);
- break;
case ODPAT_CONTROLLER:
ds_put_format(ds, "ctl(%"PRIu32")", a->controller.arg);
break;
case ODPAT_CONTROLLER:
ds_put_format(ds, "ctl(%"PRIu32")", a->controller.arg);
break;
@@
-98,6
+92,9
@@
format_odp_action(struct ds *ds, const union odp_action *a)
case ODPAT_POP_PRIORITY:
ds_put_cstr(ds, "pop_priority");
break;
case ODPAT_POP_PRIORITY:
ds_put_cstr(ds, "pop_priority");
break;
+ case ODPAT_DROP_SPOOFED_ARP:
+ ds_put_cstr(ds, "drop_spoofed_arp");
+ break;
default:
ds_put_format(ds, "***bad action 0x%"PRIx16"***", a->type);
break;
default:
ds_put_format(ds, "***bad action 0x%"PRIx16"***", a->type);
break;