From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C67242BA7 for ; Fri, 20 Jan 2017 13:36:42 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 20 Jan 2017 04:36:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,258,1477983600"; d="scan'208";a="33161788" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by orsmga002.jf.intel.com with ESMTP; 20 Jan 2017 04:36:40 -0800 To: Andrew Rybchenko , dev@dpdk.org References: <1484822644-12624-1-git-send-email-arybchenko@solarflare.com> <1484824340-16107-1-git-send-email-arybchenko@solarflare.com> From: Ferruh Yigit Message-ID: Date: Fri, 20 Jan 2017 12:36:40 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1484824340-16107-1-git-send-email-arybchenko@solarflare.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2] net/sfc: do not panic if alarms are not supported X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2017 12:36:43 -0000 On 1/19/2017 11:12 AM, Andrew Rybchenko wrote: > 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 > --- > v2: > - fix spelling > > 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"); Who is the audience of this message, I am just trying to understand. If this is for application developer, perhaps function should return and error and log should be a debug log. Or if it is for end user of the application, and this issue is something that prevents app run properly, perhaps application should return error instead of logging warning. Overall I am a little suspicious about warn/err level of logs that does not alter the execution path. I would like to hear more comments indeed. > + } else if (rc != 0) { > + sfc_err(sa, > + "cannot rearm management EVQ polling alarm (rc=%d)", > + rc); > + } > } > > static void >