From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v7 03/10] eal/linux: add API to set rx interrupt event monitor Date: Thu, 7 May 2015 19:58:59 -0700 Message-ID: <20150507195859.45fd2353@urahara> References: <1425012976-10173-1-git-send-email-cunming.liang@intel.com> <1430804386-28949-1-git-send-email-cunming.liang@intel.com> <1430804386-28949-4-git-send-email-cunming.liang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Cunming Liang Return-path: Received: from mx0a-000f0801.pphosted.com (mx0a-000f0801.pphosted.com [67.231.144.122]) by dpdk.org (Postfix) with ESMTP id B29BB56AB for ; Fri, 8 May 2015 04:58:57 +0200 (CEST) In-Reply-To: <1430804386-28949-4-git-send-email-cunming.liang@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 5 May 2015 13:39:39 +0800 Cunming Liang wrote: > + bytes_read = read(fd, &buf, bytes_read); > + if (bytes_read < 0) > + RTE_LOG(ERR, EAL, "Error reading from file " > + "descriptor %d: %s\n", fd, > + strerror(errno) The read could be interrupted (EINTR) or there could be a race (EWOULDBLOCK). In those cases the code should not log anything.