Page MenuHomeFreeBSD

verbs/mlx5: Allow creation of a Multi-Packet RQ using direct verbs
Needs ReviewPublic

Authored by vag.singh_oneconvergence.com on Sep 28 2021, 2:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 3:47 PM
Unknown Object (File)
Dec 29 2023, 10:55 PM
Unknown Object (File)
Dec 20 2023, 5:54 AM
Unknown Object (File)
Oct 30 2023, 10:46 PM
Unknown Object (File)
Jun 12 2023, 2:10 PM
Unknown Object (File)
May 20 2023, 1:07 AM
Unknown Object (File)
May 4 2023, 11:22 PM
Unknown Object (File)
Mar 23 2023, 6:11 AM

Details

Reviewers
kib
hselasky
Summary

[PATCH 27/31] FreeBSD OFED support for DPDK MLX5 PMD

a) Add needed definitions to allow creation of a Multi-Packet RQ
using the mlx5 direct verbs interface.

In order to create a Multi-Packet RQ, one needs to provide a
mlx5dv_wq_init_attr containing the following information in its
striding_rq_attrs struct:

  • single_stride_log_num_of_bytes: log of size of each stride
  • single_wqe_log_num_of_strides: log of number of strides per WQE
  • two_byte_shift_en: When enabled, hardware pads 2 bytes of zeros before writing the message to memory (e.g. for IP alignment).

b) Add a helper function to verify 64 bit comp mask
The common check for a mask is as follows:
if (comp_mask & ~COMP_MASK_SUPPORTED_VALUES)
return EINVAL

This can cause an issue when using 64 bit mask if the supported variable
is signed 32 bit: It will be bitwise inverted and then zeroed to 64
bits. Hence, wrong bits in the mask that exceed 32 bits will not raise
an error but would be ignored.

To fix this, a helper function is added in driver.h to be used by providers
code and fix wrong mask checks where the above was found to be applicable.

Test Plan

Tested on KVM, ESXi, and HyperV/Azure Hypervisors with FreeBSD 14.0-CURRENT and FreeBSD12.1-STABLE.

iperf
DPDK MLX5 PMD/testpmd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline