git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Nicira vendor extension action NXAST_DEC_TTL_CNT_IDS.
[sliver-openvswitch.git]
/
ofproto
/
ofproto-dpif.c
diff --git
a/ofproto/ofproto-dpif.c
b/ofproto/ofproto-dpif.c
index
3d68855
..
d66c500
100644
(file)
--- a/
ofproto/ofproto-dpif.c
+++ b/
ofproto/ofproto-dpif.c
@@
-5159,7
+5159,7
@@
execute_controller_action(struct action_xlate_ctx *ctx, int len,
}
static bool
}
static bool
-compose_dec_ttl(struct action_xlate_ctx *ctx)
+compose_dec_ttl(struct action_xlate_ctx *ctx
, struct ofpact_cnt_ids *ids
)
{
if (ctx->flow.dl_type != htons(ETH_TYPE_IP) &&
ctx->flow.dl_type != htons(ETH_TYPE_IPV6)) {
{
if (ctx->flow.dl_type != htons(ETH_TYPE_IP) &&
ctx->flow.dl_type != htons(ETH_TYPE_IPV6)) {
@@
-5170,7
+5170,12
@@
compose_dec_ttl(struct action_xlate_ctx *ctx)
ctx->flow.nw_ttl--;
return false;
} else {
ctx->flow.nw_ttl--;
return false;
} else {
- execute_controller_action(ctx, UINT16_MAX, OFPR_INVALID_TTL, 0);
+ size_t i;
+
+ for (i = 0; i < ids->n_controllers; i++) {
+ execute_controller_action(ctx, UINT16_MAX, OFPR_INVALID_TTL,
+ ids->cnt_ids[i]);
+ }
/* Stop processing for current table. */
return true;
/* Stop processing for current table. */
return true;
@@
-5530,7
+5535,7
@@
do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len,
break;
case OFPACT_DEC_TTL:
break;
case OFPACT_DEC_TTL:
- if (compose_dec_ttl(ctx)) {
+ if (compose_dec_ttl(ctx
, ofpact_get_DEC_TTL(a)
)) {
goto out;
}
break;
goto out;
}
break;