net/mlx5: use flow API default masks
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Tue, 31 Jan 2017 16:02:46 +0000 (17:02 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 10 Feb 2017 11:25:48 +0000 (12:25 +0100)
Default masks were introduced in the API after its implementation in this
PMD.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx5/mlx5_flow.c

index 42a12e8..4917f79 100644 (file)
@@ -164,6 +164,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
                        .dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
                        .src.addr_bytes = "\xff\xff\xff\xff\xff\xff",
                },
+               .default_mask = &rte_flow_item_eth_mask,
                .mask_sz = sizeof(struct rte_flow_item_eth),
                .convert = mlx5_flow_create_eth,
                .dst_sz = sizeof(struct ibv_exp_flow_spec_eth),
@@ -175,6 +176,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
                .mask = &(const struct rte_flow_item_vlan){
                        .tci = -1,
                },
+               .default_mask = &rte_flow_item_vlan_mask,
                .mask_sz = sizeof(struct rte_flow_item_vlan),
                .convert = mlx5_flow_create_vlan,
                .dst_sz = 0,
@@ -191,12 +193,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
                                .next_proto_id = -1,
                        },
                },
-               .default_mask = &(const struct rte_flow_item_ipv4){
-                       .hdr = {
-                               .src_addr = -1,
-                               .dst_addr = -1,
-                       },
-               },
+               .default_mask = &rte_flow_item_ipv4_mask,
                .mask_sz = sizeof(struct rte_flow_item_ipv4),
                .convert = mlx5_flow_create_ipv4,
                .dst_sz = sizeof(struct ibv_exp_flow_spec_ipv4_ext),
@@ -221,6 +218,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
                                },
                        },
                },
+               .default_mask = &rte_flow_item_ipv6_mask,
                .mask_sz = sizeof(struct rte_flow_item_ipv6),
                .convert = mlx5_flow_create_ipv6,
                .dst_sz = sizeof(struct ibv_exp_flow_spec_ipv6),
@@ -234,6 +232,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
                                .dst_port = -1,
                        },
                },
+               .default_mask = &rte_flow_item_udp_mask,
                .mask_sz = sizeof(struct rte_flow_item_udp),
                .convert = mlx5_flow_create_udp,
                .dst_sz = sizeof(struct ibv_exp_flow_spec_tcp_udp),
@@ -246,6 +245,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
                                .dst_port = -1,
                        },
                },
+               .default_mask = &rte_flow_item_tcp_mask,
                .mask_sz = sizeof(struct rte_flow_item_tcp),
                .convert = mlx5_flow_create_tcp,
                .dst_sz = sizeof(struct ibv_exp_flow_spec_tcp_udp),
@@ -256,6 +256,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
                .mask = &(const struct rte_flow_item_vxlan){
                        .vni = "\xff\xff\xff",
                },
+               .default_mask = &rte_flow_item_vxlan_mask,
                .mask_sz = sizeof(struct rte_flow_item_vxlan),
                .convert = mlx5_flow_create_vxlan,
                .dst_sz = sizeof(struct ibv_exp_flow_spec_tunnel),