Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Leon Romanovsky
Thu, 15 Oct 2026 09:22
Re: mlx4: no ib device for Ethernet ports without IBoE since v6.6
Author: Leon Romanovsky
Date: Thu, 15 Oct 2026 09:22
Date: Thu, 15 Oct 2026 09:22
68 lines
7732 bytes
7732 bytes
On Wed, Oct 14, 2026 at 01:55:48PM +0100, Peter Morrow wrote:
> Hi,
>
> Since v6.6, mlx4 no longer creates an RDMA device for an Ethernet port
> when the device doesn't advertise IBoE. On Azure, ConnectX-3 VFs are in
> that state, so DPDK's mlx4 PMD can no longer open them:
>
> net_mlx4: cannot access device, is mlx4_ib loaded?
>
> Petr, thanks for looking at this off-list; as you suggested, I'm reporting
> it here.
>
> What changed
> ------------
> Commit 7d22b1cb9d84 ("mlx4: Connect the infiniband part to the
> auxiliary bus") creates the "ib" auxiliary device only when
> is_ib_supported() sees an IB port or MLX4_DEV_CAP_FLAG_IBOE. Before it,
> mlx4_ib_add() was called for every device and accepted any IB or
> Ethernet port via mlx4_foreach_ib_transport_port(). An Ethernet port
> without IBoE got a raw-packet-only port. mlx4_port_immutable() still
> has that branch (RDMA_CORE_PORT_RAW_PACKET without RoCE), but nothing
> can reach it now.
>
> DPDK's mlx4 PMD needs only that: it opens the device through ibverbs
> and creates IBV_QPT_RAW_PACKET QPs. It does not ask for RoCE.
> mlx5_ib handles the equivalent case by creating the device with
> raw_eth_profile when
> RoCE is disabled.
The best approach is probably to add a similar mechanism for mlx4. However, since
that driver is quite old and has limited test coverage, it would be better to
implement something like this:
diff --git a/drivers/net/ethernet/mellanox/mlx4/intf.c b/drivers/net/ethernet/mellanox/mlx4/intf.c
index 82e467c45d23..31860b4abe43 100644
--- a/drivers/net/ethernet/mellanox/mlx4/intf.c
+++ b/drivers/net/ethernet/mellanox/mlx4/intf.c
@@ -43,23 +43,12 @@ static DEFINE_IDA(mlx4_adev_ida);
static bool is_eth_supported(struct mlx4_dev *dev)
{
- for (int port = 1; port <= dev->caps.num_ports; port++)
- if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
- return true;
-
- return false;
+ return true;
}
static bool is_ib_supported(struct mlx4_dev *dev)
{
- for (int port = 1; port <= dev->caps.num_ports; port++)
- if (dev->caps.port_type[port] == MLX4_PORT_TYPE_IB)
- return true;
-
- if (dev->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)
- return true;
-
- return false;
+ return true;
}
static const struct mlx4_adev_device {
Can you please send proper patch?
Thanks
Re: mlx4: no ib device for Ethernet ports without IBoE since v6.6
Author: Peter Morrow
Date: Tue, 20 Oct 2026 10:29
Date: Tue, 20 Oct 2026 10:29
14 lines
12304 bytes
12304 bytes
On Thu, 15 Oct 2026 at 10:22, Leon Romanovsky <leon@kernel.org> wrote: > The best approach is probably to add a similar mechanism for mlx4. However, since > that driver is quite old and has limited test coverage, it would be better to > implement something like this: [...] > Can you please send proper patch? Thanks Leon. I've tested your change on an Azure VM with two ConnectX-3 VFs on 6.12.111: both get eth and ib auxiliary devices, and DPDK attaches both VFs and passes traffic. I'll send it as a patch this week. Peter
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads