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
nx-match: Fix bug in "move" action.
[sliver-openvswitch.git]
/
lib
/
nx-match.c
diff --git
a/lib/nx-match.c
b/lib/nx-match.c
index
e698cc6
..
c1c4767
100644
(file)
--- a/
lib/nx-match.c
+++ b/
lib/nx-match.c
@@
-1467,7
+1467,7
@@
nxm_execute_reg_move(const struct nx_action_reg_move *action,
/* Get the interesting bits of the source field. */
const struct nxm_field *src = nxm_field_lookup(ntohl(action->src));
int src_ofs = ntohs(action->src_ofs);
/* Get the interesting bits of the source field. */
const struct nxm_field *src = nxm_field_lookup(ntohl(action->src));
int src_ofs = ntohs(action->src_ofs);
- uint64_t src_data =
nxm_read_field(src, flow) & (mask << src_ofs)
;
+ uint64_t src_data =
(nxm_read_field(src, flow) >> src_ofs) & mask
;
nxm_reg_load(action->dst,
nxm_encode_ofs_nbits(ntohs(action->dst_ofs), n_bits),
nxm_reg_load(action->dst,
nxm_encode_ofs_nbits(ntohs(action->dst_ofs), n_bits),