uint64_t action;
ofpbuf_use_const(&packet, data, size);
- flow_extract(&packet, htonll(0), 0, &flow);
+ flow_extract(&packet, 0, htonll(0), 0, &flow);
ofpbuf_use_stack(&key, &keybuf, sizeof keybuf);
odp_flow_key_from_flow(&key, &flow);
[OVS_VPORT_ATTR_TYPE] = { .type = NL_A_U32 },
[OVS_VPORT_ATTR_NAME] = { .type = NL_A_STRING, .max_len = IFNAMSIZ },
[OVS_VPORT_ATTR_UPCALL_PID] = { .type = NL_A_U32 },
- [OVS_VPORT_ATTR_STATS] = { .type = NL_A_UNSPEC,
- .min_len = sizeof(struct ovs_vport_stats),
- .max_len = sizeof(struct ovs_vport_stats),
+ [OVS_VPORT_ATTR_STATS] = { NL_POLICY_FOR(struct ovs_vport_stats),
.optional = true },
[OVS_VPORT_ATTR_ADDRESS] = { .type = NL_A_UNSPEC,
.min_len = ETH_ADDR_LEN,
{
static const struct nl_policy ovs_datapath_policy[] = {
[OVS_DP_ATTR_NAME] = { .type = NL_A_STRING, .max_len = IFNAMSIZ },
- [OVS_DP_ATTR_STATS] = { .type = NL_A_UNSPEC,
- .min_len = sizeof(struct ovs_dp_stats),
- .max_len = sizeof(struct ovs_dp_stats),
+ [OVS_DP_ATTR_STATS] = { NL_POLICY_FOR(struct ovs_dp_stats),
.optional = true },
};
static const struct nl_policy ovs_flow_policy[] = {
[OVS_FLOW_ATTR_KEY] = { .type = NL_A_NESTED },
[OVS_FLOW_ATTR_ACTIONS] = { .type = NL_A_NESTED, .optional = true },
- [OVS_FLOW_ATTR_STATS] = { .type = NL_A_UNSPEC,
- .min_len = sizeof(struct ovs_flow_stats),
- .max_len = sizeof(struct ovs_flow_stats),
+ [OVS_FLOW_ATTR_STATS] = { NL_POLICY_FOR(struct ovs_flow_stats),
.optional = true },
[OVS_FLOW_ATTR_TCP_FLAGS] = { .type = NL_A_U8, .optional = true },
[OVS_FLOW_ATTR_USED] = { .type = NL_A_U64, .optional = true },