search for: mlx5_set

Displaying 17 results from an estimated 17 matches for "mlx5_set".

2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
..._F_SR_IOV); > +} > + > +static int create_tis(struct mlx5_vdpa_net *ndev) > +{ > + struct mlx5_vdpa_dev *mvdev = &ndev->mvdev; > + u32 in[MLX5_ST_SZ_DW(create_tis_in)] = {}; > + void *tisc; > + int err; > + > + tisc = MLX5_ADDR_OF(create_tis_in, in, ctx); > + MLX5_SET(tisc, tisc, transport_domain, ndev->res.tdn); > + err = mlx5_vdpa_create_tis(mvdev, in, &ndev->res.tisn); > + if (err) > + mlx5_vdpa_warn(mvdev, "create TIS (%d)\n", err); > + > + return err; > +} > + > +static void destroy_tis(struct mlx5_vdpa_net *ndev...
2020 Jul 16
0
[PATCH vhost next 08/10] vdpa/mlx5: Add support library for mlx5 VDPA implementation
...^~~~~~~~~~~~~~ include/linux/mlx5/device.h:76:20: note: in expansion of macro '__mlx5_dw_off' 76 | *((__be32 *)(p) + __mlx5_dw_off(typ, fld)) = \ | ^~~~~~~~~~~~~ drivers/vdpa/mlx5/core/resources.c:193:2: note: in expansion of macro 'MLX5_SET' 193 | MLX5_SET(create_mkey_in, in, uid, mvdev->res.uid); | ^~~~~~~~ In file included from include/linux/byteorder/big_endian.h:5, from arch/mips/include/uapi/asm/byteorder.h:13, from arch/mips/include/asm/bitops.h:20,...
2020 Aug 06
1
[PATCH][next] vdpa/mlx5: fix memory allocation failure checks
.../mlx5_vnet.c @@ -867,7 +867,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl *outlen = MLX5_ST_SZ_BYTES(qp_2rst_out); *in = kzalloc(*inlen, GFP_KERNEL); *out = kzalloc(*outlen, GFP_KERNEL); - if (!in || !out) + if (!*in || !*out) goto outerr; MLX5_SET(qp_2rst_in, *in, opcode, cmd); @@ -879,7 +879,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl *outlen = MLX5_ST_SZ_BYTES(rst2init_qp_out); *in = kzalloc(*inlen, GFP_KERNEL); *out = kzalloc(MLX5_ST_SZ_BYTES(rst2init_qp_out), GFP_KERNEL); - if (!in || !...
2020 Jul 16
0
[PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
...~~~~~~~~~~~~~~~ include/linux/mlx5/device.h:78:10: note: in expansion of macro '__mlx5_dw_mask' 78 | (~__mlx5_dw_mask(typ, fld))) | (((_v) & __mlx5_mask(typ, fld)) \ | ^~~~~~~~~~~~~~ drivers/vdpa/mlx5/core/mr.c:194:2: note: in expansion of macro 'MLX5_SET' 194 | MLX5_SET(create_mkey_in, in, uid, mvdev->res.uid); | ^~~~~~~~ include/linux/compiler_types.h:135:35: error: 'struct mlx5_ifc_create_mkey_in_bits' has no member named 'uid' 135 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)...
2023 Mar 27
0
[PATCH] vdpa/mlx5: Avoid losing link state updates
...gt; + return true; > + > + return false; > +} > + > +static u8 query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport) > +{ > + u32 out[MLX5_ST_SZ_DW(query_vport_state_out)] = {}; > + u32 in[MLX5_ST_SZ_DW(query_vport_state_in)] = {}; > + int err; > + > + MLX5_SET(query_vport_state_in, in, opcode, MLX5_CMD_OP_QUERY_VPORT_STATE); > + MLX5_SET(query_vport_state_in, in, op_mod, opmod); > + MLX5_SET(query_vport_state_in, in, vport_number, vport); > + if (vport) > + MLX5_SET(query_vport_state_in, in, other_vport, 1); > + > + err = mlx5_cmd_exec...
2023 Mar 21
0
[PATCH v3 1/2] vdpa/mlx5: Extend driver support for new features
...29,7 @@ static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtque > goto err_alloc; > } > > + mlx_features = get_features(ndev->mvdev.actual_features); > cmd_hdr = MLX5_ADDR_OF(create_virtio_net_q_in, in, general_obj_in_cmd_hdr); > > MLX5_SET(general_obj_in_cmd_hdr, cmd_hdr, opcode, MLX5_CMD_OP_CREATE_GENERAL_OBJECT); > @@ -822,7 +840,9 @@ static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtque > MLX5_SET(virtio_net_q_object, obj_context, hw_available_index, mvq->avail_idx); > MLX5_SET(virtio_n...
2023 Mar 17
0
[PATCH v2 1/2] vdpa/mlx5: Extend driver support for new features
...irtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtque > goto err_alloc; > } > > + mlx_features = get_features(ndev->mvdev.actual_features); > cmd_hdr = MLX5_ADDR_OF(create_virtio_net_q_in, in, general_obj_in_cmd_hdr); > > MLX5_SET(general_obj_in_cmd_hdr, cmd_hdr, opcode, MLX5_CMD_OP_CREATE_GENERAL_OBJECT); > @@ -822,7 +844,9 @@ static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtque > MLX5_SET(virtio_net_q_object, obj_context, hw_available_index, mvq->avail_idx); > MLX5_SE...
2023 Apr 03
0
[Patch v3] vdpa/mlx5: Avoid losing link state updates
...query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport) > >> +{ > >> + u32 out[MLX5_ST_SZ_DW(query_vport_state_out)] = {}; > >> + u32 in[MLX5_ST_SZ_DW(query_vport_state_in)] = {}; > >> + int err; > >> + > >> + MLX5_SET(query_vport_state_in, in, opcode, MLX5_CMD_OP_QUERY_VPORT_STATE); > >> + MLX5_SET(query_vport_state_in, in, op_mod, opmod); > >> + MLX5_SET(query_vport_state_in, in, vport_number, vport); > >> + if (vport) > >> + MLX5_SET(query_vpo...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...~~~~~~~~ include/linux/mlx5/device.h:78:10: note: in expansion of macro '__mlx5_dw_mask' 78 | (~__mlx5_dw_mask(typ, fld))) | (((_v) & __mlx5_mask(typ, fld)) \ | ^~~~~~~~~~~~~~ drivers/vdpa/mlx5/net/mlx5_vnet.c:1192:2: note: in expansion of macro 'MLX5_SET' 1192 | MLX5_SET(rqtc, rqtc, list_q_type, MLX5_RQTC_LIST_Q_TYPE_VIRTIO_NET_Q); | ^~~~~~~~ include/linux/compiler_types.h:135:35: error: 'struct mlx5_ifc_rqtc_bits' has no member named 'list_q_type' 135 | #define __compiler_offsetof(a, b) __builtin_offsetof...
2020 Jul 16
0
[PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
...~~~~~~~~~~~~~~~ include/linux/mlx5/device.h:78:10: note: in expansion of macro '__mlx5_dw_mask' 78 | (~__mlx5_dw_mask(typ, fld))) | (((_v) & __mlx5_mask(typ, fld)) \ | ^~~~~~~~~~~~~~ drivers/vdpa/mlx5/core/mr.c:194:2: note: in expansion of macro 'MLX5_SET' 194 | MLX5_SET(create_mkey_in, in, uid, mvdev->res.uid); | ^~~~~~~~ include/linux/mlx5/device.h:50:57: error: 'struct mlx5_ifc_create_mkey_in_bits' has no member named 'uid' 50 | #define __mlx5_bit_sz(typ, fld) sizeof(__mlx5_nullp(typ)->fld)...
2020 Aug 07
1
[PATCH] vdpa/mlx5: Fix erroneous null pointer checks
...lloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl > *outlen = MLX5_ST_SZ_BYTES(qp_2rst_out); > *in = kzalloc(*inlen, GFP_KERNEL); > *out = kzalloc(*outlen, GFP_KERNEL); > - if (!in || !out) > + if (!*in || !*out) > goto outerr; > > MLX5_SET(qp_2rst_in, *in, opcode, cmd); > @@ -879,7 +879,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl > *outlen = MLX5_ST_SZ_BYTES(rst2init_qp_out); > *in = kzalloc(*inlen, GFP_KERNEL); > *out = kzalloc(MLX5_ST_SZ_BYTES(rst2init_qp_out), GFP_K...
2020 Sep 28
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...vdpa_dev *mvdev, void *in, u32 *tisn) > > return err; > } > +EXPORT_SYMBOL(mlx5_vdpa_create_tis); > > void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn) > { > @@ -108,6 +109,7 @@ void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn) > MLX5_SET(destroy_tis_in, in, tisn, tisn); > mlx5_cmd_exec_in(mvdev->mdev, destroy_tis, in); > } > +EXPORT_SYMBOL(mlx5_vdpa_destroy_tis); > > int mlx5_vdpa_create_rqt(struct mlx5_vdpa_dev *mvdev, void *in, int inlen, u32 *rqtn) > { > @@ -121,6 +123,7 @@ int mlx5_vdpa_create_rqt...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...gt; > } > > > +EXPORT_SYMBOL(mlx5_vdpa_create_tis); > > > > > > void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn) > > > { > > > @@ -108,6 +109,7 @@ void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn) > > > MLX5_SET(destroy_tis_in, in, tisn, tisn); > > > mlx5_cmd_exec_in(mvdev->mdev, destroy_tis, in); > > > } > > > +EXPORT_SYMBOL(mlx5_vdpa_destroy_tis); > > > > > > int mlx5_vdpa_create_rqt(struct mlx5_vdpa_dev *mvdev, void *in, int inlen, u32 *rqtn) > &g...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...a_create_tis); > > > > > > > > > > void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn) > > > > > { > > > > > @@ -108,6 +109,7 @@ void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn) > > > > > MLX5_SET(destroy_tis_in, in, tisn, tisn); > > > > > mlx5_cmd_exec_in(mvdev->mdev, destroy_tis, in); > > > > > } > > > > > +EXPORT_SYMBOL(mlx5_vdpa_destroy_tis); > > > > > > > > > > int mlx5_vdpa_create_rqt(struct mlx5_vdpa_d...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...> > > > > > > void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn) > > > > > > > { > > > > > > > @@ -108,6 +109,7 @@ void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn) > > > > > > > MLX5_SET(destroy_tis_in, in, tisn, tisn); > > > > > > > mlx5_cmd_exec_in(mvdev->mdev, destroy_tis, in); > > > > > > > } > > > > > > > +EXPORT_SYMBOL(mlx5_vdpa_destroy_tis); > > > > > > > > > > > > >...
2023 Aug 31
2
[PATCH v2] vdpa/mlx5: Fix firmware error on creation of 1k VQs
...AP_VDPA_EMULATION << 1) | (HCA_CAP_OPMOD_GET_CUR & 0x01); + struct mlx5_core_dev *mdev = ndev->mvdev.mdev; + int out_size; + void *caps; + void *out; + int err; + + out_size = MLX5_ST_SZ_BYTES(query_hca_cap_out); + out = kzalloc(out_size, GFP_KERNEL); + if (!out) + return -ENOMEM; + + MLX5_SET(query_hca_cap_in, in, opcode, MLX5_CMD_OP_QUERY_HCA_CAP); + MLX5_SET(query_hca_cap_in, in, op_mod, opmod); + err = mlx5_cmd_exec_inout(mdev, query_hca_cap, in, out); + if (err) { + mlx5_vdpa_warn(&ndev->mvdev, + "Failed reading vdpa umem capabilities with err %d\n", err); + got...
2020 Nov 01
12
[PATCH mlx5-next v1 00/11] Convert mlx5 to use auxiliary bus
From: Leon Romanovsky <leonro at nvidia.com> Changelog: v1: * Renamed _mlx5_rescan_driver to be mlx5_rescan_driver_locked like in other parts of the mlx5 driver. * Renamed MLX5_INTERFACE_PROTOCOL_VDPA to tbe MLX5_INTERFACE_PROTOCOL_VNET as a preparation to coming series from Eli C. * Some small naming renames in mlx5_vdpa. * Refactored adev index code to make Parav's SF series