[dpdk-dev] [PATCH] net/mlx5: fix parsing all-multicast from flow item
Yongseok Koh
yskoh at mellanox.com
Thu Jan 11 08:51:53 CET 2018
As the dst_mac of allmulti is already masked with the mask, it has 0x01 in
the first octet. Checking the least significant bit only can't distinguish
it from broadcast or IPv6 multicast.
Fixes: bb47fb6e6067 ("net/mlx5: fix flow type for allmulti rules")
Cc: stable at dpdk.org
Signed-off-by: Yongseok Koh <yskoh at mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 305b2ec01..d01c8069b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1281,7 +1281,7 @@ mlx5_flow_create_eth(const struct rte_flow_item *item,
eth.val.ether_type &= eth.mask.ether_type;
}
mlx5_flow_create_copy(parser, ð, eth_size);
- parser->allmulti = eth.val.dst_mac[0] & 1;
+ parser->allmulti = eth.val.dst_mac[0] == 0x01;
return 0;
}
--
2.11.0
More information about the dev
mailing list