Re: [PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
Hi Eli, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20200715] url: https://github.com/0day-ci/linux/commits/Eli-Cohen/VDPA-support-for-Mellanox-ConnectX-devices/20200716-155039 base:ca0e494af5edb59002665bf12871e94b4163a257 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): 120 | __fswab32(x)) |^ include/linux/byteorder/generic.h:94:21: note: in expansion of macro '__cpu_to_be32' 94 | #define cpu_to_be32 __cpu_to_be32 | ^ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) |^~~ include/linux/mlx5/device.h:51:35: note: in expansion of macro 'offsetof' 51 | #define __mlx5_bit_off(typ, fld) (offsetof(struct mlx5_ifc_##typ##_bits, fld)) | ^~~~ include/linux/mlx5/device.h:56:70: note: in expansion of macro '__mlx5_bit_off' 56 | #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - (__mlx5_bit_off(typ, fld) & 0x1f)) | ^~ include/linux/mlx5/device.h:58:60: note: in expansion of macro '__mlx5_dw_bit_off' 58 | #define __mlx5_dw_mask(typ, fld) (__mlx5_mask(typ, fld) << __mlx5_dw_bit_off(typ, fld)) | ^ 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) | ^~ include/uapi/linux/swab.h:120:12: note: in definition of macro '__swab32' 120 | __fswab32(x)) |^ include/linux/byteorder/generic.h:94:21: note: in expansion of macro '__cpu_to_be32' 94 | #define cpu_to_be32 __cpu_to_be32 | ^ include/linux/mlx5/device.h:57:47: note: in expansion of macro '__mlx5_bit_sz' 57 | #define __mlx5_mask(typ, fld) ((u32)((1ull << __mlx5_bit_sz(typ, fld)) - 1)) | ^ include/linux/mlx5/device.h:78:48: note: in expansion of macro '__mlx5_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) | ^~ include/uapi/linux/swab.h:120:12: note: in definition of macro '__swab32' 120 | __fswab32(x)) |^ include/linux/byteorder/generic.h:94:21: note: in expansion of macro '__cpu_to_be32' 94 | #define cpu_to_be32 __cpu_to_be32 | ^ include/linux/mlx5/device.h:56:43: note: in expansion of macro '__mlx5_bit_sz' 56 | #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - (__mlx5_bit_off(typ, fld) & 0x1f)) | ^ include/linux/mlx5/device.h:79:11: note: in expansion of macro '__mlx5_dw_bit_off' 79 |<< __mlx5_dw_bit_off(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) |
Re: [PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
Hi Eli, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20200715] url: https://github.com/0day-ci/linux/commits/Eli-Cohen/VDPA-support-for-Mellanox-ConnectX-devices/20200716-155039 base:ca0e494af5edb59002665bf12871e94b4163a257 config: i386-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-14) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): include/linux/mlx5/device.h:56:43: note: in expansion of macro '__mlx5_bit_sz' 56 | #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - (__mlx5_bit_off(typ, fld) & 0x1f)) | ^ include/linux/mlx5/device.h:58:60: note: in expansion of macro '__mlx5_dw_bit_off' 58 | #define __mlx5_dw_mask(typ, fld) (__mlx5_mask(typ, fld) << __mlx5_dw_bit_off(typ, fld)) | ^ 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) | ^~ include/uapi/linux/swab.h:115:54: note: in definition of macro '__swab32' 115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) | ^ include/linux/byteorder/generic.h:94:21: note: in expansion of macro '__cpu_to_be32' 94 | #define cpu_to_be32 __cpu_to_be32 | ^ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) |^~~ include/linux/mlx5/device.h:51:35: note: in expansion of macro 'offsetof' 51 | #define __mlx5_bit_off(typ, fld) (offsetof(struct mlx5_ifc_##typ##_bits, fld)) | ^~~~ include/linux/mlx5/device.h:56:70: note: in expansion of macro '__mlx5_bit_off' 56 | #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - (__mlx5_bit_off(typ, fld) & 0x1f)) | ^~ include/linux/mlx5/device.h:58:60: note: in expansion of macro '__mlx5_dw_bit_off' 58 | #define __mlx5_dw_mask(typ, fld) (__mlx5_mask(typ, fld) << __mlx5_dw_bit_off(typ, fld)) | ^ 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) | ^~ include/uapi/linux/swab.h:115:54: note: in definition of macro '__swab32' 115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) | ^ include/linux/byteorder/generic.h:94:21: note: in expansion of macro '__cpu_to_be32' 94 | #define cpu_to_be32 __cpu_to_be32 | ^ include/linux/mlx5/device.h:57:47: note: in expansion of macro '__mlx5_bit_sz' 57 | #define __mlx5_mask(typ, fld) ((u32)((1ull << __mlx5_bit_sz(typ, fld)) - 1)) | ^ include/linux/mlx5/device.h:78:48: note: in expansion of macro '__mlx5_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)
Re: [PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
On 2020/7/16 下午4:28, Eli Cohen wrote: On Thu, Jul 16, 2020 at 04:13:21PM +0800, Jason Wang wrote: On 2020/7/16 下午3:23, Eli Cohen wrote: Add code to support registering guest's memory region for the device. It would be better to use "userspace" memory here since vhost-vDPA could be used by e.g dpdk application on the host in the future. How about replaciing "guest's memory" with "address space". It is more general and aligns with the with the fact that virio driver can run in the guest's kernel. Probably but note that guest driver is not the only user for this. It could be either: 1) Guest virtio driver 2) Userspace virtio driver on the host 3) Kernel virtio driver on the host. Thanks ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
On 2020/7/16 下午3:23, Eli Cohen wrote: Add code to support registering guest's memory region for the device. It would be better to use "userspace" memory here since vhost-vDPA could be used by e.g dpdk application on the host in the future. Thanks ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization