| 29 | #include "sfc_nic_dma.h" |
| 30 | |
| 31 | bool |
| 32 | sfc_repr_supported(const struct sfc_adapter *sa) |
| 33 | { |
| 34 | if (!sa->switchdev) |
| 35 | return false; |
| 36 | |
| 37 | /* |
| 38 | * Representor proxy should use service lcore on PF's socket |
| 39 | * (sa->socket_id) to be efficient. But the proxy will fall back |
| 40 | * to any socket if it is not possible to get the service core |
| 41 | * on the same socket. Check that at least service core on any |
| 42 | * socket is available. |
| 43 | */ |
| 44 | if (sfc_get_service_lcore(SOCKET_ID_ANY) == RTE_MAX_LCORE) |
| 45 | return false; |
| 46 | |
| 47 | return true; |
| 48 | } |
| 49 | |
| 50 | bool |
| 51 | sfc_repr_available(const struct sfc_adapter_shared *sas) |
no test coverage detected