2020-07-23 09:14:09

by Jason Wang

[permalink] [raw]
Subject: [PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq

We ignore the err of requesting config interrupt, fix this.

Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF")
Cc: Zhu Lingshan <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
---
drivers/vdpa/ifcvf/ifcvf_main.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index f5a60c14b979..ae7110955a44 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/vdpa/ifcvf/ifcvf_main.c
@@ -76,6 +76,10 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
ret = devm_request_irq(&pdev->dev, irq,
ifcvf_config_changed, 0,
vf->config_msix_name, vf);
+ if (ret) {
+ IFCVF_ERR(pdev, "Failed to request config irq\n");
+ return ret;
+ }

for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) {
snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",
--
2.20.1


2020-08-07 03:56:46

by Jason Wang

[permalink] [raw]
Subject: Re: [PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq


On 2020/7/23 下午5:12, Jason Wang wrote:
> We ignore the err of requesting config interrupt, fix this.
>
> Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF")
> Cc: Zhu Lingshan <[email protected]>
> Signed-off-by: Jason Wang <[email protected]>
> ---
> drivers/vdpa/ifcvf/ifcvf_main.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
> index f5a60c14b979..ae7110955a44 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_main.c
> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
> @@ -76,6 +76,10 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
> ret = devm_request_irq(&pdev->dev, irq,
> ifcvf_config_changed, 0,
> vf->config_msix_name, vf);
> + if (ret) {
> + IFCVF_ERR(pdev, "Failed to request config irq\n");
> + return ret;
> + }
>
> for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) {
> snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",


Hi Michael:

Any comments on this series?

Thanks


2020-08-12 07:42:55

by Maxime Coquelin

[permalink] [raw]
Subject: Re: [PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq

Hi,

On 7/23/20 11:12 AM, Jason Wang wrote:
> We ignore the err of requesting config interrupt, fix this.
>
> Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF")
> Cc: Zhu Lingshan <[email protected]>
> Signed-off-by: Jason Wang <[email protected]>
> ---
> drivers/vdpa/ifcvf/ifcvf_main.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
> index f5a60c14b979..ae7110955a44 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_main.c
> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
> @@ -76,6 +76,10 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
> ret = devm_request_irq(&pdev->dev, irq,
> ifcvf_config_changed, 0,
> vf->config_msix_name, vf);
> + if (ret) {
> + IFCVF_ERR(pdev, "Failed to request config irq\n");
> + return ret;
> + }
>
> for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) {
> snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",
>

This series fixes below Kernel BUG I faced while doing some experiments:

[ 1398.695362] kernel BUG at drivers/pci/msi.c:375!
[ 1398.700561] invalid opcode: 0000 [#1] SMP PTI
[ 1398.705423] CPU: 0 PID: 25110 Comm: dpdk-testpmd Not tainted
5.8.0-amorenoz-vdpa+ #2
[ 1398.714063] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS
2.4.3 01/17/2017
[ 1398.722415] RIP: 0010:free_msi_irqs+0x189/0x1c0
[ 1398.727470] Code: 14 85 c0 0f 84 cc fe ff ff 31 ed eb 0f 83 c5 01 39
6b 14 0f 86 bc fe ff ff 8b 7b 10 01 ef e8 7e 94 b9 ff 48 83 78 70 00d
[ 1398.748426] RSP: 0018:ffffb48ac5dd3db8 EFLAGS: 00010286
[ 1398.754257] RAX: ffff9ab298b85400 RBX: ffff9ab285d97100 RCX:
0000000000000000
[ 1398.762219] RDX: 0000000000000000 RSI: 0000000000000073 RDI:
ffffffffac65e8a0
[ 1398.770182] RBP: 0000000000000000 R08: ffff9ab298b85400 R09:
ffff9ab74a8c3d98
[ 1398.778145] R10: ffff9ab74a8c3f58 R11: 0000000000000000 R12:
ffff9ab719fd82e0
[ 1398.786107] R13: ffff9ab719fd8000 R14: ffff9ab719fd8000 R15:
ffff9ab719fd80b0
[ 1398.794069] FS: 00007efc5dea9000(0000) GS:ffff9ab75fc00000(0000)
knlGS:0000000000000000
[ 1398.803099] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1398.809508] CR2: 000000c000079ff8 CR3: 000000038283e005 CR4:
00000000003606f0
[ 1398.817471] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 1398.825434] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
0000000000000400
[ 1398.833394] Call Trace:
[ 1398.836127] pci_disable_msix+0xf7/0x120
[ 1398.840504] pci_free_irq_vectors+0xe/0x20
[ 1398.845074] ifcvf_vdpa_set_status+0xda/0x301
[ 1398.849938] vhost_vdpa_unlocked_ioctl+0x61d/0x790
[ 1398.855277] ? vhost_vdpa_process_iotlb_msg+0x2f0/0x2f0
[ 1398.861109] ksys_ioctl+0x87/0xc0
[ 1398.864808] __x64_sys_ioctl+0x16/0x20
[ 1398.868992] do_syscall_64+0x52/0x90
[ 1398.872982] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1398.878610] RIP: 0033:0x7efc5df9ff9b
[ 1398.882598] Code: 0f 1e fa 48 8b 05 ed ce 0c 00 64 c7 00 26 00 00 00
48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 008
[ 1398.903551] RSP: 002b:00007ffd0948e378 EFLAGS: 00000283 ORIG_RAX:
0000000000000010
[ 1398.911998] RAX: ffffffffffffffda RBX: 0000000000000000 RCX:
00007efc5df9ff9b
[ 1398.919960] RDX: 00007ffd0948e3d4 RSI: 000000004001af72 RDI:
000000000000002c
[ 1398.927921] RBP: 00007ffd0948e3c0 R08: 0000000002651bf8 R09:
0000000000000000
[ 1398.935883] R10: 00007ffd0948e417 R11: 0000000000000283 R12:
0000000000408950
[ 1398.943845] R13: 00007ffd0948e6a0 R14: 0000000000000000 R15:
0000000000000000
[ 1398.951809] Modules linked in: vxlan ip6_udp_tunnel udp_tunnel
ip_vs_sh ip_vs_wrr ip_vs_rr ip_vs xt_comment xt_mark nf_tables xt_nat vetht
[ 1398.951847] ghash_clmulni_intel iTCO_vendor_support mlx5_core dcdbas
rapl intel_cstate intel_uncore ipmi_ssif pcspkr mxm_wmi mlxfw virtii

Tested-by: Maxime Coquelin <[email protected]>

Thanks,
Maxime

2020-08-26 14:27:24

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: [PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq

On Fri, Aug 07, 2020 at 11:52:09AM +0800, Jason Wang wrote:
>
> On 2020/7/23 下午5:12, Jason Wang wrote:
> > We ignore the err of requesting config interrupt, fix this.
> >
> > Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF")
> > Cc: Zhu Lingshan <[email protected]>
> > Signed-off-by: Jason Wang <[email protected]>
> > ---
> > drivers/vdpa/ifcvf/ifcvf_main.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
> > index f5a60c14b979..ae7110955a44 100644
> > --- a/drivers/vdpa/ifcvf/ifcvf_main.c
> > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
> > @@ -76,6 +76,10 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
> > ret = devm_request_irq(&pdev->dev, irq,
> > ifcvf_config_changed, 0,
> > vf->config_msix_name, vf);
> > + if (ret) {
> > + IFCVF_ERR(pdev, "Failed to request config irq\n");
> > + return ret;
> > + }
> > for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) {
> > snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",
>
>
> Hi Michael:
>
> Any comments on this series?
>
> Thanks
>

Applied, thanks!