From patchwork Wed Nov 1 14:00:06 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: 117693 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp923133qgn; Wed, 1 Nov 2017 07:02:18 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QLC+eXclqwYCK/DtBwMGa4x+45etrFJZhkAB8L2/yqn+DEzeMLCdkEHF+4au8Uw1Tp4pE/ X-Received: by 10.36.43.68 with SMTP id h65mr594972ita.65.1509544938572; Wed, 01 Nov 2017 07:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509544938; cv=none; d=google.com; s=arc-20160816; b=gqcBgcMvZeIHpv7NjbxyKdYAiNn7PaGgrW0KCxfUbZfiW1Duc/o7VKWO4Y3ysssduu ZMaxx9+Dj9M+16q8D16KYlsBpTXsFtxTUHC9fTYsmIvVJPH4m2e5hXfz7/KDmrAly95J VG4RmlH6Tw/pCERJeWs+I5BSisXpfiR6MIz+dTDACG+g/5s7OOIkMyIOi3IGYELkJw1X Ld2AbHBdmWxkR/11OaZnmy8gMB3ZdKVmIMMW0m3iFN1/fhHrb8NIXyUh6B8exzMjTNmP 9KGzYnHzot2zcOSQeTZSLd3bX0Bhr07MSEYLF2aaVKLa8kgIKyMozQnLBXvSmmluUQl3 afrg== 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=SVk8PFLCyfjn4lgK1QRY2ONIh/tgF/25JeM7QeRLB+4=; b=IWWZku26nyEQE3wC1xeBtbrTDYfnEMsxicxABd0DGA5r7C1w/l87K/p/dKGprXO90U FxkuRcyLUpepJZpluq0mQxP8/TqCqFfn/2aJk/HMHLYQy0fbPjlMCRXrS2jzlklG1BuM uOj2XwMbNqiFlMwacpf6VoZ4VBHq4hA5/MLEh4pD32R5WhrVlsAJnpDILGV/93IPnUeF EXD5taQvK/hX9yItjDvnLj7YFhF0zvI6RoQ9YVJXytr8EgFDAUdTC7GvJs5Ou0c/ru6z T/+k5jtET8L4CIJfHgCG4l+/P0Z0+s/pwFVmz9LXl9xoQfJSQuRjnMfLa0XUIFOcLma+ qr8w== 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 65si1103544itc.73.2017.11.01.07.02.18; Wed, 01 Nov 2017 07:02:18 -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 081386101F; Wed, 1 Nov 2017 14:02:18 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 4535F60D2E; Wed, 1 Nov 2017 14:00:37 +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 19E19609C3; Wed, 1 Nov 2017 14:00:19 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 77A3E60812 for ; Wed, 1 Nov 2017 14:00:15 +0000 (UTC) Received: from mxback4j.mail.yandex.net (mxback4j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10d]) by forward100o.mail.yandex.net (Yandex) with ESMTP id B924B2A220A1 for ; Wed, 1 Nov 2017 17:00:13 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback4j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id qT3kP6XgDZ-0DoumgqC; Wed, 01 Nov 2017 17:00:13 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id aFzVa8u6W9-0DmaofkE; Wed, 01 Nov 2017 17:00:13 +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: Wed, 1 Nov 2017 17:00:06 +0300 Message-Id: <1509544807-5034-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509544807-5034-1-git-send-email-odpbot@yandex.ru> References: <1509544807-5034-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 267 Subject: [lng-odp] [PATCH 2.0 v2 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 linux-generic version of odp_packet_io_internal.h to a common header file. This is part of an attempt to cleanup linux-generic version of odp_packet_io_internal.h from macros used only in linux-generic platform before enabling it for linux-dpdk platform as well. 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: ca1be967bd4f6aec7dc99b72de643718cb8a32b8 ** Merge commit sha: 29fab9a6071107a8bb565ceee1837755d3ca1eee **/ 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 */