X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Fmlx4%2Fmlx4_flow.c;h=3abde3093871d76d66bc91386229b73e73263c31;hb=fb720b7d8b2704cffa9ff872f242ea3aa216a916;hp=b40e7e5c3ad0d50415d5338d723f1aec3e8a3bdc;hpb=b7abc67c2818ea060a0484441b8fb481484310f1;p=dpdk.git diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index b40e7e5c3a..3abde30938 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -205,9 +205,7 @@ mlx4_flow_merge_eth(struct rte_flow *flow, const char *msg; unsigned int i; - if (!mask) { - flow->promisc = 1; - } else { + if (mask) { uint32_t sum_dst = 0; uint32_t sum_src = 0; @@ -249,6 +247,11 @@ mlx4_flow_merge_eth(struct rte_flow *flow, .type = IBV_FLOW_SPEC_ETH, .size = sizeof(*eth), }; + if (!mask) { + eth->val.dst_mac[0] = 0xff; + 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. */ @@ -311,6 +314,8 @@ mlx4_flow_merge_vlan(struct rte_flow *flow, 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,