From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v10 03/13] eal/linux: add API to set rx interrupt event monitor Date: Tue, 2 Jun 2015 09:23:00 -0700 Message-ID: <20150602092300.7a615e7e@urahara> References: <1432889125-20255-1-git-send-email-cunming.liang@intel.com> <1433228006-24661-1-git-send-email-cunming.liang@intel.com> <1433228006-24661-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, liang-min.wang@intel.com 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 9CB07BE7C for ; Tue, 2 Jun 2015 18:24:10 +0200 (CEST) In-Reply-To: <1433228006-24661-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, 2 Jun 2015 14:53:16 +0800 Cunming Liang wrote: > + bytes_read = read(fd, &buf, bytes_read); > + if (bytes_read < 0) { > + if (errno == EINTR || errno == EWOULDBLOCK || > + errno == EAGAIN) > + continue; > + RTE_LOG(ERR, EAL, "Error reading from file " > + "descriptor %d: %s\n", fd, It is better not to split strings across multiple lines because sometimes developers need to use tools like grep to find which file has the error message. Instead: RTE_LOG(ERR, EAL, "Error reading from fd %d: %s\n", fd, strerror(errno));