From patchwork Tue Oct 31 11:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 117566 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3802146edm; Tue, 31 Oct 2017 04:01:28 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QWM/mqXSmzKbIla0wL0QSeUyYXs4UeP77xFRH5D+PRUavrLd6J14QWzKmFLcn+jPqjJAL8 X-Received: by 10.200.48.171 with SMTP id v40mr2065176qta.120.1509447687866; Tue, 31 Oct 2017 04:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509447687; cv=none; d=google.com; s=arc-20160816; b=nA8FFQKvsUZju3Blb4+roR4Fd/bPBVVh2pzA9cHCk5Ntz3FUKmIIEIvAgkUfk3jlgP /GglMBP/jTd5FMjfsWHBXuJ6M5/TpXaxQNPyyxPT3F1x8Ilgi1GCZHYmx1Q0QuKcECP2 Bpiglae4Be5kMKtV7+VcuXEbyczxza0pHEvrL9cd+rMr1ryt7TAOn97UD02CmIkxsIp1 HtogKlinVj1THgwywgrA9UPT1YocSIWaXLvJC0EaGF/IVr5pqCPA92tWYZM0dwUloqw5 lzNM9DSvLbomFTSf0qaHpR1oogLCU/8DU/e5qJLlg8Nmgz/xQ3HLsItT/e8fHNNbwxxh Us1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=5+zxWfe75BxU56jvWNQbR302+DMx+yQzxkGCDc4mEoA=; b=EmuaeTrPoohp8pTOgbGggdguRy2TIxua0XSfFDYdMkr2lVPDTWTCbzV8/DpAUKILVD 8xJJ4Ksf/T2rSWgEbBgp1Zd8jekwroXYrJz3YQ8mrm5HvLD8UdBkKrwmwe5qE8It9Qqg 0z6DbXoowGKe8WwdZxSSPbbB+JbAYukK/tsOBKekhQa2f5PQS2SFrpyFOuYduVMZi3Ah 9cd9QefOAaUs2WMOR7CCik2TDqDCMMihlGFL5DyGjsRDpsSiIZQoc090XwpJAMTI6o0G QT4HqXXaTo32VCaoD4ShdH/3k2QZSJO8FSZnTeVa8Vei3gdm9FGpi/HQ7Z4K8R+O93Ko nvug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id u4si1119994qkb.485.2017.10.31.04.01.27; Tue, 31 Oct 2017 04:01:27 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 8A25C60C4B; Tue, 31 Oct 2017 11:01:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 1DF9E60934; Tue, 31 Oct 2017 11:00:27 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 5AFA660AC1; Tue, 31 Oct 2017 11:00:18 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 09C966071A for ; Tue, 31 Oct 2017 11:00:14 +0000 (UTC) Received: from mxback1g.mail.yandex.net (mxback1g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:162]) by forward103j.mail.yandex.net (Yandex) with ESMTP id C433C34C5496 for ; Tue, 31 Oct 2017 14:00:12 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback1g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 71t1C8vPJY-0CSi92vk; Tue, 31 Oct 2017 14:00:12 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id p0SvtzPjlX-0Ck4u4Q8; Tue, 31 Oct 2017 14:00:12 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 31 Oct 2017 14:00:05 +0300 Message-Id: <1509447606-15110-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509447606-15110-1-git-send-email-odpbot@yandex.ru> References: <1509447606-15110-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 267 Subject: [lng-odp] [PATCH 2.0 v1 3/4] linux-gen: pktio: move SOCK_ERR_REPORT macro from odp_packet_io_internal.h X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bogdan Pricope Move SOCK_ERR_REPORT macro from odp_packet_io_internal.h. Signed-off-by: Bogdan Pricope --- /** Email created from pull request 267 (bogdanPricope:2_0_pktio_internal_pr) ** https://github.com/Linaro/odp/pull/267 ** Patch: https://github.com/Linaro/odp/pull/267.patch ** Base sha: 1236f1ad2bba56b5e49ff62df247e52143b48985 ** Merge commit sha: a69a4d7670d99912c517574391cb72bae3308c3f **/ platform/linux-generic/include/odp_packet_io_internal.h | 6 ------ platform/linux-generic/pktio/common.h | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index 1302a59bf..a2e1fdd9c 100644 --- a/platform/linux-generic/include/odp_packet_io_internal.h +++ b/platform/linux-generic/include/odp_packet_io_internal.h @@ -42,12 +42,6 @@ typedef union pktio_entry_u pktio_entry_t; #define PKTIN_INVALID ((odp_pktin_queue_t) {ODP_PKTIO_INVALID, 0}) #define PKTOUT_INVALID ((odp_pktout_queue_t) {ODP_PKTIO_INVALID, 0}) -/** Determine if a socket read/write error should be reported. Transient errors - * that simply require the caller to retry are ignored, the _send/_recv APIs - * are non-blocking and it is the caller's responsibility to retry if the - * requested number of packets were not handled. */ -#define SOCK_ERR_REPORT(e) (e != EAGAIN && e != EWOULDBLOCK && e != EINTR) - struct pktio_entry { const pktio_ops_module_t *ops; /**< Implementation specific methods */ uint8_t ops_data[ODP_PKTIO_ODPS_DATA_MAX_SIZE]; /**< IO operation diff --git a/platform/linux-generic/pktio/common.h b/platform/linux-generic/pktio/common.h index 025e1893d..2ea68f646 100644 --- a/platform/linux-generic/pktio/common.h +++ b/platform/linux-generic/pktio/common.h @@ -7,6 +7,14 @@ #ifndef ODP_PKTIO_COMMON_H_ #define ODP_PKTIO_COMMON_H_ +#include + +/** Determine if a socket read/write error should be reported. Transient errors + * that simply require the caller to retry are ignored, the _send/_recv APIs + * are non-blocking and it is the caller's responsibility to retry if the + * requested number of packets were not handled. */ +#define SOCK_ERR_REPORT(e) (e != EAGAIN && e != EWOULDBLOCK && e != EINTR) + /** * Read the MTU from a packet socket */