All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: mellanox mlx4_core and SR-IOV
@ 2012-08-03 13:49 Konrad Wilk
  2012-08-05  8:05 ` Lukas Hejtmanek
  0 siblings, 1 reply; 22+ messages in thread
From: Konrad Wilk @ 2012-08-03 13:49 UTC (permalink / raw)
  To: xhejtman; +Cc: yinghai, linux-pci, roland, linux-kernel

Sorry about top-posting, using an webemail client.

This looks like you are using PV PCI passthrough? If so, did you
remember to use 'iommu=soft' to enable the Xen-SWIOTLB in your guest?
And are you booting with more than 4GB? Or is less than 3GB (so that you have
a nice gap in E820).

----- Original Message -----
From: xhejtman@ics.muni.cz
To: yinghai@kernel.org
Cc: roland@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Sent: Friday, August 3, 2012 4:34:03 AM GMT -05:00 US/Canada Eastern
Subject: Re: mellanox mlx4_core and SR-IOV

On Wed, Aug 01, 2012 at 04:36:14PM -0700, Yinghai Lu wrote:
> > so it seems, that pic=nocsr is a must now.
> 
> yes. Or you have bios provide SRIOV support or 64 bit resource in _CRS.

Well, I can use PCI passthrough in Xen now, however, it seems SR-IOV does not
work in case of Mellanox mlx4 driver.

With 3.5 stock kernel, I got this message in virtual domain:
[    2.666623] mlx4_core: Mellanox ConnectX core driver v1.1 (Dec, 2011)
[    2.666635] mlx4_core: Initializing 0000:00:00.1
[    2.666717] mlx4_core 0000:00:00.1: enabling device (0000 -> 0002)
[    2.666975] mlx4_core 0000:00:00.1: Xen PCI mapped GSI0 to IRQ168
[    2.667040] mlx4_core 0000:00:00.1: enabling bus mastering
[    2.667184] mlx4_core 0000:00:00.1: Detected virtual function - running in slave mode
[    2.667214] mlx4_core 0000:00:00.1: Sending reset
[    2.667319] mlx4_core 0000:00:00.1: Sending vhcr0
[    2.667886] mlx4_core 0000:00:00.1: HCA minimum page size:1
[    2.668067] mlx4_core 0000:00:00.1: The host doesn't support eth interface
[    2.668074] mlx4_core 0000:00:00.1: QUERY_FUNC_CAP command failed, aborting.
[    2.668079] mlx4_core 0000:00:00.1: Failed to obtain slave caps
[    2.668305] mlx4_core: probe of 0000:00:00.1 failed with error -93

not sure what does it mean.

I also tried OFED package from Mellanox which seems to have better SR-IOV
support (at least mlx4_ib does not complain that SR-IOV is not supported).
However, it does not work when SR-IOV enabled:
[13677.034266] mlx4_core 0000:02:00.0: Running in master mode
[13689.278238] mlx4_core 0000:02:00.0: command 0x31 timed out (go bit not cleared)
[13689.278324] mlx4_core 0000:02:00.0: NOP command failed to generate MSI-X interrupt IRQ 241).
[13689.278399] mlx4_core 0000:02:00.0: Trying again without MSI-X.
[13699.286473] mlx4_core 0000:02:00.0: command 0x31 timed out (go bit not cleared)
[13699.286557] mlx4_core 0000:02:00.0: NOP command failed to generate interrupt (IRQ 237), aborting.
[13699.286633] mlx4_core 0000:02:00.0: BIOS or ACPI interrupt routing problem?
[13701.406680] mlx4_core: probe of 0000:02:00.0 failed with error -16

if I disable SR-IOV mode for this driver, it works OK. Could the interrupt
problem be BIOS related? I.e., it won't work until I got BIOS which properly
supports SR-IOV with Mellanox card?

-- 
Lukáš Hejtmánek
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread
* mellanox mlx4_core and SR-IOV
@ 2012-11-27  1:05 Zhangxiaofeng
       [not found] ` <AE94C31276ACE14591CDCF7F6B4E699455547DBF-HvUXlCZMZtTDofk7SaG+FwK1hpo4iccwjNknBlVQO8k@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Zhangxiaofeng @ 2012-11-27  1:05 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hello,
I tried to use SR-IOV virtualization for Mellanox ConnectX2 card with kernel 3.6.7.
I met some problem as below:
lspci -v shows:
04:00.0 InfiniBand: Mellanox Technologies MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE] (rev b0)
        Subsystem: Mellanox Technologies Device 0036
        Flags: bus master, fast devsel, latency 0, IRQ 32
        Memory at fbd00000 (64-bit, non-prefetchable) [size=1M]
        Memory at f3800000 (64-bit, prefetchable) [size=8M]
        Capabilities: [40] Power Management version 3
        Capabilities: [48] Vital Product Data
        Capabilities: [9c] MSI-X: Enable+ Count=128 Masked-
        Capabilities: [60] Express Endpoint, MSI 00
        Capabilities: [100] Alternative Routing-ID Interpretation (ARI)
        Capabilities: [148] Device Serial Number 00-02-c9-03-00-4e-4d-2a
        Capabilities: [108] Single Root I/O Virtualization (SR-IOV)
        Kernel driver in use: mlx4_core
        Kernel modules: mlx4_core
Mlx4_core driver complains as below:
mlx4_core: Mellanox ConnectX core driver v1.1 (Dec, 2011)
mlx4_core: Initializing 0000:04:00.0
mlx4_core 0000:04:00.0: Enabling sriov with:4 vfs
mlx4_core 0000:04:00.0: not enough MMIO resources for SR-IOV
mlx4_core 0000:04:00.0: Failed to enable sriov,continuing without sriov enabled
(err = -12).
mlx4_core 0000:04:00.0: irq 100 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 101 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 102 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 103 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 104 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 105 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 106 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 107 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 108 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 109 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 110 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 111 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 112 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 113 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 114 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 115 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 116 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 117 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 118 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 119 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 120 for MSI/MSI-X
mlx4_core 0000:04:00.0: irq 121 for MSI/MSI-X
mlx4_core 0000:04:00.0: command 0xc failed: fw status = 0x40
mlx4_core 0000:04:00.0: command 0xc failed: fw status = 0x40
mlx4_en: Mellanox ConnectX HCA Ethernet driver v2.0 (Dec 2011)
<mlx4_ib> mlx4_ib_add: mlx4_ib: Mellanox ConnectX InfiniBand driver v1.0 (April
4, 2008)
NET: Registered protocol family 10
IPv6: ADDRCONF(NETDEV_UP): ib0: link is not ready
ib0: multicast join failed for ff12:401b:ffff:0000:0000:0000:ffff:ffff, status -
22
ib0: multicast join failed for ff12:401b:ffff:0000:0000:0000:ffff:ffff, status -
22
ib0: multicast join failed for ff12:401b:ffff:0000:0000:0000:ffff:ffff, status -
22
ib0: enabling connected mode will cause multicast packet drops
ib0: mtu > 4092 will cause multicast packet drops.
ib1: enabling connected mode will cause multicast packet drops
ib1: mtu > 4092 will cause multicast packet drops.

Victor
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread
* mellanox mlx4_core and SR-IOV
@ 2012-08-01 13:38 Lukas Hejtmanek
  2012-08-01 17:37 ` Roland Dreier
  0 siblings, 1 reply; 22+ messages in thread
From: Lukas Hejtmanek @ 2012-08-01 13:38 UTC (permalink / raw)
  To: roland; +Cc: linux-kernel

Hello,

I tried to use SR-IOV virtualizaton for Mellanox ConnectX2 card with
mlx4_core driver with kernel 3.5.0. I built firware for the IB card with
sriov_en = true, lspci shows:
02:00.0 InfiniBand: Mellanox Technologies MT26428 [ConnectX VPI PCIe 2.0 5GT/s
- IB QDR / 10GigE] (rev b0)
        Subsystem: Super Micro Computer Inc Device 0048
        Flags: bus master, fast devsel, latency 0, IRQ 24
        Memory at fbd00000 (64-bit, non-prefetchable) [size=1M]
        Memory at f8800000 (64-bit, prefetchable) [size=8M]
        Capabilities: [40] Power Management version 3
        Capabilities: [48] Vital Product Data
        Capabilities: [9c] MSI-X: Enable+ Count=128 Masked-
        Capabilities: [60] Express Endpoint, MSI 00
        Capabilities: [100] Alternative Routing-ID Interpretation (ARI)
        Capabilities: [148] Device Serial Number 00-25-90-ff-ff-28-09-08
        Capabilities: [108] Single Root I/O Virtualization (SR-IOV)
        Kernel driver in use: mlx4_core

however, the driver complains:
[    3.558221] mlx4_core 0000:02:00.0: Enabling sriov with:4 vfs
[    3.558296] mlx4_core 0000:02:00.0: not enough MMIO resources for SR-IOV (nres: 0, iov->nres: 1)
[    3.558299] mlx4_core 0000:02:00.0: Failed to enable sriov,continuing without sriov enabled (err = -12).

Is there any workaround for this? Or the bug is in BIOS and without a proper
fix this is never gonna work? 

Perhaps, are there any persons more suitable for these kind of questions?

-- 
Lukáš Hejtmánek

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-11-30  0:41 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 13:49 mellanox mlx4_core and SR-IOV Konrad Wilk
2012-08-05  8:05 ` Lukas Hejtmanek
2012-08-06 14:07   ` Konrad Rzeszutek Wilk
2012-08-06 15:10     ` Lukas Hejtmanek
  -- strict thread matches above, loose matches on Subject: below --
2012-11-27  1:05 Zhangxiaofeng
     [not found] ` <AE94C31276ACE14591CDCF7F6B4E699455547DBF-HvUXlCZMZtTDofk7SaG+FwK1hpo4iccwjNknBlVQO8k@public.gmane.org>
2012-11-27  2:30   ` Jon Stanley
     [not found]     ` <CALY6xngZ2PTf6hiPcpQjaJDnGO=L9gMZg_h2d4S6MJx-+quUDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-27  4:54       ` Albert Strasheim
     [not found]         ` <CALfB72AHagg7GF2i2vuBw4_M0QHw-xkbdSXmuJKvynv-ZjLMow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-30  0:41           ` Zhangxiaofeng
2012-08-01 13:38 Lukas Hejtmanek
2012-08-01 17:37 ` Roland Dreier
2012-08-01 18:29   ` Yinghai Lu
2012-08-01 20:28     ` Lukas Hejtmanek
2012-08-01 21:27       ` Yinghai Lu
2012-08-01 21:50         ` Lukas Hejtmanek
2012-08-01 20:56     ` Lukas Hejtmanek
2012-08-01 21:32       ` Yinghai Lu
2012-08-01 22:08         ` Lukas Hejtmanek
2012-08-01 23:36           ` Yinghai Lu
2012-08-03  8:33             ` Lukas Hejtmanek
2012-08-03 16:41               ` Yinghai Lu
2012-08-10 18:51               ` Chris Friesen
2012-08-10 22:34                 ` Lukas Hejtmanek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.