unsigned int priority, struct cls_rule *rule)
{
rule->flow = *flow;
- rule->flow.priority = 0;
+ rule->flow.skb_priority = 0;
flow_wildcards_init_exact(&rule->wc);
rule->priority = priority;
}
}
-/* Initializes 'flow' members from 'packet', 'tun_id', and 'ofp_in_port'.
+/* Initializes 'flow' members from 'packet', 'skb_priority', 'tun_id', and
+ * 'ofp_in_port'.
+ *
* Initializes 'packet' header pointers as follows:
*
* - packet->l2 to the start of the Ethernet header.
* present and has a correct length, and otherwise NULL.
*/
void
-flow_extract(struct ofpbuf *packet, uint32_t priority, ovs_be64 tun_id,
+flow_extract(struct ofpbuf *packet, uint32_t skb_priority, ovs_be64 tun_id,
uint16_t ofp_in_port, struct flow *flow)
{
struct ofpbuf b = *packet;
memset(flow, 0, sizeof *flow);
flow->tun_id = tun_id;
flow->in_port = ofp_in_port;
- flow->priority = priority;
+ flow->skb_priority = skb_priority;
packet->l2 = b.data;
packet->l3 = NULL;
if (wc & FWW_ND_TARGET) {
memset(&flow->nd_target, 0, sizeof flow->nd_target);
}
- flow->priority = 0;
+ flow->skb_priority = 0;
}
char *
ds_put_format(ds, "priority%"PRIu32
":tunnel%#"PRIx64
":in_port%04"PRIx16,
- flow->priority,
+ flow->skb_priority,
ntohll(flow->tun_id),
flow->in_port);
struct in6_addr ipv6_src; /* IPv6 source address. */
struct in6_addr ipv6_dst; /* IPv6 destination address. */
struct in6_addr nd_target; /* IPv6 neighbor discovery (ND) target. */
- uint32_t priority; /* Packet priority for QoS. */
+ uint32_t skb_priority; /* Packet priority for QoS. */
uint32_t regs[FLOW_N_REGS]; /* Registers. */
ovs_be32 nw_src; /* IPv4 source address. */
ovs_be32 nw_dst; /* IPv4 destination address. */
struct ovs_key_ethernet *eth_key;
size_t encap;
- if (flow->priority) {
- nl_msg_put_u32(buf, OVS_KEY_ATTR_PRIORITY, flow->priority);
+ if (flow->skb_priority) {
+ nl_msg_put_u32(buf, OVS_KEY_ATTR_PRIORITY, flow->skb_priority);
}
if (flow->tun_id != htonll(0)) {
/* Metadata. */
if (present_attrs & (UINT64_C(1) << OVS_KEY_ATTR_PRIORITY)) {
- flow->priority = nl_attr_get_u32(attrs[OVS_KEY_ATTR_PRIORITY]);
+ flow->skb_priority = nl_attr_get_u32(attrs[OVS_KEY_ATTR_PRIORITY]);
expected_attrs |= UINT64_C(1) << OVS_KEY_ATTR_PRIORITY;
}
commit_set_priority_action(const struct flow *flow, struct flow *base,
struct ofpbuf *odp_actions)
{
- if (base->priority == flow->priority) {
+ if (base->skb_priority == flow->skb_priority) {
return;
}
- base->priority = flow->priority;
+ base->skb_priority = flow->skb_priority;
commit_set_action(odp_actions, OVS_KEY_ATTR_PRIORITY,
- &base->priority, sizeof(base->priority));
+ &base->skb_priority, sizeof(base->skb_priority));
}
/* If any of the flow key data that ODP actions can modify are different in
int recurse; /* Recursion level, via xlate_table_action. */
struct flow base_flow; /* Flow at the last commit. */
- uint32_t original_priority; /* Priority when packet arrived. */
+ uint32_t orig_skb_priority; /* Priority when packet arrived. */
uint8_t table_id; /* OpenFlow table ID where flow was found. */
uint32_t sflow_n_outputs; /* Number of output ports. */
uint16_t sflow_odp_port; /* Output port for composing sFlow action. */
ofpbuf_delete(upcall->packet);
continue;
}
- flow_extract(upcall->packet, flow.priority, flow.tun_id,
+ flow_extract(upcall->packet, flow.skb_priority, flow.tun_id,
flow.in_port, &flow);
/* Handle 802.1ag, LACP, and STP specially. */
return;
}
- pdscp = get_priority(ofport, ctx->flow.priority);
+ pdscp = get_priority(ofport, ctx->flow.skb_priority);
if (pdscp) {
ctx->flow.nw_tos &= ~IP_DSCP_MASK;
ctx->flow.nw_tos |= pdscp->dscp;
}
/* Add datapath actions. */
- flow_priority = ctx->flow.priority;
- ctx->flow.priority = priority;
+ flow_priority = ctx->flow.skb_priority;
+ ctx->flow.skb_priority = priority;
compose_output_action(ctx, ofp_port);
- ctx->flow.priority = flow_priority;
+ ctx->flow.skb_priority = flow_priority;
/* Update NetFlow output port. */
if (ctx->nf_output_iface == NF_OUT_DROP) {
return;
}
- ctx->flow.priority = priority;
+ ctx->flow.skb_priority = priority;
}
struct xlate_reg_state {
break;
case OFPUTIL_NXAST_POP_QUEUE:
- ctx->flow.priority = ctx->original_priority;
+ ctx->flow.skb_priority = ctx->orig_skb_priority;
break;
case OFPUTIL_NXAST_REG_MOVE:
ctx->nf_output_iface = NF_OUT_DROP;
ctx->mirrors = 0;
ctx->recurse = 0;
- ctx->original_priority = ctx->flow.priority;
+ ctx->orig_skb_priority = ctx->flow.skb_priority;
ctx->table_id = 0;
ctx->exit = false;