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
ofp-actions: Implement writing to metadata field
[sliver-openvswitch.git]
/
ofproto
/
ofproto-dpif.c
diff --git
a/ofproto/ofproto-dpif.c
b/ofproto/ofproto-dpif.c
index
0c954df
..
c800386
100644
(file)
--- a/
ofproto/ofproto-dpif.c
+++ b/
ofproto/ofproto-dpif.c
@@
-5460,6
+5460,7
@@
do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len,
}
OFPACT_FOR_EACH (a, ofpacts, ofpacts_len) {
struct ofpact_controller *controller;
}
OFPACT_FOR_EACH (a, ofpacts, ofpacts_len) {
struct ofpact_controller *controller;
+ const struct ofpact_metadata *metadata;
if (ctx->exit) {
break;
if (ctx->exit) {
break;
@@
-5608,6
+5609,12
@@
do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len,
*/
break;
*/
break;
+ case OFPACT_WRITE_METADATA:
+ metadata = ofpact_get_WRITE_METADATA(a);
+ ctx->flow.metadata &= ~metadata->mask;
+ ctx->flow.metadata |= metadata->metadata & metadata->mask;
+ break;
+
case OFPACT_GOTO_TABLE: {
/* TODO:XXX remove recursion */
/* It is assumed that goto-table is last action */
case OFPACT_GOTO_TABLE: {
/* TODO:XXX remove recursion */
/* It is assumed that goto-table is last action */