| 1067 | } |
| 1068 | |
| 1069 | static int |
| 1070 | swtim_start(const struct rte_event_timer_adapter *adapter) |
| 1071 | { |
| 1072 | int mapped_count; |
| 1073 | struct swtim *sw = swtim_pmd_priv(adapter); |
| 1074 | |
| 1075 | /* Mapping the service to more than one service core can introduce |
| 1076 | * delays while one thread is waiting to acquire a lock, so only allow |
| 1077 | * one core to be mapped to the service. |
| 1078 | * |
| 1079 | * Note: the service could be modified such that it spreads cores to |
| 1080 | * poll over multiple service instances. |
| 1081 | */ |
| 1082 | mapped_count = get_mapped_count_for_service(sw->service_id); |
| 1083 | |
| 1084 | if (mapped_count != 1) |
| 1085 | return mapped_count < 1 ? -ENOENT : -ENOTSUP; |
| 1086 | |
| 1087 | return rte_service_component_runstate_set(sw->service_id, 1); |
| 1088 | } |
| 1089 | |
| 1090 | static int |
| 1091 | swtim_stop(const struct rte_event_timer_adapter *adapter) |
nothing calls this directly
no test coverage detected