You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-network/setup-dpdk-mana.md
+94-6Lines changed: 94 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ The setup procedure for MANA DPDK is outlined in the [example code.](#example-te
23
23
Legacy Azure Linux VMs rely on the mlx4 or mlx5 drivers and the accompanying hardware for accelerated networking. Azure DPDK users would select specific interfaces to include or exclude by passing bus addresses to the DPDK EAL. The setup procedure for MANA DPDK differs slightly, since the assumption of one bus address per Accelerated Networking interface no longer holds true. Rather than using a PCI bus address, the MANA PMD uses the MAC address to determine which interface it should bind to.
24
24
25
25
## MANA DPDK EAL Arguments
26
-
The MANA PMD probes all devices and ports on the system when no `--vdev` argument is present; the `--vdev` argument is not mandatory. In testing environments it's often desirable to leave one (primary) interface available for servicing the SSH connection to the VM. To use DPDK with a subset of the available VFs, users should pass both the bus address of the MANA device and the MAC address of the interfaces in the `--vdev` argument. For more detail, example code is available to demonstrate [DPDK EAL initialization on MANA](#example-testpmd-setup-and-netvsc-test).
26
+
The MANA PMD probes all devices and ports on the system when no `--vdev` argument is present; the `--vdev` argument isn't mandatory. In testing environments, it's often desirable to leave one (primary) interface available for servicing the SSH connection to the VM. To use DPDK with a subset of the available VFs, users should pass both the bus address of the MANA device and the MAC address of the interfaces in the `--vdev` argument. For more detail, example code is available to demonstrate [DPDK EAL initialization on MANA](#example-testpmd-setup-and-netvsc-test).
27
27
28
28
For general information about the DPDK Environment Abstraction Layer (EAL):
29
29
-[DPDK EAL Arguments for Linux](https://doc.dpdk.org/guides/prog_guide/env_abstraction_layer.html#eal-in-a-linux-userland-execution-environment)
@@ -39,6 +39,13 @@ MANA DPDK requires the following set of drivers:
39
39
1. [DPDK MANA poll-mode driver](https://github.com/DPDK/dpdk/tree/main/drivers/net/mana) (DPDK 22.11 and later)
40
40
1. [Libmana user-space drivers](https://github.com/linux-rdma/rdma-core/tree/master/providers/mana) (rdma-core v44 and later)
41
41
42
+
### Supported Marketplace Images
43
+
A nonexhaustive list of images with backported patches for DPDK with MANA:
44
+
- Red Hat Enterprise Linux 8.9
45
+
- Red Hat Enterprise Linux 9.4
46
+
- Canonical Ubuntu Server 20.04 (5.15.0-1045-azure)
47
+
- Canonical Ubuntu Server 22.04 (5.15.0-1045-azure)
48
+
42
49
>[!NOTE]
43
50
>MANA DPDK is not available for Windows; it will only work on Linux VMs.
44
51
@@ -85,7 +92,8 @@ popd
85
92
Note the following example code for running DPDK with MANA. The direct-to-vf 'netvsc' configuration on Azure is recommended for maximum performance with MANA.
86
93
87
94
>[!NOTE]
88
-
>DPDK requires either 2MB or 1GB hugepages to be enabled
95
+
>DPDK requires either 2MB or 1GB hugepages to be enabled.
96
+
>Example assumes an Azure VM with 2 accelerated networking NICs attached.
Failure to set the MANA bound device to DOWN can result in low or zero packet throughput.
135
143
The failure to release the device can result the EAL error message related to transmit queues.
136
-
```
144
+
```log
137
145
mana_start_tx_queues(): Failed to create qp queue index 0
138
146
mana_dev_start(): failed to start tx queues -19
139
147
```
140
148
141
149
### Failure to enable huge pages.
142
150
143
151
Try enabling huge pages and ensuring the information is visible in meminfo.
144
-
```
152
+
```log
145
153
EAL: No free 2048 kB hugepages reported on node 0
146
154
EAL: FATAL: Cannot get hugepage information.
147
155
EAL: Cannot get hugepage information.
148
156
EAL: Error - exiting with code: 1
149
157
Cause: Cannot init EAL: Permission denied
150
158
```
151
159
152
-
### Low throughput with use of --vdev="net_vdev_netvsc0,iface=eth1"
160
+
### Low throughput with use of `--vdev="net_vdev_netvsc0,iface=eth1"`
153
161
154
162
Failover configuration of either the `net_failsafe` or `net_vdev_netvsc` poll-mode-drivers isn't recommended for high performance on Azure. The netvsc configuration with DPDK version 20.11 or higher may give better results. For optimal performance, ensure your Linux kernel, rdma-core, and DPDK packages meet the listed requirements for DPDK and MANA.
163
+
164
+
### Version mismatch for rdma-core
165
+
Mismatches in rdma-core and the linux kernel can occur anytime; often they occur when a user is building some combination of rdma-core, DPDK, and the linux kernel from source. This type of version mismatch can cause a failed probe of the MANA virtual function (VF).
mana_pci_probe_mac(): Probe device name mana_0 dev_name uverbs0 ibdev_path /sys/class/infiniband/mana_0
172
+
mana_probe_port(): device located port 2 address 00:0D:3A:76:3B:D0
173
+
mana_probe_port(): ibv_alloc_parent_domain failed port 2
174
+
mana_pci_probe_mac(): Probe on IB port 2 failed -12
175
+
EAL: Requested device 7870:00:00.0 cannot be used
176
+
EAL: Bus (pci) probe failed.
177
+
hn_vf_attach(): Couldn't find port for VF
178
+
hn_vf_add(): RNDIS reports VF but device not found, retrying
179
+
180
+
```
181
+
This likely results from using a kernel with backported patches for mana_ib with a newer version of rdma-core. The root cause is an interaction between the kernel RDMA drivers and user space rdma-core libraries.
182
+
183
+
The Linux kernel uapi for RDMA has a list of RDMA provider IDs, in backported versions of the kernel this ID value can differ from the version in the rdma-core libraries.
184
+
> {!NOTE}
185
+
> Example snippets are from [Ubuntu 5.150-1045 linux-azure](https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-azure/+git/focal/tree/include/uapi/rdma/ib_user_ioctl_verbs.h?h=azure-5.15-next) and [rdma-core v46.0](https://github.com/linux-rdma/rdma-core/blob/4cce53f5be035137c9d31d28e204502231a56382/kernel-headers/rdma/ib_user_ioctl_verbs.h#L220)
186
+
```c
187
+
// Linux kernel header
188
+
// include/uapi/rdma/ib_user_ioctl_verbs.h
189
+
enum rdma_driver_id {
190
+
RDMA_DRIVER_UNKNOWN,
191
+
RDMA_DRIVER_MLX5,
192
+
RDMA_DRIVER_MLX4,
193
+
RDMA_DRIVER_CXGB3,
194
+
RDMA_DRIVER_CXGB4,
195
+
RDMA_DRIVER_MTHCA,
196
+
RDMA_DRIVER_BNXT_RE,
197
+
RDMA_DRIVER_OCRDMA,
198
+
RDMA_DRIVER_NES,
199
+
RDMA_DRIVER_I40IW,
200
+
RDMA_DRIVER_IRDMA = RDMA_DRIVER_I40IW,
201
+
RDMA_DRIVER_VMW_PVRDMA,
202
+
RDMA_DRIVER_QEDR,
203
+
RDMA_DRIVER_HNS,
204
+
RDMA_DRIVER_USNIC,
205
+
RDMA_DRIVER_RXE,
206
+
RDMA_DRIVER_HFI1,
207
+
RDMA_DRIVER_QIB,
208
+
RDMA_DRIVER_EFA,
209
+
RDMA_DRIVER_SIW,
210
+
RDMA_DRIVER_MANA, //<- MANA added as last member of enum after backporting
211
+
};
212
+
213
+
// Example mismatched rdma-core ioctl verbs header
214
+
// on github: kernel-headers/rdma/ib_user_ioctl_verbs.h
215
+
// or in release tar.gz: include/rdma/ib_user_ioctl_verbs.h
216
+
enum rdma_driver_id {
217
+
RDMA_DRIVER_UNKNOWN,
218
+
RDMA_DRIVER_MLX5,
219
+
RDMA_DRIVER_MLX4,
220
+
RDMA_DRIVER_CXGB3,
221
+
RDMA_DRIVER_CXGB4,
222
+
RDMA_DRIVER_MTHCA,
223
+
RDMA_DRIVER_BNXT_RE,
224
+
RDMA_DRIVER_OCRDMA,
225
+
RDMA_DRIVER_NES,
226
+
RDMA_DRIVER_I40IW,
227
+
RDMA_DRIVER_IRDMA = RDMA_DRIVER_I40IW,
228
+
RDMA_DRIVER_VMW_PVRDMA,
229
+
RDMA_DRIVER_QEDR,
230
+
RDMA_DRIVER_HNS,
231
+
RDMA_DRIVER_USNIC,
232
+
RDMA_DRIVER_RXE,
233
+
RDMA_DRIVER_HFI1,
234
+
RDMA_DRIVER_QIB,
235
+
RDMA_DRIVER_EFA,
236
+
RDMA_DRIVER_SIW,
237
+
RDMA_DRIVER_ERDMA, // <- This upstream has two additional providers
238
+
RDMA_DRIVER_MANA, // <- So MANA's ID in the enum does not match
239
+
};
240
+
```
241
+
242
+
This mismatch results in the MANA provider code failing to load. Use `gdb` to trace the execution of `dpdk-testpmd` to confirm the ERDMA provider is loaded instead of the MANA provider. The MANA driver_id must be consistent for both the kernel and rdma-core. The MANA PMD loads correctly when those IDs match.
0 commit comments