aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mlx5/main.c')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 1b4094baa2de..e19537cf44ab 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -288,7 +288,9 @@ __be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev, u8 port_num,
288 288
289static int mlx5_use_mad_ifc(struct mlx5_ib_dev *dev) 289static int mlx5_use_mad_ifc(struct mlx5_ib_dev *dev)
290{ 290{
291 return !MLX5_CAP_GEN(dev->mdev, ib_virt); 291 if (MLX5_CAP_GEN(dev->mdev, port_type) == MLX5_CAP_PORT_TYPE_IB)
292 return !MLX5_CAP_GEN(dev->mdev, ib_virt);
293 return 0;
292} 294}
293 295
294enum { 296enum {
@@ -1428,6 +1430,13 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v,
1428 dmac_47_16), 1430 dmac_47_16),
1429 ib_spec->eth.val.dst_mac); 1431 ib_spec->eth.val.dst_mac);
1430 1432
1433 ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4, outer_headers_c,
1434 smac_47_16),
1435 ib_spec->eth.mask.src_mac);
1436 ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4, outer_headers_v,
1437 smac_47_16),
1438 ib_spec->eth.val.src_mac);
1439
1431 if (ib_spec->eth.mask.vlan_tag) { 1440 if (ib_spec->eth.mask.vlan_tag) {
1432 MLX5_SET(fte_match_set_lyr_2_4, outer_headers_c, 1441 MLX5_SET(fte_match_set_lyr_2_4, outer_headers_c,
1433 vlan_tag, 1); 1442 vlan_tag, 1);
@@ -1849,6 +1858,7 @@ static struct ib_flow *mlx5_ib_create_flow(struct ib_qp *qp,
1849 int domain) 1858 int domain)
1850{ 1859{
1851 struct mlx5_ib_dev *dev = to_mdev(qp->device); 1860 struct mlx5_ib_dev *dev = to_mdev(qp->device);
1861 struct mlx5_ib_qp *mqp = to_mqp(qp);
1852 struct mlx5_ib_flow_handler *handler = NULL; 1862 struct mlx5_ib_flow_handler *handler = NULL;
1853 struct mlx5_flow_destination *dst = NULL; 1863 struct mlx5_flow_destination *dst = NULL;
1854 struct mlx5_ib_flow_prio *ft_prio; 1864 struct mlx5_ib_flow_prio *ft_prio;
@@ -1875,7 +1885,10 @@ static struct ib_flow *mlx5_ib_create_flow(struct ib_qp *qp,
1875 } 1885 }
1876 1886
1877 dst->type = MLX5_FLOW_DESTINATION_TYPE_TIR; 1887 dst->type = MLX5_FLOW_DESTINATION_TYPE_TIR;
1878 dst->tir_num = to_mqp(qp)->raw_packet_qp.rq.tirn; 1888 if (mqp->flags & MLX5_IB_QP_RSS)
1889 dst->tir_num = mqp->rss_qp.tirn;
1890 else
1891 dst->tir_num = mqp->raw_packet_qp.rq.tirn;
1879 1892
1880 if (flow_attr->type == IB_FLOW_ATTR_NORMAL) { 1893 if (flow_attr->type == IB_FLOW_ATTR_NORMAL) {
1881 if (flow_attr->flags & IB_FLOW_ATTR_FLAGS_DONT_TRAP) { 1894 if (flow_attr->flags & IB_FLOW_ATTR_FLAGS_DONT_TRAP) {