| 677 | } |
| 678 | |
| 679 | void |
| 680 | sfc_schedule_restart(struct sfc_adapter *sa) |
| 681 | { |
| 682 | int rc; |
| 683 | |
| 684 | /* Schedule restart alarm if it is not scheduled yet */ |
| 685 | if (!rte_atomic32_test_and_set(&sa->restart_required)) |
| 686 | return; |
| 687 | |
| 688 | rc = rte_eal_alarm_set(1, sfc_restart_if_required, sa); |
| 689 | if (rc == -ENOTSUP) |
| 690 | sfc_warn(sa, "alarms are not supported, restart is pending"); |
| 691 | else if (rc != 0) |
| 692 | sfc_err(sa, "cannot arm restart alarm (rc=%d)", rc); |
| 693 | else |
| 694 | sfc_notice(sa, "restart scheduled"); |
| 695 | } |
| 696 | |
| 697 | int |
| 698 | sfc_configure(struct sfc_adapter *sa) |
no test coverage detected