diff mbox series

[2.0,v1,3/4] linux-gen: pktio: move SOCK_ERR_REPORT macro from odp_packet_io_internal.h

Message ID 1509447606-15110-4-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [2.0,v1,1/4] linux-gen: pktio: move socket stats function prototypes | expand

Commit Message

Github ODP bot Oct. 31, 2017, 11 a.m. UTC
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Move SOCK_ERR_REPORT macro from odp_packet_io_internal.h.

Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>

---
/** 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 mbox series

Patch

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 <errno.h>
+
+/** 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
  */