From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by dpdk.org (Postfix) with ESMTP id B0600376D for ; Wed, 15 Jul 2015 19:16:09 +0200 (CEST) Received: by pdrg1 with SMTP id g1so28242782pdr.2 for ; Wed, 15 Jul 2015 10:16:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HdwVnVvmg1VNae48TCsnI90z5Jt33Hkatvfz95abENQ=; b=Sr0cglO016WCgo8rW4YolxVo1yGqyHpTtABg55wc6yu9g8Wt8w4P+BvbFpIvkna9ah id6CMZ0ZwtrHGVVYWSbZ8HOe+sISXGsIJbVPIi6/xqUG28LKsfVp4Z/70QRLYA6+/iqa mOEJYXgoU8e6rCW2bOvCl+VJqKPFJ6AMs7SI1JUWbGnfhruTQFhJ7lCiJphzKGsuGew3 T93BjcIsRujWUaN2A/ylzV9kWE5m1CHKkMTjxY2Ff3UVnB5ORMgfqd9GOT+yPoqkHrap DmaBT01f1iVEeaSfASXE5SM6YytmikUPNlj2Pay26BEpRsk6Siz7yfdGefZlj8aqharw t4pA== X-Gm-Message-State: ALoCoQlsqZexCROskH6lJdKq5QRVQ25hrs5ybtfvfMggK4dN6w9Uj3pfL35IYHTg6To/TCUecWr3 X-Received: by 10.66.90.166 with SMTP id bx6mr10166385pab.76.1436980569009; Wed, 15 Jul 2015 10:16:09 -0700 (PDT) Received: from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id qs5sm5266947pbb.37.2015.07.15.10.16.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Jul 2015 10:16:08 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Date: Wed, 15 Jul 2015 10:16:16 -0700 Message-Id: <1436980576-6361-1-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] eal: handle signal on eventfd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2015 17:16:10 -0000 The read for events in the interrupt thread may get interrupted by signals from application. Avoid generating stray log message. Signed-off-by: Stephen Hemminger --- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c index b5f369e..61e7c85 100644 --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c @@ -720,12 +720,14 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds) * for epoll_wait. */ bytes_read = read(events[n].data.fd, &buf, bytes_read); + if (bytes_read < 0) { + if (errno == EINTR || errno == EWOULDBLOCK) + continue; - if (bytes_read < 0) RTE_LOG(ERR, EAL, "Error reading from file " "descriptor %d: %s\n", events[n].data.fd, strerror(errno)); - else if (bytes_read == 0) + } else if (bytes_read == 0) RTE_LOG(ERR, EAL, "Read nothing from file " "descriptor %d\n", events[n].data.fd); -- 2.1.4