From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH] net/sfc: do not panic if alarms are not supported
Date: Thu, 19 Jan 2017 10:44:04 +0000 [thread overview]
Message-ID: <1484822644-12624-1-git-send-email-arybchenko@solarflare.com> (raw)
Alarms are not supported on the FreeBSD.
Application must poll link status periodically itself using
rte_eth_link_get_nowait() to avoid managment event queue overflow.
Fixes: 2de39f4e1310 ("net/sfc: periodic management EVQ polling using alarm")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
---
drivers/net/sfc/sfc_ev.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index c788986..fe6de6f 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -499,10 +499,14 @@
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
--
1.8.2.3
next reply other threads:[~2017-01-19 10:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 10:44 Andrew Rybchenko [this message]
2017-01-19 11:12 ` [dpdk-dev] [PATCH v2] " Andrew Rybchenko
2017-01-20 12:36 ` Ferruh Yigit
2017-01-20 12:55 ` Andrew Rybchenko
2017-01-23 9:53 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484822644-12624-1-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).