From: Andrew Rybchenko Date: Thu, 19 Jan 2017 11:12:20 +0000 (+0000) Subject: net/sfc: do not panic if alarms are not supported X-Git-Tag: spdx-start~4618 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=323706ab8b574acf4c069e3d1671819d4db2a8ec;p=dpdk.git net/sfc: do not panic if alarms are not supported Alarms are not supported on the FreeBSD. Application must poll link status periodically itself using rte_eth_link_get_nowait() to avoid management event queue overflow. Fixes: 2de39f4e1310 ("net/sfc: periodic management EVQ polling using alarm") Signed-off-by: Andrew Rybchenko Reviewed-by: Andrew Lee Reviewed-by: Andy Moreton --- diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c index c788986801..fe6de6fb04 100644 --- a/drivers/net/sfc/sfc_ev.c +++ b/drivers/net/sfc/sfc_ev.c @@ -499,10 +499,14 @@ sfc_ev_mgmt_periodic_qpoll(void *arg) rc = rte_eal_alarm_set(SFC_MGMT_EV_QPOLL_PERIOD_US, sfc_ev_mgmt_periodic_qpoll, sa); - if (rc != 0) - sfc_panic(sa, - "cannot rearm management EVQ polling alarm (rc=%d)", - rc); + if (rc == -ENOTSUP) { + sfc_warn(sa, "alarms are not supported"); + sfc_warn(sa, "management EVQ must be polled indirectly using no-wait link status update"); + } else if (rc != 0) { + sfc_err(sa, + "cannot rearm management EVQ polling alarm (rc=%d)", + rc); + } } static void