- ibv = mlx5_regex_get_ib_device_match(&pci_dev->addr);
- if (!ibv) {
- DRV_LOG(ERR, "No matching IB device for PCI slot "
- PCI_PRI_FMT ".", pci_dev->addr.domain,
- pci_dev->addr.bus, pci_dev->addr.devid,
- pci_dev->addr.function);
- return -rte_errno;
- }
- DRV_LOG(INFO, "PCI information matches for device \"%s\".",
- ibv->name);
- ctx = mlx5_glue->dv_open_device(ibv);
- if (!ctx) {
- DRV_LOG(ERR, "Failed to open IB device \"%s\".", ibv->name);
- rte_errno = ENODEV;
- return -rte_errno;
- }
- ret = mlx5_devx_cmd_query_hca_attr(ctx, &attr);
- if (ret) {
- DRV_LOG(ERR, "Unable to read HCA capabilities.");
- rte_errno = ENOTSUP;
- goto dev_error;
- } else if (!attr.regex || attr.regexp_num_of_engines == 0) {
+ if ((!attr->regex && !attr->mmo_regex_sq_en && !attr->mmo_regex_qp_en)
+ || attr->regexp_num_of_engines == 0) {