From: Jason Gunthorpe Date: Sat, 29 Jun 2019 00:18:23 +0000 (-0300) Subject: Merge tag 'v5.2-rc6' into rdma.git for-next X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=371bb62158d53c1fc33e2fb9b6aeb9522caf6cf4;p=linux.git Merge tag 'v5.2-rc6' into rdma.git for-next For dependencies in next patches. Resolve conflicts: - Use uverbs_get_cleared_udata() with new cq allocation flow - Continue to delete nes despite SPDX conflict - Resolve list appends in mlx5_command_str() - Use u16 for vport_rule stuff - Resolve list appends in struct ib_client Signed-off-by: Jason Gunthorpe --- 371bb62158d53c1fc33e2fb9b6aeb9522caf6cf4 diff --cc drivers/infiniband/core/uverbs_cmd.c index 911533081db5d,63fe14c7c68fc..750c4d484329c --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@@ -1047,10 -1053,8 +1058,10 @@@ static struct ib_ucq_object *create_cq( return obj; err_cb: - ib_destroy_cq(cq); + ib_destroy_cq_user(cq, uverbs_get_cleared_udata(attrs)); - + cq = NULL; +err_free: + kfree(cq); err_file: if (ev_file) ib_uverbs_release_ucq(attrs->ufile, ev_file, obj); diff --cc drivers/infiniband/core/uverbs_std_types_cq.c index 06b8c7d017b70,07ea4e3c45663..e39fe6a8aac43 --- a/drivers/infiniband/core/uverbs_std_types_cq.c +++ b/drivers/infiniband/core/uverbs_std_types_cq.c @@@ -140,10 -135,8 +140,10 @@@ static int UVERBS_HANDLER(UVERBS_METHOD return 0; err_cq: - ib_destroy_cq(cq); + ib_destroy_cq_user(cq, uverbs_get_cleared_udata(attrs)); - + cq = NULL; +err_free: + kfree(cq); err_event_file: if (ev_file) uverbs_uobject_put(ev_file_uobj); diff --cc drivers/infiniband/hw/hns/hns_roce_hw_v1.c index 2c0bc2536fda7,e068a02122f5e..056a6873df7a1 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c @@@ -899,9 -894,12 +899,10 @@@ static void hns_roce_v1_release_lp_qp(s i, ret); } - ret = hns_roce_ib_destroy_cq(&free_mr->mr_free_cq->ib_cq, NULL); - if (ret) - dev_err(dev, "Destroy cq for mr_free failed(%d)!\n", ret); - + hns_roce_ib_destroy_cq(&free_mr->mr_free_cq->ib_cq, NULL); + kfree(&free_mr->mr_free_cq->ib_cq); hns_roce_dealloc_pd(&free_mr->mr_free_pd->ibpd, NULL); + kfree(&free_mr->mr_free_pd->ibpd); } static int hns_roce_db_init(struct hns_roce_dev *hr_dev) diff --cc drivers/net/ethernet/mellanox/mlx5/core/cmd.c index 7d3aec98e31fa,e94686c420004..8cdd7e66f8df5 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@@ -628,7 -632,11 +632,11 @@@ const char *mlx5_command_str(int comman MLX5_COMMAND_STR_CASE(QUERY_MODIFY_HEADER_CONTEXT); MLX5_COMMAND_STR_CASE(ALLOC_MEMIC); MLX5_COMMAND_STR_CASE(DEALLOC_MEMIC); - MLX5_COMMAND_STR_CASE(QUERY_HOST_PARAMS); + MLX5_COMMAND_STR_CASE(QUERY_ESW_FUNCTIONS); + MLX5_COMMAND_STR_CASE(CREATE_UCTX); + MLX5_COMMAND_STR_CASE(DESTROY_UCTX); + MLX5_COMMAND_STR_CASE(CREATE_UMEM); + MLX5_COMMAND_STR_CASE(DESTROY_UMEM); default: return "unknown command opcode"; } } diff --cc include/linux/mlx5/eswitch.h index 174eec0871d99,cf226c1903299..ee1335ab1df0f --- a/include/linux/mlx5/eswitch.h +++ b/include/linux/mlx5/eswitch.h @@@ -62,16 -59,5 +62,16 @@@ void *mlx5_eswitch_uplink_get_proto_dev u8 mlx5_eswitch_mode(struct mlx5_eswitch *esw); struct mlx5_flow_handle * mlx5_eswitch_add_send_to_vport_rule(struct mlx5_eswitch *esw, - int vport, u32 sqn); + u16 vport_num, u32 sqn); + +#ifdef CONFIG_MLX5_ESWITCH +enum devlink_eswitch_encap_mode +mlx5_eswitch_get_encap_mode(const struct mlx5_core_dev *dev); +#else /* CONFIG_MLX5_ESWITCH */ +static inline enum devlink_eswitch_encap_mode +mlx5_eswitch_get_encap_mode(const struct mlx5_core_dev *dev) +{ + return DEVLINK_ESWITCH_ENCAP_MODE_NONE; +} +#endif /* CONFIG_MLX5_ESWITCH */ #endif diff --cc include/rdma/ib_verbs.h index e2478b74551d2,54873085f2dab..26e9c2594913e --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@@ -2585,9 -2698,7 +2585,10 @@@ struct ib_client const char *name; void (*add) (struct ib_device *); void (*remove)(struct ib_device *, void *client_data); + void (*rename)(struct ib_device *dev, void *client_data); + int (*get_nl_info)(struct ib_device *ibdev, void *client_data, + struct ib_client_nl_info *res); + int (*get_global_nl_info)(struct ib_client_nl_info *res); /* Returns the net_dev belonging to this ib_client and matching the * given parameters.