This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, 2.0 has been updated via c0f99c441feadd1566b7e92789b11c30c6ee3f64 (commit) via 3fc5b2aa0d85c5fb6800f06fcbf836ea1ac43337 (commit) via d8b56f1fa9ad273cb251675a46e92635b38adc92 (commit) via e971a0f4b8135812d268415d279ef3f618f4ee41 (commit) from ca1be967bd4f6aec7dc99b72de643718cb8a32b8 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit c0f99c441feadd1566b7e92789b11c30c6ee3f64 Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Tue Oct 31 11:30:45 2017 +0200
linux-gen: pktio: remove duplicate odp_packet_io_internal.h
Enable utilization of linux-generic version of odp_packet_io_internal.h for linux-dpdk platform. Subsequently, linux-dpdk version of odp_packet_io_internal.h is removed. This is part of an attempt to reduce the delta between linux-dpdk and linux-generic platforms to permit integration of linux-dpdk pktios in linux-generic.
Signed-off-by: Bogdan Pricope bogdan.pricope@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Honnappa Nagarahalli honnappa.Nagarahalli@arm.com Reviewed-by: Krishna Garapati balakrishna.garapati@linaro.org Signed-off-by: Yi He yi.he@linaro.org
diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am index e2a0249d..596c7b78 100644 --- a/platform/linux-dpdk/Makefile.am +++ b/platform/linux-dpdk/Makefile.am @@ -199,7 +199,7 @@ noinst_HEADERS = \ ${top_srcdir}/platform/linux-generic/include/odp_pktio_ops_socket.h \ ${top_srcdir}/platform/linux-generic/include/odp_pktio_ops_loopback.h \ ${top_srcdir}/platform/linux-generic/include/odp_name_table_internal.h \ - ${srcdir}/include/odp_packet_io_internal.h \ + ${top_srcdir}/platform/linux-generic/include/odp_packet_io_internal.h \ ${srcdir}/include/odp_errno_define.h \ ${top_srcdir}/platform/linux-generic/include/odp_packet_io_ring_internal.h \ ${top_srcdir}/platform/linux-generic/include/odp_pkt_queue_internal.h \ diff --git a/platform/linux-dpdk/include/odp_packet_io_internal.h b/platform/linux-dpdk/include/odp_packet_io_internal.h deleted file mode 100644 index 089ad38c..00000000 --- a/platform/linux-dpdk/include/odp_packet_io_internal.h +++ /dev/null @@ -1,157 +0,0 @@ -/* Copyright (c) 2013, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP packet IO - implementation internal - */ - -#ifndef ODP_PACKET_IO_INTERNAL_H_ -#define ODP_PACKET_IO_INTERNAL_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include <odp/api/spinlock.h> -#include <odp/api/ticketlock.h> -#include <odp_classification_datamodel.h> -#include <odp_align_internal.h> -#include <odp_debug_internal.h> -#include <odp_queue_if.h> - -#include <odp_config_internal.h> -#include <odp/api/hints.h> - -#define PKTIO_MAX_QUEUES 64 -#include <linux/if_ether.h> - -/* Forward declaration */ -typedef union pktio_entry_u pktio_entry_t; -#include <odp_pktio_ops_subsystem.h> - -#define PKTIO_NAME_LEN 256 - -#define PKTIN_INVALID ((odp_pktin_queue_t) {ODP_PKTIO_INVALID, 0}) -#define PKTOUT_INVALID ((odp_pktout_queue_t) {ODP_PKTIO_INVALID, 0}) - -struct pktio_entry { - const pktio_ops_module_t *ops; /**< Implementation specific methods */ - uint8_t ops_data[ODP_PKTIO_ODPS_DATA_MAX_SIZE]; /**< IO operation - specific data */ - /* These two locks together lock the whole pktio device */ - odp_ticketlock_t rxl; /**< RX ticketlock */ - odp_ticketlock_t txl; /**< TX ticketlock */ - int cls_enabled; /**< is classifier enabled */ - odp_pktio_t handle; /**< pktio handle */ - enum { - /* Not allocated */ - PKTIO_STATE_FREE = 0, - /* Close pending on scheduler response. Next state after this - * is PKTIO_STATE_FREE. */ - PKTIO_STATE_CLOSE_PENDING, - /* Open in progress. - Marker for all active states following under. */ - PKTIO_STATE_ACTIVE, - /* Open completed */ - PKTIO_STATE_OPENED, - /* Start completed */ - PKTIO_STATE_STARTED, - /* Stop pending on scheduler response */ - PKTIO_STATE_STOP_PENDING, - /* Stop completed */ - PKTIO_STATE_STOPPED - } state; - odp_pktio_config_t config; /**< Device configuration */ - classifier_t cls; /**< classifier linked with this pktio*/ - odp_pktio_stats_t stats; /**< statistic counters for pktio */ - char name[PKTIO_NAME_LEN]; /**< name of pktio provided to - pktio_open() */ - odp_pool_t pool; - odp_pktio_param_t param; - - /* Storage for queue handles - * Multi-queue support is pktio driver specific */ - unsigned num_in_queue; - unsigned num_out_queue; - - struct { - odp_queue_t queue; - queue_t queue_int; - odp_pktin_queue_t pktin; - } in_queue[PKTIO_MAX_QUEUES]; - - struct { - odp_queue_t queue; - odp_pktout_queue_t pktout; - } out_queue[PKTIO_MAX_QUEUES]; -}; - -union pktio_entry_u { - struct pktio_entry s; - uint8_t pad[ROUNDUP_CACHE_LINE(sizeof(struct pktio_entry))]; -}; - -typedef struct { - odp_spinlock_t lock; - pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES]; -} pktio_table_t; - -extern void *pktio_entry_ptr[]; - -static inline int pktio_to_id(odp_pktio_t pktio) -{ - return _odp_typeval(pktio) - 1; -} - -static inline pktio_entry_t *get_pktio_entry(odp_pktio_t pktio) -{ - if (odp_unlikely(pktio == ODP_PKTIO_INVALID)) - return NULL; - - if (odp_unlikely(_odp_typeval(pktio) > ODP_CONFIG_PKTIO_ENTRIES)) { - ODP_DBG("pktio limit %d/%d exceed\n", - _odp_typeval(pktio), ODP_CONFIG_PKTIO_ENTRIES); - return NULL; - } - - return pktio_entry_ptr[pktio_to_id(pktio)]; -} - -static inline int pktio_cls_enabled(pktio_entry_t *entry) -{ - return entry->s.cls_enabled; -} - -static inline void pktio_cls_enabled_set(pktio_entry_t *entry, int ena) -{ - entry->s.cls_enabled = ena; -} - -/* - * Dummy single queue implementations of multi-queue API - */ -int single_input_queues_config(pktio_entry_t *entry, - const odp_pktin_queue_param_t *param); -int single_output_queues_config(pktio_entry_t *entry, - const odp_pktout_queue_param_t *param); -int single_recv_queue(pktio_entry_t *entry, int index, odp_packet_t packets[], - int num); -int single_send_queue(pktio_entry_t *entry, int index, - const odp_packet_t packets[], int num); - -int pktin_poll_one(int pktio_index, - int rx_queue, - odp_event_t evt_tbl[]); -int pktin_poll(int pktio_index, int num_queue, int index[]); -void pktio_stop_finalize(int pktio_index); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index a2e1fdd9..7df11618 100644 --- a/platform/linux-generic/include/odp_packet_io_internal.h +++ b/platform/linux-generic/include/odp_packet_io_internal.h @@ -25,7 +25,6 @@ extern "C" { #include <odp_classification_datamodel.h> #include <odp_align_internal.h> #include <odp_debug_internal.h> -#include <odp_packet_io_ring_internal.h> #include <odp_queue_if.h>
#include <odp_config_internal.h> diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index beeb9c6b..d5f8d5de 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -186,6 +186,7 @@ static odp_pktio_t setup_pktio_entry(const char *name, odp_pool_t pool, pktio_entry->s.pool = pool; memcpy(&pktio_entry->s.param, param, sizeof(odp_pktio_param_t)); pktio_entry->s.handle = hdl; + pktio_entry->s.stats_type = STATS_UNSUPPORTED;
odp_pktio_config_init(&pktio_entry->s.config);
commit 3fc5b2aa0d85c5fb6800f06fcbf836ea1ac43337 Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Mon Oct 30 15:59:34 2017 +0200
linux-gen: pktio: move SOCK_ERR_REPORT macro from odp_packet_io_internal.h
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 bogdan.pricope@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Honnappa Nagarahalli honnappa.Nagarahalli@arm.com Reviewed-by: Krishna Garapati balakrishna.garapati@linaro.org Signed-off-by: Yi He yi.he@linaro.org
diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index 1302a59b..a2e1fdd9 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 025e1893..2ea68f64 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 */
commit d8b56f1fa9ad273cb251675a46e92635b38adc92 Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Mon Oct 30 15:31:14 2017 +0200
linux-gen: pktio: move sysfs stats function prototype
Move sysfs stats function prototype from linux-generic version of odp_packet_io_internal.h to a new header file. This is part of an attempt to remove from linux-generic version of odp_packet_io_internal.h all the references to symbols implemented only in linux-generic platform before enabling it for linux-dpdk platform as well.
Signed-off-by: Bogdan Pricope bogdan.pricope@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Honnappa Nagarahalli honnappa.Nagarahalli@arm.com Reviewed-by: Krishna Garapati balakrishna.garapati@linaro.org Signed-off-by: Yi He yi.he@linaro.org
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 27741814..db466dd2 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -177,6 +177,7 @@ noinst_HEADERS = \ ${srcdir}/include/odp_packet_io_ring_internal.h \ ${srcdir}/pktio/ethtool.h \ ${srcdir}/pktio/common.h \ + ${srcdir}/pktio/sysfs.h \ ${srcdir}/pktio/dpdk.h \ ${srcdir}/include/odp_pktio_ops_ipc.h \ ${srcdir}/include/odp_pktio_ops_loopback.h \ diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index e078cc82..1302a59b 100644 --- a/platform/linux-generic/include/odp_packet_io_internal.h +++ b/platform/linux-generic/include/odp_packet_io_internal.h @@ -147,9 +147,6 @@ static inline void pktio_cls_enabled_set(pktio_entry_t *entry, int ena) entry->s.cls_enabled = ena; }
-int sysfs_stats(pktio_entry_t *pktio_entry, - odp_pktio_stats_t *stats); - int pktin_poll_one(int pktio_index, int rx_queue, odp_event_t evt_tbl[]); diff --git a/platform/linux-generic/pktio/common.c b/platform/linux-generic/pktio/common.c index 050d2d95..900dcbba 100644 --- a/platform/linux-generic/pktio/common.c +++ b/platform/linux-generic/pktio/common.c @@ -11,6 +11,7 @@ #include <odp_classification_internal.h> #include <pktio/ethtool.h> #include <pktio/common.h> +#include <pktio/sysfs.h> #include <errno.h> #include <sys/ioctl.h> #include <sys/types.h> diff --git a/platform/linux-generic/pktio/socket.c b/platform/linux-generic/pktio/socket.c index 7481f4f7..d9f85b29 100644 --- a/platform/linux-generic/pktio/socket.c +++ b/platform/linux-generic/pktio/socket.c @@ -47,6 +47,7 @@ #include <odp/api/hints.h> #include <odp_pktio_ops_socket.h> #include <pktio/common.h> +#include <pktio/sysfs.h> #include <pktio/ethtool.h>
#include <protocols/eth.h> diff --git a/platform/linux-generic/pktio/socket_mmap.c b/platform/linux-generic/pktio/socket_mmap.c index 67d2b920..9b35d89f 100644 --- a/platform/linux-generic/pktio/socket_mmap.c +++ b/platform/linux-generic/pktio/socket_mmap.c @@ -36,6 +36,7 @@ #include <odp/api/hints.h> #include <odp_pktio_ops_socket.h> #include <pktio/common.h> +#include <pktio/sysfs.h> #include <pktio/ethtool.h>
#include <protocols/eth.h> diff --git a/platform/linux-generic/pktio/sysfs.c b/platform/linux-generic/pktio/sysfs.c index c3d4faea..f674ac42 100644 --- a/platform/linux-generic/pktio/sysfs.c +++ b/platform/linux-generic/pktio/sysfs.c @@ -8,6 +8,7 @@
#include <odp_api.h> #include <odp_packet_io_internal.h> +#include <pktio/sysfs.h> #include <errno.h> #include <string.h> #include <inttypes.h> diff --git a/platform/linux-generic/pktio/sysfs.h b/platform/linux-generic/pktio/sysfs.h new file mode 100644 index 00000000..f8fe3072 --- /dev/null +++ b/platform/linux-generic/pktio/sysfs.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_PKTIO_SYSFS_H_ +#define ODP_PKTIO_SYSFS_H_ + +/** + * Get statistics for a pktio entry + * + * @param pktio_entry Packet IO entry + * @param stats[out] Output buffer for counters + * + * @retval 0 on success + * @retval != 0 on failure + */ + +int sysfs_stats(pktio_entry_t *pktio_entry, + odp_pktio_stats_t *stats); + +#endif /* ODP_PKTIO_SYSFS_H_ */
commit e971a0f4b8135812d268415d279ef3f618f4ee41 Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Mon Oct 30 14:39:46 2017 +0200
linux-gen: pktio: move socket stats function prototypes
Move socket stats function prototypes from linux-generic version of odp_packet_io_internal.h. This is part of an attempt to remove from this header file all the references to symbols implemented only in linux-generic platform before enabling it for linux-dpdk platform as well.
Signed-off-by: Bogdan Pricope bogdan.pricope@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Honnappa Nagarahalli honnappa.Nagarahalli@arm.com Reviewed-by: Krishna Garapati balakrishna.garapati@linaro.org Signed-off-by: Yi He yi.he@linaro.org
diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index b26a35d2..e078cc82 100644 --- a/platform/linux-generic/include/odp_packet_io_internal.h +++ b/platform/linux-generic/include/odp_packet_io_internal.h @@ -149,10 +149,6 @@ static inline void pktio_cls_enabled_set(pktio_entry_t *entry, int ena)
int sysfs_stats(pktio_entry_t *pktio_entry, odp_pktio_stats_t *stats); -int sock_stats_fd(pktio_entry_t *pktio_entry, - odp_pktio_stats_t *stats, - int fd); -int sock_stats_reset_fd(pktio_entry_t *pktio_entry, int fd);
int pktin_poll_one(int pktio_index, int rx_queue, diff --git a/platform/linux-generic/pktio/common.c b/platform/linux-generic/pktio/common.c index 4c952e46..050d2d95 100644 --- a/platform/linux-generic/pktio/common.c +++ b/platform/linux-generic/pktio/common.c @@ -21,6 +21,11 @@ #include <linux/if_packet.h> #include <linux/if_ether.h>
+/* + * ODP_PACKET_SOCKET_MMSG: + * ODP_PACKET_SOCKET_MMAP: + * ODP_PACKET_NETMAP: + */ int sock_stats_reset_fd(pktio_entry_t *pktio_entry, int fd) { int err = 0; @@ -51,6 +56,11 @@ int sock_stats_reset_fd(pktio_entry_t *pktio_entry, int fd) return err; }
+/* + * ODP_PACKET_SOCKET_MMSG: + * ODP_PACKET_SOCKET_MMAP: + * ODP_PACKET_NETMAP: + */ int sock_stats_fd(pktio_entry_t *pktio_entry, odp_pktio_stats_t *stats, int fd) diff --git a/platform/linux-generic/pktio/common.h b/platform/linux-generic/pktio/common.h index 2940af14..025e1893 100644 --- a/platform/linux-generic/pktio/common.h +++ b/platform/linux-generic/pktio/common.h @@ -78,4 +78,29 @@ int rss_conf_set_fd(int fd, const char *name, */ void rss_conf_print(const odp_pktin_hash_proto_t *hash_proto);
+/** + * Get statistics for pktio entry + * + * @param pktio_entry Packet IO entry + * @param stats[out] Output buffer for counters + * @param fd Socket file descriptor + * + * @retval 0 on success + * @retval != 0 on failure + */ +int sock_stats_fd(pktio_entry_t *pktio_entry, + odp_pktio_stats_t *stats, + int fd); + +/** + * Reset statistics for pktio entry + * + * @param pktio_entry Packet IO entry + * @param fd Socket file descriptor + * + * @retval 0 on success + * @retval != 0 on failure + */ +int sock_stats_reset_fd(pktio_entry_t *pktio_entry, int fd); + #endif /*ODP_PKTIO_COMMON_H_*/
-----------------------------------------------------------------------
Summary of changes: platform/linux-dpdk/Makefile.am | 2 +- .../linux-dpdk/include/odp_packet_io_internal.h | 157 --------------------- platform/linux-generic/Makefile.am | 1 + .../linux-generic/include/odp_packet_io_internal.h | 14 -- platform/linux-generic/odp_packet_io.c | 1 + platform/linux-generic/pktio/common.c | 11 ++ platform/linux-generic/pktio/common.h | 33 +++++ platform/linux-generic/pktio/socket.c | 1 + platform/linux-generic/pktio/socket_mmap.c | 1 + platform/linux-generic/pktio/sysfs.c | 1 + platform/linux-generic/pktio/sysfs.h | 23 +++ 11 files changed, 73 insertions(+), 172 deletions(-) delete mode 100644 platform/linux-dpdk/include/odp_packet_io_internal.h create mode 100644 platform/linux-generic/pktio/sysfs.h
hooks/post-receive