struct flow_wildcards *wc = &rule->wc;
struct flow *flow = &rule->flow;
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 1);
+
switch (f->index) {
/* Metadata. */
case NFI_NXM_OF_IN_PORT:
int match_len;
int i;
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 1);
+
/* Metadata. */
if (!(wc & FWW_IN_PORT)) {
uint16_t in_port = flow->in_port;
/* 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),