projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
xenserver: Don't delete pidfile when stopping monitor-external-ids
[openvswitch]
/
lib
/
odp-util.c
diff --git
a/lib/odp-util.c
b/lib/odp-util.c
index 87ac92b82a4c1fa5e32ef41b02c50161f058ab21..442c939a7d5096ca59d0579176653e8a92e1c952 100644
(file)
--- a/
lib/odp-util.c
+++ b/
lib/odp-util.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009
, 2010
Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-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;
@@
-55,6
+52,9
@@
format_odp_action(struct ds *ds, const union odp_action *a)
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;
+ case ODPAT_SET_TUNNEL:
+ ds_put_format(ds, "set_tunnel(0x%08"PRIx32")", ntohl(a->tunnel.tun_id));
+ break;
case ODPAT_SET_VLAN_VID:
ds_put_format(ds, "set_vlan(%"PRIu16")", ntohs(a->vlan_vid.vlan_vid));
break;
case ODPAT_SET_VLAN_VID:
ds_put_format(ds, "set_vlan(%"PRIu16")", ntohs(a->vlan_vid.vlan_vid));
break;
@@
-89,8
+89,14
@@
format_odp_action(struct ds *ds, const union odp_action *a)
case ODPAT_SET_TP_DST:
ds_put_format(ds, "set_tp_dst(%"PRIu16")", ntohs(a->tp_port.tp_port));
break;
case ODPAT_SET_TP_DST:
ds_put_format(ds, "set_tp_dst(%"PRIu16")", ntohs(a->tp_port.tp_port));
break;
+ case ODPAT_SET_PRIORITY:
+ ds_put_format(ds, "set_priority(0x%"PRIx32")", a->priority.priority);
+ break;
+ case ODPAT_POP_PRIORITY:
+ ds_put_cstr(ds, "pop_priority");
+ break;
default:
default:
- ds_put_format(ds, "***bad action
%"PRIu
16"***", a->type);
+ ds_put_format(ds, "***bad action
0x%"PRIx
16"***", a->type);
break;
}
}
break;
}
}