summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4bb14c8)
This patch adds to MLX4 PMD the option to set flow rules
with empty ether MAC and specific VLAN ID.
Note that this fix works with
1. CX-3 FW 2.42.5016 or higher.
2. mlxconfig configuration STEER_FORCE_VLAN set to 1.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
const char *msg;
unsigned int i;
const char *msg;
unsigned int i;
- if (!mask) {
- flow->promisc = 1;
- } else {
uint32_t sum_dst = 0;
uint32_t sum_src = 0;
uint32_t sum_dst = 0;
uint32_t sum_src = 0;
.type = IBV_FLOW_SPEC_ETH,
.size = sizeof(*eth),
};
.type = IBV_FLOW_SPEC_ETH,
.size = sizeof(*eth),
};
+ if (!mask) {
+ flow->ibv_attr->type = IBV_FLOW_ATTR_ALL_DEFAULT;
+ return 0;
+ }
memcpy(eth->val.dst_mac, spec->dst.addr_bytes, ETHER_ADDR_LEN);
memcpy(eth->mask.dst_mac, mask->dst.addr_bytes, ETHER_ADDR_LEN);
/* Remove unwanted bits from values. */
memcpy(eth->val.dst_mac, spec->dst.addr_bytes, ETHER_ADDR_LEN);
memcpy(eth->mask.dst_mac, mask->dst.addr_bytes, ETHER_ADDR_LEN);
/* Remove unwanted bits from values. */
eth->val.vlan_tag = spec->tci;
eth->mask.vlan_tag = mask->tci;
eth->val.vlan_tag &= eth->mask.vlan_tag;
eth->val.vlan_tag = spec->tci;
eth->mask.vlan_tag = mask->tci;
eth->val.vlan_tag &= eth->mask.vlan_tag;
+ if (flow->ibv_attr->type == IBV_FLOW_ATTR_ALL_DEFAULT)
+ flow->ibv_attr->type = IBV_FLOW_ATTR_NORMAL;
return 0;
error:
return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM,
return 0;
error:
return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM,