drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function 'mlx5_msix_free' is invalid in C99]
Subsystems (6)
Michael S. Tsirkin
maintainerPATCH 13449/13717 drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function 'mlx5_msix_free' is invalid in C99]
CC Dragos.
Does one of you want to post a MAINTAINERS patch btw?
----- Forwarded message from kernel test robot <[email protected]> -----
From: kernel test robot <[email protected]>
Date: Sun, 23 Apr 2023 07:29:38 +0800
To: Eli Cohen <[email protected]>
Cc: [email protected], [email protected], Linux Memory Management List <[email protected]>, "Michael S. Tsirkin"
<[email protected]>, Saeed Mahameed <[email protected]>
Subject: [linux-next:master 13449/13717] drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function
'mlx5_msix_free' is invalid in C99
Message-ID: <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d3e1ee0e67e7603d36f4fa2fec6b881c01aabe89 commit: b9ca712f33f59e977592cb639c2e00a02f45a146 [13449/13717] vdpa/mlx5: Support interrupt bypassing config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20230423/[email protected]/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b9ca712f33f59e977592cb639c2e00a02f45a146
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout b9ca712f33f59e977592cb639c2e00a02f45a146
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/xen/ drivers/power/supply/ drivers/vdpa/mlx5/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Note: the linux-next/master HEAD d3e1ee0e67e7603d36f4fa2fec6b881c01aabe89 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function 'mlx5_msix_free' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
mlx5_msix_free(ndev->mvdev.mdev, ent->map);
^
drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: note: did you mean 'mlx5_db_free'?
include/linux/mlx5/driver.h:1083:6: note: 'mlx5_db_free' declared here
void mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db);
^Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:14: error: implicit declaration of function 'mlx5_msix_alloc' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ent->map = mlx5_msix_alloc(ndev->mvdev.mdev, int_handler, NULL, ent->name);
^
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:14: note: did you mean 'mlx5_db_alloc'?
include/linux/mlx5/driver.h:1078:19: note: 'mlx5_db_alloc' declared here
static inline int mlx5_db_alloc(struct mlx5_core_dev *dev, struct mlx5_db *db)
^Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:12: error: assigning to 'structmsi_map' from incompatible type 'int'
ent->map = mlx5_msix_alloc(ndev->mvdev.mdev, int_handler, NULL, ent->name);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~3 errors generated.
vim +/mlx5_msix_free +2896 drivers/vdpa/mlx5/net/mlx5_vnet.c
2885
2886 static void free_irqs(struct mlx5_vdpa_net *ndev)
2887 {
2888 struct mlx5_vdpa_irq_pool_entry *ent;
2889 int i;
2890
2891 if (!msix_mode_supported(&ndev->mvdev))
2892 return;
2893
2894 for (i = ndev->irqp.num_ent - 1; i >= 0; i--) {
2895 ent = ndev->irqp.entries + i;
Quoted 1 line
2896
mlx5_msix_free(ndev->mvdev.mdev, ent->map);
2897 }
2898 kfree(ndev->irqp.entries);
2899 }
2900
Signature · 4 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests ----- End forwarded message -----
Are you referring to kernel robot warning or to updating MAINTAINERS? I was not the maintainer of anything so not sure what you mean here.
Quoted 122 lines
-----Original Message-----
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, 23 April 2023 10:11
To: Dragos Tatulea <[email protected]>; Eli Cohen <[email protected]>
Cc: [email protected]; [email protected]; Linux Memory Management List <[email protected]>; Michael S. Tsirkin <[email protected]>; Saeed Mahameed <[email protected]>
Subject: [[email protected]: [linux-next:master 13449/13717]drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function 'mlx5_msix_free' is invalid in C99]CC Dragos.
Does one of you want to post aMAINTAINERSpatch btw?----- Forwarded message from kernel test robot <[email protected]> -----
From: kernel test robot <[email protected]>
Date: Sun, 23 Apr 2023 07:29:38 +0800
To: Eli Cohen <[email protected]>
Cc: [email protected], [email protected], Linux Memory Management List <[email protected]>, "Michael S. Tsirkin"
<[email protected]>, Saeed Mahameed <[email protected]>
Subject: [linux-next:master 13449/13717]drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function
'mlx5_msix_free' is invalid in C99
Message-ID: <[email protected]>tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
master
head:d3e1ee0e67e7603d36f4fa2fec6b881c01aabe89
commit:b9ca712f33f59e977592cb639c2e00a02f45a146[13449/13717] vdpa/mlx5: Support interrupt bypassing
config: x86_64-allmodconfig (https://download.01.org/0day-
ci/archive/20230423/[email protected]/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-projectf28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-
next.git/commit/?id=b9ca712f33f59e977592cb639c2e00a02f45a146
git remote add linux-next
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitgit fetch --no-tags linux-next master git checkout b9ca712f33f59e977592cb639c2e00a02f45a146 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.crossW=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
W=1 O=build_dir ARCH=x86_64 SHELL=/bin/basharch/x86/xen/drivers/power/supply/drivers/vdpa/mlx5/If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/202304230755.9jjF6ZJr-
[email protected]/Note: the linux-next/master HEAD
d3e1ee0e67e7603d36f4fa2fec6b881c01aabe89builds fine.
It may have been fixed somewhere.All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration offunction '
mlx5_msix_free' is invalid in C99 [-Werror,-Wimplicit-function- declaration]mlx5_msix_free(ndev->mvdev.mdev, ent->map); ^ drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: note: did you mean 'mlx5_db_free'? include/linux/mlx5/driver.h:1083:6: note: 'mlx5_db_free' declared here void mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db); ^Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:14: error: implicit declaration offunction '
mlx5_msix_alloc' is invalid in C99 [-Werror,-Wimplicit-function- declaration]ent->map = mlx5_msix_alloc(ndev->mvdev.mdev, int_handler, NULL, ent->name); ^
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:14: note: did you mean
'mlx5_db_alloc'?
include/linux/mlx5/driver.h:1078:19: note: 'mlx5_db_alloc' declared here static inline int mlx5_db_alloc(structmlx5_core_dev*dev, structmlx5_db
*db)^Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:12: error: assigning to 'struct
msi_map' from incompatible type 'int'ent->map = mlx5_msix_alloc(ndev->mvdev.mdev, int_handler, NULL, ent->name); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.vim +/mlx5_msix_free +2896
drivers/vdpa/mlx5/net/mlx5_vnet.c2885
2886 static voidfree_irqs(struct mlx5_vdpa_net *ndev)
2887 {
2888 structmlx5_vdpa_irq_pool_entry*ent;
2889 int i;
2890
2891 if (!msix_mode_supported(&ndev->mvdev))
2892 return;
2893
2894 for (i =ndev->irqp.num_ent- 1; i >= 0; i--) {
2895 ent =ndev->irqp.entries+ i;Quoted 1 line
2896
mlx5_msix_free(ndev->mvdev.mdev, ent->map);2897 }
2898kfree(ndev->irqp.entries);
2899 }
2900--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests----- End forwarded message -----
Michael S. Tsirkin
maintainerSorry got confused. Referring to the robot warning here.
Quoted 126 lines · Eli Cohen
Are you referring to kernel robot warning or to updating
MAINTAINERS? I was not the maintainer of anything so not sure what you mean here.Quoted 122 lines
-----Original Message-----
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, 23 April 2023 10:11
To: Dragos Tatulea <[email protected]>; Eli Cohen <[email protected]>
Cc: [email protected]; [email protected]; Linux Memory Management List <[email protected]>; Michael S. Tsirkin <[email protected]>; Saeed Mahameed <[email protected]>
Subject: [[email protected]: [linux-next:master 13449/13717]drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function 'mlx5_msix_free' is invalid in C99]CC Dragos.
Does one of you want to post aMAINTAINERSpatch btw?----- Forwarded message from kernel test robot <[email protected]> -----
From: kernel test robot <[email protected]>
Date: Sun, 23 Apr 2023 07:29:38 +0800
To: Eli Cohen <[email protected]>
Cc: [email protected], [email protected], Linux Memory Management List <[email protected]>, "Michael S. Tsirkin"
<[email protected]>, Saeed Mahameed <[email protected]>
Subject: [linux-next:master 13449/13717]drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function
'mlx5_msix_free' is invalid in C99
Message-ID: <[email protected]>tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
master
head:d3e1ee0e67e7603d36f4fa2fec6b881c01aabe89
commit:b9ca712f33f59e977592cb639c2e00a02f45a146[13449/13717] vdpa/mlx5: Support interrupt bypassing
config: x86_64-allmodconfig (https://download.01.org/0day-
ci/archive/20230423/[email protected]/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-projectf28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-
next.git/commit/?id=b9ca712f33f59e977592cb639c2e00a02f45a146
git remote add linux-next
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitgit fetch --no-tags linux-next master git checkout b9ca712f33f59e977592cb639c2e00a02f45a146 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.crossW=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
W=1 O=build_dir ARCH=x86_64 SHELL=/bin/basharch/x86/xen/drivers/power/supply/drivers/vdpa/mlx5/If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/202304230755.9jjF6ZJr-
[email protected]/Note: the linux-next/master HEAD
d3e1ee0e67e7603d36f4fa2fec6b881c01aabe89builds fine.
It may have been fixed somewhere.All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration offunction '
mlx5_msix_free' is invalid in C99 [-Werror,-Wimplicit-function- declaration]mlx5_msix_free(ndev->mvdev.mdev, ent->map); ^ drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: note: did you mean 'mlx5_db_free'? include/linux/mlx5/driver.h:1083:6: note: 'mlx5_db_free' declared here void mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db); ^Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:14: error: implicit declaration offunction '
mlx5_msix_alloc' is invalid in C99 [-Werror,-Wimplicit-function- declaration]ent->map = mlx5_msix_alloc(ndev->mvdev.mdev, int_handler, NULL, ent->name); ^
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:14: note: did you mean
'mlx5_db_alloc'?
include/linux/mlx5/driver.h:1078:19: note: 'mlx5_db_alloc' declared here static inline int mlx5_db_alloc(structmlx5_core_dev*dev, structmlx5_db
*db)^Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:12: error: assigning to 'struct
msi_map' from incompatible type 'int'ent->map = mlx5_msix_alloc(ndev->mvdev.mdev, int_handler, NULL, ent->name); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.vim +/mlx5_msix_free +2896
drivers/vdpa/mlx5/net/mlx5_vnet.c2885
2886 static voidfree_irqs(struct mlx5_vdpa_net *ndev)
2887 {
2888 structmlx5_vdpa_irq_pool_entry*ent;
2889 int i;
2890
2891 if (!msix_mode_supported(&ndev->mvdev))
2892 return;
2893
2894 for (i =ndev->irqp.num_ent- 1; i >= 0; i--) {
2895 ent =ndev->irqp.entries+ i;Quoted 1 line
2896
mlx5_msix_free(ndev->mvdev.mdev, ent->map);2897 }
2898kfree(ndev->irqp.entries);
2899 }
2900--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests----- End forwarded message -----
Michael,
You applied the vdpa patch without rebasing on net-next where the related mlx5_core is available:git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main
I wonder though why the code is still not in Linus' tree.
Moreover, I am waiting for Saeed to send out another mlx5_core patch (attached as 0001-net-mlx5_core-Modify-mlx5_msix_alloc-free-to-not-req.patch):
After which I want to send the vdpa patch: 0002-vdpa-mlx5-Support-interrupt-bypassing.patch
Quoted 107 lines
-----Original Message-----
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, 23 April 2023 13:50
To: Eli Cohen <[email protected]>
Cc: Dragos Tatulea <[email protected]>; [email protected]; oe-kbuild- [email protected]; Linux Memory Management List <[email protected]>; Saeed Mahameed <[email protected]>
Subject: Re: [[email protected]: [linux-next:master 13449/13717]drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function 'mlx5_msix_free' is invalid in C99]Sorry got confused. Referring to the robot warning here.
Quoted 54 lines · Eli Cohen
Are you referring to kernel robot warning or to updating
MAINTAINERS? I was not the maintainer of anything so not sure what you mean here.Quoted 51 lines
-----Original Message-----
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, 23 April 2023 10:11
To: Dragos Tatulea <[email protected]>; Eli Cohen <[email protected]>
Cc: [email protected]; [email protected]; Linux Memory Management List <[email protected]>; Michael S. Tsirkin <[email protected]>; Saeed Mahameed <[email protected]>
Subject: [[email protected]: [linux-next:master 13449/13717]drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function 'mlx5_msix_free' is invalid in C99]CC Dragos.
Does one of you want to post aMAINTAINERSpatch btw?----- Forwarded message from kernel test robot <[email protected]> -----
From: kernel test robot <[email protected]>
Date: Sun, 23 Apr 2023 07:29:38 +0800
To: Eli Cohen <[email protected]>
Cc: [email protected], [email protected], Linux Memory Management List <[email protected]>, "Michael S. Tsirkin"
<[email protected]>, Saeed Mahameed <[email protected]>
Subject: [linux-next:master 13449/13717]drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declaration of function
'mlx5_msix_free' is invalid in C99
Message-ID: <[email protected]>tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
master
head:d3e1ee0e67e7603d36f4fa2fec6b881c01aabe89
commit:b9ca712f33f59e977592cb639c2e00a02f45a146[13449/13717] vdpa/mlx5: Support interrupt bypassing
config: x86_64-allmodconfig (https://download.01.org/0day-
ci/archive/20230423/[email protected]/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-projectf28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-
next.git/commit/?id=b9ca712f33f59e977592cb639c2e00a02f45a146
git remote add linux-next
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitgit fetch --no-tags linux-next master git checkout b9ca712f33f59e977592cb639c2e00a02f45a146 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clangmake.cross
Quoted 2 lines
Quoted 2 lines
W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clangmake.cross
Quoted 8 lines
Quoted 8 lines
W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
arch/x86/xen/drivers/power/supply/drivers/vdpa/mlx5/If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/202304230755.9jjF6ZJr-
[email protected]/Quoted 7 lines
Quoted 7 lines
Note: the linux-next/master HEAD
d3e1ee0e67e7603d36f4fa2fec6b881c01aabe89builds fine.
It may have been fixed somewhere.All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: error: implicit declarationof
Quoted 10 lines
Quoted 10 lines
function '
mlx5_msix_free' is invalid in C99 [-Werror,-Wimplicit-function- declaration]mlx5_msix_free(ndev->mvdev.mdev, ent->map); ^ drivers/vdpa/mlx5/net/mlx5_vnet.c:2896:3: note: did you mean 'mlx5_db_free'? include/linux/mlx5/driver.h:1083:6: note: 'mlx5_db_free' declared here void mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db); ^Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:14: error: implicit declarationof
Quoted 8 lines
Quoted 8 lines
function '
mlx5_msix_alloc' is invalid in C99 [-Werror,-Wimplicit-function- declaration]ent->map = mlx5_msix_alloc(ndev->mvdev.mdev, int_handler, NULL, ent->name); ^
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:14: note: did you mean
'mlx5_db_alloc'?
include/linux/mlx5/driver.h:1078:19: note: 'mlx5_db_alloc' declared
Quoted 40 lines
here
Quoted 1 line
Quoted 1 line
static inline int mlx5_db_alloc(struct
mlx5_core_dev*dev, struct
mlx5_dbQuoted 37 lines
Quoted 13 lines
*db)
^Quoted 1 line
Quoted 1 line
drivers/vdpa/mlx5/net/mlx5_vnet.c:3259:12: error: assigning to 'struct
msi_map' from incompatible type 'int'ent->map = mlx5_msix_alloc(ndev->mvdev.mdev, int_handler, NULL, ent->name); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.vim +/mlx5_msix_free +2896
drivers/vdpa/mlx5/net/mlx5_vnet.cQuoted 12 lines
2885
2886 static voidfree_irqs(struct mlx5_vdpa_net *ndev)
2887 {
2888 structmlx5_vdpa_irq_pool_entry*ent;
2889 int i;
2890
2891 if (!msix_mode_supported(&ndev->mvdev))
2892 return;
2893
2894 for (i =ndev->irqp.num_ent- 1; i >= 0; i--) {
2895 ent =ndev->irqp.entries+ i;Quoted 1 line
2896 mlx5_msix_free(ndev->mvdev.mdev, ent-
map);
Quoted 10 lines
2897 } 2898 kfree(ndev->irqp.entries); 2899 } 2900--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests----- End forwarded message -----
From 20068dcf37dbc3fdfe30706ded4d5c18f32f22c4 Mon Sep 17 00:00:00 2001
From: Eli Cohen <[email protected]>
Date: Wed, 19 Apr 2023 16:55:41 +0300
Subject: [PATCH 1/2] net/mlx5_core: Modify mlx5_msix_alloc/free to not
request/free irq
Leave that task to the caller so it can control whether it wants to add private data to be passed to the handler.
--- .../net/ethernet/mellanox/mlx5/core/pci_irq.c | 21 ++----------------- include/linux/mlx5/driver.h | 4 +--- 2 files changed, 3 insertions(+), 22 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c +2 -19
@@ -486,21 +486,16 @@ struct mlx5_irq *mlx5_irq_request(struct mlx5_core_dev *dev, u16 vecidx,/** * mlx5_msix_alloc - allocate msix interrupt * @dev: mlx5 device from which to request -* @handler: interrupt handler * @affdesc: affinity descriptor -* @name: interrupt name * * Returns: struct msi_map with result encoded. * Note: the caller must make sure to release the irq by calling * mlx5_msix_free() if shutdown was initiated. */ struct msi_map mlx5_msix_alloc (struct mlx5_core_dev *dev, -irqreturn_t (*handler)(int ,void *), -const struct irq_affinity_desc *affdesc, -const char *name) +const struct irq_affinity_desc *affdesc) {struct msi_map map; -int err;if (!dev->pdev) { map.virq =0 ;
@@ -508,18 +503,7 @@ struct msi_map mlx5_msix_alloc(struct mlx5_core_dev *dev,return map; } - map =pci_msix_alloc_irq_at (dev->pdev,MSI_ANY_INDEX , affdesc); -if (!map.virq) -return map; - - err =request_irq (map.virq, handler,0 , name,NULL ); -if (err) { -mlx5_core_warn (dev,"err %d\n" , err); -pci_msix_free_irq (dev->pdev, map); - map.virq =0 ; - map.index = -ENOMEM ; - } -return map; +return pci_msix_alloc_irq_at (dev->pdev,MSI_ANY_INDEX , affdesc); }EXPORT_SYMBOL (mlx5_msix_alloc);
@@ -530,7 +514,6 @@ EXPORT_SYMBOL(mlx5_msix_alloc);*/ void mlx5_msix_free (struct mlx5_core_dev *dev,struct msi_map map) { -free_irq (map.virq,NULL );pci_msix_free_irq (dev->pdev, map); }EXPORT_SYMBOL (mlx5_msix_free);
include/linux/mlx5/driver.h +1 -3
@@ -1313,9 +1313,7 @@ enum { };struct msi_map mlx5_msix_alloc (struct mlx5_core_dev *dev, -irqreturn_t (*handler)(int ,void *), -const struct irq_affinity_desc *affdesc, -const char *name); +const struct irq_affinity_desc *affdesc);void mlx5_msix_free (struct mlx5_core_dev *dev,struct msi_map map);#endif /* MLX5_DRIVER_H */
Signature · 1 line
2.39.2
From 23695859d32bb69907bdd33beaba4fb2a70d1e2e Mon Sep 17 00:00:00 2001
From: Eli Cohen <[email protected]>
Date: Thu, 5 Jan 2023 15:09:13 +0200
Subject: [PATCH 2/2] vdpa/mlx5: Support interrupt bypassing
Add support for generation of interrupts from the device directly to the VM to the VCPU thus avoiding the overhead on the host CPU.
When supported, the driver will attempt to allocate vectors for each data virtqueue. If a vector for a virtqueue cannot be provided it will use the QP mode where notifications go through the driver.
In addition, we add a shutdown callback to make sure allocated interrupts are released in case of shutdown to allow clean shutdown.
Issue: 2211199
--- drivers/vdpa/mlx5/net/mlx5_vnet.c | 157 ++++++++++++++++++++++++++++-- drivers/vdpa/mlx5/net/mlx5_vnet.h | 15 +++ 2 files changed, 163 insertions(+), 9 deletions(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +148 -9
271 lines not on this page · raw message
drivers/vdpa/mlx5/net/mlx5_vnet.h +15 -0
@@ -26,6 +26,20 @@ static inline u16 key2vid(u64 key)return (u16)(key >>48 ) &0xfff ; } +#define MLX5_VDPA_IRQ_NAME_LEN 32 + +struct mlx5_vdpa_irq_pool_entry { +struct msi_map map; +bool used; +char name[MLX5_VDPA_IRQ_NAME_LEN ]; +void *dev_id; +}; + +struct mlx5_vdpa_irq_pool { +int num_ent; +struct mlx5_vdpa_irq_pool_entry *entries; +}; +struct mlx5_vdpa_net {struct mlx5_vdpa_dev mvdev;struct mlx5_vdpa_net_resources res;
@@ -49,6 +63,7 @@ struct mlx5_vdpa_net {struct vdpa_callback config_cb;struct mlx5_vdpa_wq_ent cvq_ent;struct hlist_head macvlan_hash[MLX5V_MACVLAN_SIZE ]; +struct mlx5_vdpa_irq_pool irqp;struct dentry *debugfs; };
Signature · 1 line
2.39.2