DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files
@ 2017-10-19 16:36 Bruce Richardson
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 1/5] eal/bsdapp: align interrupt include file with Linux version Bruce Richardson
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Bruce Richardson @ 2017-10-19 16:36 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Both Linux and BSD EALs should provide exactly the same set of functions
to the user, even if in some cases the function is a stub returning
ENOTSUP. Because of this we should only need a single version.map file for
all of EAL - not one each for Linux and FreeBSD.

Unfortunately, there was some inconsistencies in the two EALs, specifically
4 functions were missing from the BSD interrupts files. As part of adding
the needed stubs, I also discovered that there was nothing terribly
Linux-specific about the Linux-specific rte_interrupts.h file, which
appeared to contain a superset of the BSD contents. Therefore, this file
could be made common also.

The net result is that there are now zero BSD-specific EAL headers, and
only a single Linux one for KNI. The version.map file is now moved to a
common location also, just inside rte_eal directory.

[While an argument could be made to put it in common, this location works
best for integration with the existing meson build-sysetm work. It also
allows the same version file to be used for non-posix-like environments
which may not use the "common" folder as much]


Bruce Richardson (5):
  eal/bsdapp: align interrupt include file with Linux version
  eal/bsdapp: fix missing interrupt stub functions
  eal: merge bsdapp and linuxapp interrupt headers
  eal: mark internal interrupts file as such to doxygen
  eal: use a single version map file

 lib/librte_eal/bsdapp/eal/Makefile                 |   4 +-
 lib/librte_eal/bsdapp/eal/eal_interrupts.c         |  35 +++
 .../bsdapp/eal/include/exec-env/rte_interrupts.h   | 137 -----------
 lib/librte_eal/bsdapp/eal/rte_eal_version.map      | 250 ---------------------
 lib/librte_eal/common/Makefile                     |   3 +-
 .../include/rte_eal_interrupts.h}                  |  24 +-
 lib/librte_eal/common/include/rte_interrupts.h     |   2 +-
 lib/librte_eal/linuxapp/eal/Makefile               |   4 +-
 .../{linuxapp/eal => }/rte_eal_version.map         |   0
 9 files changed, 59 insertions(+), 400 deletions(-)
 delete mode 100644 lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h
 delete mode 100644 lib/librte_eal/bsdapp/eal/rte_eal_version.map
 rename lib/librte_eal/{linuxapp/eal/include/exec-env/rte_interrupts.h => common/include/rte_eal_interrupts.h} (93%)
 rename lib/librte_eal/{linuxapp/eal => }/rte_eal_version.map (100%)

-- 
2.13.6

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 1/5] eal/bsdapp: align interrupt include file with Linux version
  2017-10-19 16:36 [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
@ 2017-10-19 16:36 ` Bruce Richardson
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 2/5] eal/bsdapp: fix missing interrupt stub functions Bruce Richardson
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Bruce Richardson @ 2017-10-19 16:36 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The bsdapp-specific rte_interrupts.h file does not need to be different
from the linuxapp one, as there is nothing Linux specific in the APIs or
data structures. This will then allow us to merge the files in a common
location to avoid duplication.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 .../bsdapp/eal/include/exec-env/rte_interrupts.h   | 150 +++++++++++++++++----
 1 file changed, 127 insertions(+), 23 deletions(-)

diff --git a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h
index c1995ee12..64f8e1eb3 100644
--- a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h
+++ b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h
@@ -35,31 +35,124 @@
 #error "don't include this file directly, please include generic <rte_interrupts.h>"
 #endif
 
-#ifndef _RTE_BSDAPP_INTERRUPTS_H_
-#define _RTE_BSDAPP_INTERRUPTS_H_
+#ifndef _RTE_EAL_INTERRUPTS_H_
+#define _RTE_EAL_INTERRUPTS_H_
 
+#define RTE_MAX_RXTX_INTR_VEC_ID     32
 #define RTE_INTR_VEC_ZERO_OFFSET      0
 #define RTE_INTR_VEC_RXTX_OFFSET      1
 
-#define RTE_MAX_RXTX_INTR_VEC_ID     32
-
+/**
+ * The interrupt source type, e.g. UIO, VFIO, ALARM etc.
+ */
 enum rte_intr_handle_type {
-	RTE_INTR_HANDLE_UNKNOWN = 0,
-	RTE_INTR_HANDLE_UIO,      /**< uio device handle */
-	RTE_INTR_HANDLE_ALARM,    /**< alarm handle */
-	RTE_INTR_HANDLE_MAX
+	RTE_INTR_HANDLE_UNKNOWN = 0,  /**< generic unknown handle */
+	RTE_INTR_HANDLE_UIO,          /**< uio device handle */
+	RTE_INTR_HANDLE_UIO_INTX,     /**< uio generic handle */
+	RTE_INTR_HANDLE_VFIO_LEGACY,  /**< vfio device handle (legacy) */
+	RTE_INTR_HANDLE_VFIO_MSI,     /**< vfio device handle (MSI) */
+	RTE_INTR_HANDLE_VFIO_MSIX,    /**< vfio device handle (MSIX) */
+	RTE_INTR_HANDLE_ALARM,        /**< alarm handle */
+	RTE_INTR_HANDLE_EXT,          /**< external handler */
+	RTE_INTR_HANDLE_VDEV,         /**< virtual device */
+	RTE_INTR_HANDLE_MAX           /**< count of elements */
+};
+
+#define RTE_INTR_EVENT_ADD            1UL
+#define RTE_INTR_EVENT_DEL            2UL
+
+typedef void (*rte_intr_event_cb_t)(int fd, void *arg);
+
+struct rte_epoll_data {
+	uint32_t event;               /**< event type */
+	void *data;                   /**< User data */
+	rte_intr_event_cb_t cb_fun;   /**< IN: callback fun */
+	void *cb_arg;	              /**< IN: callback arg */
+};
+
+enum {
+	RTE_EPOLL_INVALID = 0,
+	RTE_EPOLL_VALID,
+	RTE_EPOLL_EXEC,
+};
+
+/** interrupt epoll event obj, taken by epoll_event.ptr */
+struct rte_epoll_event {
+	volatile uint32_t status;  /**< OUT: event status */
+	int fd;                    /**< OUT: event fd */
+	int epfd;       /**< OUT: epoll instance the ev associated with */
+	struct rte_epoll_data epdata;
 };
 
 /** Handle for interrupts. */
 struct rte_intr_handle {
-	int fd;                          /**< file descriptor */
-	int uio_cfg_fd;                  /**< UIO config file descriptor */
+	RTE_STD_C11
+	union {
+		int vfio_dev_fd;  /**< VFIO device file descriptor */
+		int uio_cfg_fd;  /**< UIO cfg file desc for uio_pci_generic */
+	};
+	int fd;	 /**< interrupt event file descriptor */
 	enum rte_intr_handle_type type;  /**< handle type */
-	int max_intr;                    /**< max interrupt requested */
-	uint32_t nb_efd;                 /**< number of available efds */
-	int *intr_vec;                   /**< intr vector number array */
+	uint32_t max_intr;             /**< max interrupt requested */
+	uint32_t nb_efd;               /**< number of available efd(event fd) */
+	int efds[RTE_MAX_RXTX_INTR_VEC_ID];  /**< intr vectors/efds mapping */
+	struct rte_epoll_event elist[RTE_MAX_RXTX_INTR_VEC_ID];
+				       /**< intr vector epoll event */
+	int *intr_vec;                 /**< intr vector number array */
 };
 
+#define RTE_EPOLL_PER_THREAD        -1  /**< to hint using per thread epfd */
+
+/**
+ * It waits for events on the epoll instance.
+ *
+ * @param epfd
+ *   Epoll instance fd on which the caller wait for events.
+ * @param events
+ *   Memory area contains the events that will be available for the caller.
+ * @param maxevents
+ *   Up to maxevents are returned, must greater than zero.
+ * @param timeout
+ *   Specifying a timeout of -1 causes a block indefinitely.
+ *   Specifying a timeout equal to zero cause to return immediately.
+ * @return
+ *   - On success, returns the number of available event.
+ *   - On failure, a negative value.
+ */
+int
+rte_epoll_wait(int epfd, struct rte_epoll_event *events,
+	       int maxevents, int timeout);
+
+/**
+ * It performs control operations on epoll instance referred by the epfd.
+ * It requests that the operation op be performed for the target fd.
+ *
+ * @param epfd
+ *   Epoll instance fd on which the caller perform control operations.
+ * @param op
+ *   The operation be performed for the target fd.
+ * @param fd
+ *   The target fd on which the control ops perform.
+ * @param event
+ *   Describes the object linked to the fd.
+ *   Note: The caller must take care the object deletion after CTL_DEL.
+ * @return
+ *   - On success, zero.
+ *   - On failure, a negative value.
+ */
+int
+rte_epoll_ctl(int epfd, int op, int fd,
+	      struct rte_epoll_event *event);
+
+/**
+ * The function returns the per thread epoll instance.
+ *
+ * @return
+ *   epfd the epoll instance referred to.
+ */
+int
+rte_intr_tls_epfd(void);
+
 /**
  * @param intr_handle
  *   Pointer to the interrupt handle.
@@ -81,9 +174,18 @@ rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
 		int epfd, int op, unsigned int vec, void *data);
 
 /**
- * It enables the fastpath event fds if it's necessary.
- * It creates event fds when multi-vectors allowed,
- * otherwise it multiplexes the single event fds.
+ * It deletes registered eventfds.
+ *
+ * @param intr_handle
+ *   Pointer to the interrupt handle.
+ */
+void
+rte_intr_free_epoll_fd(struct rte_intr_handle *intr_handle);
+
+/**
+ * It enables the packet I/O interrupt event if it's necessary.
+ * It creates event fd for each interrupt vector when MSIX is used,
+ * otherwise it multiplexes a single event fd.
  *
  * @param intr_handle
  *   Pointer to the interrupt handle.
@@ -98,7 +200,7 @@ int
 rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd);
 
 /**
- * It disable the fastpath event fds.
+ * It disables the packet I/O interrupt event.
  * It deletes registered eventfds and closes the open fds.
  *
  * @param intr_handle
@@ -108,21 +210,23 @@ void
 rte_intr_efd_disable(struct rte_intr_handle *intr_handle);
 
 /**
- * The fastpath interrupt is enabled or not.
+ * The packet I/O interrupt on datapath is enabled or not.
  *
  * @param intr_handle
  *   Pointer to the interrupt handle.
  */
-int rte_intr_dp_is_en(struct rte_intr_handle *intr_handle);
+int
+rte_intr_dp_is_en(struct rte_intr_handle *intr_handle);
 
 /**
- * The interrupt handle instance allows other cause or not.
- * Other cause stands for none fastpath interrupt.
+ * The interrupt handle instance allows other causes or not.
+ * Other causes stand for any none packet I/O interrupts.
  *
  * @param intr_handle
  *   Pointer to the interrupt handle.
  */
-int rte_intr_allow_others(struct rte_intr_handle *intr_handle);
+int
+rte_intr_allow_others(struct rte_intr_handle *intr_handle);
 
 /**
  * The multiple interrupt vector capability of interrupt handle instance.
@@ -134,4 +238,4 @@ int rte_intr_allow_others(struct rte_intr_handle *intr_handle);
 int
 rte_intr_cap_multiple(struct rte_intr_handle *intr_handle);
 
-#endif /* _RTE_BSDAPP_INTERRUPTS_H_ */
+#endif /* _RTE_EAL_INTERRUPTS_H_ */
-- 
2.13.6

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 2/5] eal/bsdapp: fix missing interrupt stub functions
  2017-10-19 16:36 [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 1/5] eal/bsdapp: align interrupt include file with Linux version Bruce Richardson
@ 2017-10-19 16:36 ` Bruce Richardson
  2017-10-20  9:12   ` Bruce Richardson
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 3/5] eal: merge bsdapp and linuxapp interrupt headers Bruce Richardson
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Bruce Richardson @ 2017-10-19 16:36 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

A number of interrupt functions only existed on Linux. Adding in stubs
for these functions corrects this omission, and allows the map files for
both Linux and FreeBSD to be identical.

CC: stable@dpdk.org
Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/bsdapp/eal/eal_interrupts.c    | 35 +++++++++++++++++++++++++++
 lib/librte_eal/bsdapp/eal/rte_eal_version.map |  6 ++++-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/bsdapp/eal/eal_interrupts.c b/lib/librte_eal/bsdapp/eal/eal_interrupts.c
index ea2afff4a..deba87702 100644
--- a/lib/librte_eal/bsdapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/bsdapp/eal/eal_interrupts.c
@@ -125,3 +125,38 @@ rte_intr_cap_multiple(struct rte_intr_handle *intr_handle)
 	RTE_SET_USED(intr_handle);
 	return 0;
 }
+
+int
+rte_epoll_wait(int epfd, struct rte_epoll_event *events,
+		int maxevents, int timeout)
+{
+	RTE_SET_USED(epfd);
+	RTE_SET_USED(events);
+	RTE_SET_USED(maxevents);
+	RTE_SET_USED(timeout);
+
+	return -ENOTSUP;
+}
+
+int
+rte_epoll_ctl(int epfd, int op, int fd, struct rte_epoll_event *event)
+{
+	RTE_SET_USED(epfd);
+	RTE_SET_USED(op);
+	RTE_SET_USED(fd);
+	RTE_SET_USED(event);
+
+	return -ENOTSUP;
+}
+
+int
+rte_intr_tls_epfd(void)
+{
+	return -ENOTSUP;
+}
+
+void
+rte_intr_free_epoll_fd(struct rte_intr_handle *intr_handle)
+{
+	RTE_SET_USED(intr_handle);
+}
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index 080896f73..c173ccfdb 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -96,11 +96,14 @@ DPDK_2.0 {
 DPDK_2.1 {
 	global:
 
+	rte_epoll_ctl;
+	rte_epoll_wait;
 	rte_intr_allow_others;
 	rte_intr_dp_is_en;
 	rte_intr_efd_disable;
 	rte_intr_efd_enable;
 	rte_intr_rx_ctl;
+	rte_intr_tls_epfd;
 	rte_memzone_free;
 
 } DPDK_2.0;
@@ -160,9 +163,10 @@ DPDK_17.05 {
 	global:
 
 	rte_cpu_is_supported;
+	rte_intr_free_epoll_fd;
 	rte_log_dump;
-	rte_log_register;
 	rte_log_get_global_level;
+	rte_log_register;
 	rte_log_set_global_level;
 	rte_log_set_level;
 	rte_log_set_level_regexp;
-- 
2.13.6

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 3/5] eal: merge bsdapp and linuxapp interrupt headers
  2017-10-19 16:36 [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 1/5] eal/bsdapp: align interrupt include file with Linux version Bruce Richardson
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 2/5] eal/bsdapp: fix missing interrupt stub functions Bruce Richardson
@ 2017-10-19 16:36 ` Bruce Richardson
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 4/5] eal: mark internal interrupts file as such to doxygen Bruce Richardson
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Bruce Richardson @ 2017-10-19 16:36 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The linuxapp and bsdapp interrupt header files are now identical, so
merge them into a common file in common/include.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/bsdapp/eal/Makefile                 |   2 +-
 lib/librte_eal/common/Makefile                     |   3 +-
 .../include/rte_eal_interrupts.h}                  |   0
 lib/librte_eal/common/include/rte_interrupts.h     |   2 +-
 lib/librte_eal/linuxapp/eal/Makefile               |   2 +-
 .../linuxapp/eal/include/exec-env/rte_interrupts.h | 239 ---------------------
 6 files changed, 5 insertions(+), 243 deletions(-)
 rename lib/librte_eal/{bsdapp/eal/include/exec-env/rte_interrupts.h => common/include/rte_eal_interrupts.h} (100%)
 delete mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h

diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index 381e3f455..92b8294c3 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -126,7 +126,7 @@ CFLAGS_eal_thread.o += -Wno-return-type
 CFLAGS_eal_hpet.o += -Wno-return-type
 endif
 
-INC := rte_interrupts.h
+INC :=  # no bsdapp specific headers
 
 SYMLINK-$(CONFIG_RTE_EXEC_ENV_BSDAPP)-include/exec-env := \
 	$(addprefix include/exec-env/,$(INC))
diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile
index b33541724..6f5b3f302 100644
--- a/lib/librte_eal/common/Makefile
+++ b/lib/librte_eal/common/Makefile
@@ -32,7 +32,8 @@
 include $(RTE_SDK)/mk/rte.vars.mk
 
 INC := rte_branch_prediction.h rte_common.h
-INC += rte_debug.h rte_eal.h rte_errno.h rte_launch.h rte_lcore.h
+INC += rte_debug.h rte_eal.h rte_eal_interrupts.h
+INC += rte_errno.h rte_launch.h rte_lcore.h
 INC += rte_log.h rte_memory.h rte_memzone.h rte_pci.h
 INC += rte_per_lcore.h rte_random.h
 INC += rte_tailq.h rte_interrupts.h rte_alarm.h
diff --git a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/common/include/rte_eal_interrupts.h
similarity index 100%
rename from lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h
rename to lib/librte_eal/common/include/rte_eal_interrupts.h
diff --git a/lib/librte_eal/common/include/rte_interrupts.h b/lib/librte_eal/common/include/rte_interrupts.h
index 5d06ed79d..43177c7a0 100644
--- a/lib/librte_eal/common/include/rte_interrupts.h
+++ b/lib/librte_eal/common/include/rte_interrupts.h
@@ -53,7 +53,7 @@ struct rte_intr_handle;
 /** Function to be registered for the specific interrupt */
 typedef void (*rte_intr_callback_fn)(void *cb_arg);
 
-#include <exec-env/rte_interrupts.h>
+#include "rte_eal_interrupts.h"
 
 /**
  * It registers the callback for the specific interrupt. Multiple
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 5363683ea..4e581671f 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -146,7 +146,7 @@ ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
 CFLAGS_eal_thread.o += -Wno-return-type
 endif
 
-INC := rte_interrupts.h rte_kni_common.h
+INC := rte_kni_common.h
 
 SYMLINK-$(CONFIG_RTE_EXEC_ENV_LINUXAPP)-include/exec-env := \
 	$(addprefix include/exec-env/,$(INC))
diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h
deleted file mode 100644
index 6daffebf4..000000000
--- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _RTE_INTERRUPTS_H_
-#error "don't include this file directly, please include generic <rte_interrupts.h>"
-#endif
-
-#ifndef _RTE_LINUXAPP_INTERRUPTS_H_
-#define _RTE_LINUXAPP_INTERRUPTS_H_
-
-#define RTE_MAX_RXTX_INTR_VEC_ID     32
-#define RTE_INTR_VEC_ZERO_OFFSET      0
-#define RTE_INTR_VEC_RXTX_OFFSET      1
-
-enum rte_intr_handle_type {
-	RTE_INTR_HANDLE_UNKNOWN = 0,
-	RTE_INTR_HANDLE_UIO,          /**< uio device handle */
-	RTE_INTR_HANDLE_UIO_INTX,     /**< uio generic handle */
-	RTE_INTR_HANDLE_VFIO_LEGACY,  /**< vfio device handle (legacy) */
-	RTE_INTR_HANDLE_VFIO_MSI,     /**< vfio device handle (MSI) */
-	RTE_INTR_HANDLE_VFIO_MSIX,    /**< vfio device handle (MSIX) */
-	RTE_INTR_HANDLE_ALARM,        /**< alarm handle */
-	RTE_INTR_HANDLE_EXT,          /**< external handler */
-	RTE_INTR_HANDLE_VDEV,         /**< virtual device */
-	RTE_INTR_HANDLE_MAX
-};
-
-#define RTE_INTR_EVENT_ADD            1UL
-#define RTE_INTR_EVENT_DEL            2UL
-
-typedef void (*rte_intr_event_cb_t)(int fd, void *arg);
-
-struct rte_epoll_data {
-	uint32_t event;               /**< event type */
-	void *data;                   /**< User data */
-	rte_intr_event_cb_t cb_fun;   /**< IN: callback fun */
-	void *cb_arg;	              /**< IN: callback arg */
-};
-
-enum {
-	RTE_EPOLL_INVALID = 0,
-	RTE_EPOLL_VALID,
-	RTE_EPOLL_EXEC,
-};
-
-/** interrupt epoll event obj, taken by epoll_event.ptr */
-struct rte_epoll_event {
-	volatile uint32_t status;  /**< OUT: event status */
-	int fd;                    /**< OUT: event fd */
-	int epfd;       /**< OUT: epoll instance the ev associated with */
-	struct rte_epoll_data epdata;
-};
-
-/** Handle for interrupts. */
-struct rte_intr_handle {
-	RTE_STD_C11
-	union {
-		int vfio_dev_fd;  /**< VFIO device file descriptor */
-		int uio_cfg_fd;  /**< UIO config file descriptor
-					for uio_pci_generic */
-	};
-	int fd;	 /**< interrupt event file descriptor */
-	enum rte_intr_handle_type type;  /**< handle type */
-	uint32_t max_intr;             /**< max interrupt requested */
-	uint32_t nb_efd;               /**< number of available efd(event fd) */
-	int efds[RTE_MAX_RXTX_INTR_VEC_ID];  /**< intr vectors/efds mapping */
-	struct rte_epoll_event elist[RTE_MAX_RXTX_INTR_VEC_ID];
-				       /**< intr vector epoll event */
-	int *intr_vec;                 /**< intr vector number array */
-};
-
-#define RTE_EPOLL_PER_THREAD        -1  /**< to hint using per thread epfd */
-
-/**
- * It waits for events on the epoll instance.
- *
- * @param epfd
- *   Epoll instance fd on which the caller wait for events.
- * @param events
- *   Memory area contains the events that will be available for the caller.
- * @param maxevents
- *   Up to maxevents are returned, must greater than zero.
- * @param timeout
- *   Specifying a timeout of -1 causes a block indefinitely.
- *   Specifying a timeout equal to zero cause to return immediately.
- * @return
- *   - On success, returns the number of available event.
- *   - On failure, a negative value.
- */
-int
-rte_epoll_wait(int epfd, struct rte_epoll_event *events,
-	       int maxevents, int timeout);
-
-/**
- * It performs control operations on epoll instance referred by the epfd.
- * It requests that the operation op be performed for the target fd.
- *
- * @param epfd
- *   Epoll instance fd on which the caller perform control operations.
- * @param op
- *   The operation be performed for the target fd.
- * @param fd
- *   The target fd on which the control ops perform.
- * @param event
- *   Describes the object linked to the fd.
- *   Note: The caller must take care the object deletion after CTL_DEL.
- * @return
- *   - On success, zero.
- *   - On failure, a negative value.
- */
-int
-rte_epoll_ctl(int epfd, int op, int fd,
-	      struct rte_epoll_event *event);
-
-/**
- * The function returns the per thread epoll instance.
- *
- * @return
- *   epfd the epoll instance referred to.
- */
-int
-rte_intr_tls_epfd(void);
-
-/**
- * @param intr_handle
- *   Pointer to the interrupt handle.
- * @param epfd
- *   Epoll instance fd which the intr vector associated to.
- * @param op
- *   The operation be performed for the vector.
- *   Operation type of {ADD, DEL}.
- * @param vec
- *   RX intr vector number added to the epoll instance wait list.
- * @param data
- *   User raw data.
- * @return
- *   - On success, zero.
- *   - On failure, a negative value.
- */
-int
-rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
-		int epfd, int op, unsigned int vec, void *data);
-
-/**
- * It deletes registered eventfds.
- *
- * @param intr_handle
- *   Pointer to the interrupt handle.
- */
-void
-rte_intr_free_epoll_fd(struct rte_intr_handle *intr_handle);
-
-/**
- * It enables the packet I/O interrupt event if it's necessary.
- * It creates event fd for each interrupt vector when MSIX is used,
- * otherwise it multiplexes a single event fd.
- *
- * @param intr_handle
- *   Pointer to the interrupt handle.
- * @param nb_efd
- *   Number of interrupt vector trying to enable.
- *   The value 0 is not allowed.
- * @return
- *   - On success, zero.
- *   - On failure, a negative value.
- */
-int
-rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd);
-
-/**
- * It disables the packet I/O interrupt event.
- * It deletes registered eventfds and closes the open fds.
- *
- * @param intr_handle
- *   Pointer to the interrupt handle.
- */
-void
-rte_intr_efd_disable(struct rte_intr_handle *intr_handle);
-
-/**
- * The packet I/O interrupt on datapath is enabled or not.
- *
- * @param intr_handle
- *   Pointer to the interrupt handle.
- */
-int
-rte_intr_dp_is_en(struct rte_intr_handle *intr_handle);
-
-/**
- * The interrupt handle instance allows other causes or not.
- * Other causes stand for any none packet I/O interrupts.
- *
- * @param intr_handle
- *   Pointer to the interrupt handle.
- */
-int
-rte_intr_allow_others(struct rte_intr_handle *intr_handle);
-
-/**
- * The multiple interrupt vector capability of interrupt handle instance.
- * It returns zero if no multiple interrupt vector support.
- *
- * @param intr_handle
- *   Pointer to the interrupt handle.
- */
-int
-rte_intr_cap_multiple(struct rte_intr_handle *intr_handle);
-
-#endif /* _RTE_LINUXAPP_INTERRUPTS_H_ */
-- 
2.13.6

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 4/5] eal: mark internal interrupts file as such to doxygen
  2017-10-19 16:36 [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
                   ` (2 preceding siblings ...)
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 3/5] eal: merge bsdapp and linuxapp interrupt headers Bruce Richardson
@ 2017-10-19 16:36 ` Bruce Richardson
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 5/5] eal: use a single version map file Bruce Richardson
  2017-10-19 16:45 ` [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
  5 siblings, 0 replies; 11+ messages in thread
From: Bruce Richardson @ 2017-10-19 16:36 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Put a file-level comment on rte_eal_interrupts.h to mark it as an
internal only header.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/common/include/rte_eal_interrupts.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_eal_interrupts.h b/lib/librte_eal/common/include/rte_eal_interrupts.h
index 64f8e1eb3..5628f62c1 100644
--- a/lib/librte_eal/common/include/rte_eal_interrupts.h
+++ b/lib/librte_eal/common/include/rte_eal_interrupts.h
@@ -35,6 +35,14 @@
 #error "don't include this file directly, please include generic <rte_interrupts.h>"
 #endif
 
+/**
+ * @file rte_eal_interrupts.h
+ * @internal
+ *
+ * Contains function prototypes exposed by the EAL for interrupt handling by
+ * drivers and other DPDK internal consumers.
+ */
+
 #ifndef _RTE_EAL_INTERRUPTS_H_
 #define _RTE_EAL_INTERRUPTS_H_
 
-- 
2.13.6

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 5/5] eal: use a single version map file
  2017-10-19 16:36 [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
                   ` (3 preceding siblings ...)
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 4/5] eal: mark internal interrupts file as such to doxygen Bruce Richardson
@ 2017-10-19 16:36 ` Bruce Richardson
  2017-10-23 23:21   ` Thomas Monjalon
  2017-10-19 16:45 ` [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
  5 siblings, 1 reply; 11+ messages in thread
From: Bruce Richardson @ 2017-10-19 16:36 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Since the functions exported by DPDK EAL on all OS's should be
identical, we should not need separate function version files for each
OS. Therefore move existing version files to the top-level EAL
directory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/bsdapp/eal/Makefile                 |   2 +-
 lib/librte_eal/linuxapp/eal/Makefile               |   2 +-
 lib/librte_eal/linuxapp/eal/rte_eal_version.map    | 254 ---------------------
 .../{bsdapp/eal => }/rte_eal_version.map           |   0
 4 files changed, 2 insertions(+), 256 deletions(-)
 delete mode 100644 lib/librte_eal/linuxapp/eal/rte_eal_version.map
 rename lib/librte_eal/{bsdapp/eal => }/rte_eal_version.map (100%)

diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index 92b8294c3..351fa57f9 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -46,7 +46,7 @@ LDLIBS += -lexecinfo
 LDLIBS += -lpthread
 LDLIBS += -lgcc_s
 
-EXPORT_MAP := rte_eal_version.map
+EXPORT_MAP := ../../rte_eal_version.map
 
 LIBABIVER := 6
 
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 4e581671f..965da6e30 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_eal.a
 
 ARCH_DIR ?= $(RTE_ARCH)
-EXPORT_MAP := rte_eal_version.map
+EXPORT_MAP := ../../rte_eal_version.map
 VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR)
 
 LIBABIVER := 6
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
deleted file mode 100644
index c173ccfdb..000000000
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ /dev/null
@@ -1,254 +0,0 @@
-DPDK_2.0 {
-	global:
-
-	__rte_panic;
-	devargs_list;
-	eal_parse_sysfs_value;
-	eal_timer_source;
-	lcore_config;
-	per_lcore__lcore_id;
-	per_lcore__rte_errno;
-	rte_calloc;
-	rte_calloc_socket;
-	rte_cpu_check_supported;
-	rte_cpu_get_flag_enabled;
-	rte_cycles_vmware_tsc_map;
-	rte_delay_us;
-	rte_dump_physmem_layout;
-	rte_dump_registers;
-	rte_dump_stack;
-	rte_dump_tailq;
-	rte_eal_alarm_cancel;
-	rte_eal_alarm_set;
-	rte_eal_devargs_add;
-	rte_eal_devargs_dump;
-	rte_eal_devargs_type_count;
-	rte_eal_get_configuration;
-	rte_eal_get_lcore_state;
-	rte_eal_get_physmem_layout;
-	rte_eal_get_physmem_size;
-	rte_eal_has_hugepages;
-	rte_eal_hpet_init;
-	rte_eal_init;
-	rte_eal_iopl_init;
-	rte_eal_lcore_role;
-	rte_eal_mp_remote_launch;
-	rte_eal_mp_wait_lcore;
-	rte_eal_parse_devargs_str;
-	rte_eal_process_type;
-	rte_eal_remote_launch;
-	rte_eal_tailq_lookup;
-	rte_eal_tailq_register;
-	rte_eal_wait_lcore;
-	rte_exit;
-	rte_free;
-	rte_get_hpet_cycles;
-	rte_get_hpet_hz;
-	rte_get_log_level;
-	rte_get_log_type;
-	rte_get_tsc_hz;
-	rte_hexdump;
-	rte_intr_callback_register;
-	rte_intr_callback_unregister;
-	rte_intr_disable;
-	rte_intr_enable;
-	rte_log;
-	rte_log_cur_msg_loglevel;
-	rte_log_cur_msg_logtype;
-	rte_logs;
-	rte_malloc;
-	rte_malloc_dump_stats;
-	rte_malloc_get_socket_stats;
-	rte_malloc_set_limit;
-	rte_malloc_socket;
-	rte_malloc_validate;
-	rte_malloc_virt2phy;
-	rte_mem_lock_page;
-	rte_mem_phy2mch;
-	rte_mem_virt2phy;
-	rte_memdump;
-	rte_memory_get_nchannel;
-	rte_memory_get_nrank;
-	rte_memzone_dump;
-	rte_memzone_lookup;
-	rte_memzone_reserve;
-	rte_memzone_reserve_aligned;
-	rte_memzone_reserve_bounded;
-	rte_memzone_walk;
-	rte_openlog_stream;
-	rte_realloc;
-	rte_set_application_usage_hook;
-	rte_set_log_level;
-	rte_set_log_type;
-	rte_socket_id;
-	rte_strerror;
-	rte_strsplit;
-	rte_sys_gettid;
-	rte_thread_get_affinity;
-	rte_thread_set_affinity;
-	rte_vlog;
-	rte_zmalloc;
-	rte_zmalloc_socket;
-
-	local: *;
-};
-
-DPDK_2.1 {
-	global:
-
-	rte_epoll_ctl;
-	rte_epoll_wait;
-	rte_intr_allow_others;
-	rte_intr_dp_is_en;
-	rte_intr_efd_disable;
-	rte_intr_efd_enable;
-	rte_intr_rx_ctl;
-	rte_intr_tls_epfd;
-	rte_memzone_free;
-
-} DPDK_2.0;
-
-DPDK_2.2 {
-	global:
-
-	rte_intr_cap_multiple;
-	rte_keepalive_create;
-	rte_keepalive_dispatch_pings;
-	rte_keepalive_mark_alive;
-	rte_keepalive_register_core;
-
-} DPDK_2.1;
-
-DPDK_16.04 {
-	global:
-
-	rte_cpu_get_flag_name;
-	rte_eal_primary_proc_alive;
-
-} DPDK_2.2;
-
-DPDK_16.07 {
-	global:
-
-	pci_get_sysfs_path;
-	rte_keepalive_mark_sleep;
-	rte_keepalive_register_relay_callback;
-	rte_rtm_supported;
-	rte_thread_setname;
-
-} DPDK_16.04;
-
-DPDK_16.11 {
-	global:
-
-	rte_delay_us_block;
-	rte_delay_us_callback_register;
-	rte_eal_dev_attach;
-	rte_eal_dev_detach;
-
-} DPDK_16.07;
-
-DPDK_17.02 {
-	global:
-
-	rte_bus_dump;
-	rte_bus_probe;
-	rte_bus_register;
-	rte_bus_scan;
-	rte_bus_unregister;
-
-} DPDK_16.11;
-
-DPDK_17.05 {
-	global:
-
-	rte_cpu_is_supported;
-	rte_intr_free_epoll_fd;
-	rte_log_dump;
-	rte_log_get_global_level;
-	rte_log_register;
-	rte_log_set_global_level;
-	rte_log_set_level;
-	rte_log_set_level_regexp;
-	rte_pci_detach;
-	rte_pci_dump;
-	rte_pci_ioport_map;
-	rte_pci_ioport_read;
-	rte_pci_ioport_unmap;
-	rte_pci_ioport_write;
-	rte_pci_map_device;
-	rte_pci_probe;
-	rte_pci_probe_one;
-	rte_pci_read_config;
-	rte_pci_register;
-	rte_pci_scan;
-	rte_pci_unmap_device;
-	rte_pci_unregister;
-	rte_pci_write_config;
-	rte_vdev_init;
-	rte_vdev_register;
-	rte_vdev_uninit;
-	rte_vdev_unregister;
-	vfio_get_container_fd;
-	vfio_get_group_fd;
-	vfio_get_group_no;
-
-} DPDK_17.02;
-
-DPDK_17.08 {
-	global:
-
-	rte_bus_find;
-	rte_bus_find_by_device;
-	rte_bus_find_by_name;
-	rte_log_get_level;
-
-} DPDK_17.05;
-
-EXPERIMENTAL {
-	global:
-
-	rte_eal_devargs_insert;
-	rte_eal_devargs_parse;
-	rte_eal_devargs_remove;
-	rte_eal_hotplug_add;
-	rte_eal_hotplug_remove;
-	rte_service_component_register;
-	rte_service_component_unregister;
-	rte_service_component_runstate_set;
-	rte_service_dump;
-	rte_service_get_by_id;
-	rte_service_get_by_name;
-	rte_service_get_count;
-	rte_service_get_name;
-	rte_service_lcore_add;
-	rte_service_lcore_count;
-	rte_service_lcore_count_services;
-	rte_service_lcore_del;
-	rte_service_lcore_list;
-	rte_service_lcore_reset_all;
-	rte_service_lcore_start;
-	rte_service_lcore_stop;
-	rte_service_map_lcore_get;
-	rte_service_map_lcore_set;
-	rte_service_probe_capability;
-	rte_service_reset;
-	rte_service_runstate_get;
-	rte_service_runstate_set;
-	rte_service_set_stats_enable;
-	rte_service_start_with_defaults;
-
-} DPDK_17.08;
-
-DPDK_17.11 {
-	global:
-
-	rte_bus_get_iommu_class;
-	rte_eal_iova_mode;
-	rte_eal_mbuf_default_mempool_ops;
-	rte_lcore_has_role;
-	rte_memcpy_ptr;
-	rte_pci_get_iommu_class;
-	rte_pci_match;
-
-} DPDK_17.08;
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
similarity index 100%
rename from lib/librte_eal/bsdapp/eal/rte_eal_version.map
rename to lib/librte_eal/rte_eal_version.map
-- 
2.13.6

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files
  2017-10-19 16:36 [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
                   ` (4 preceding siblings ...)
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 5/5] eal: use a single version map file Bruce Richardson
@ 2017-10-19 16:45 ` Bruce Richardson
  2017-10-23 23:23   ` Thomas Monjalon
  5 siblings, 1 reply; 11+ messages in thread
From: Bruce Richardson @ 2017-10-19 16:45 UTC (permalink / raw)
  To: dev

On Thu, Oct 19, 2017 at 05:36:24PM +0100, Bruce Richardson wrote:
> Both Linux and BSD EALs should provide exactly the same set of functions
> to the user, even if in some cases the function is a stub returning
> ENOTSUP. Because of this we should only need a single version.map file for
> all of EAL - not one each for Linux and FreeBSD.
> 
> Unfortunately, there was some inconsistencies in the two EALs, specifically
> 4 functions were missing from the BSD interrupts files. As part of adding
> the needed stubs, I also discovered that there was nothing terribly
> Linux-specific about the Linux-specific rte_interrupts.h file, which
> appeared to contain a superset of the BSD contents. Therefore, this file
> could be made common also.
> 
> The net result is that there are now zero BSD-specific EAL headers, and
> only a single Linux one for KNI. The version.map file is now moved to a
> common location also, just inside rte_eal directory.
> 
> [While an argument could be made to put it in common, this location works
> best for integration with the existing meson build-sysetm work. It also
> allows the same version file to be used for non-posix-like environments
> which may not use the "common" folder as much]
> 
> 
> Bruce Richardson (5):
>   eal/bsdapp: align interrupt include file with Linux version
>   eal/bsdapp: fix missing interrupt stub functions
>   eal: merge bsdapp and linuxapp interrupt headers
>   eal: mark internal interrupts file as such to doxygen
>   eal: use a single version map file
> 

Compilation tested for both static and shared builds on FreeBSD 11.0 and
Fedora 26.

/Bruce

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 2/5] eal/bsdapp: fix missing interrupt stub functions
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 2/5] eal/bsdapp: fix missing interrupt stub functions Bruce Richardson
@ 2017-10-20  9:12   ` Bruce Richardson
  0 siblings, 0 replies; 11+ messages in thread
From: Bruce Richardson @ 2017-10-20  9:12 UTC (permalink / raw)
  To: dev; +Cc: stable

On Thu, Oct 19, 2017 at 05:36:26PM +0100, Bruce Richardson wrote:
> A number of interrupt functions only existed on Linux. Adding in stubs
> for these functions corrects this omission, and allows the map files for
> both Linux and FreeBSD to be identical.
> 
> CC: stable@dpdk.org
> Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
> 
Apologies, I just realised that this fix patch probably can't be
back-ported to stable on it's own, since it would be missing the header
file updates in the previous patch. Also, not sure if this is worth
taking to stable, but if it is, more patches in the set can be taken
too.

Regards,
/Bruce

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 5/5] eal: use a single version map file
  2017-10-19 16:36 ` [dpdk-dev] [PATCH 5/5] eal: use a single version map file Bruce Richardson
@ 2017-10-23 23:21   ` Thomas Monjalon
  2017-10-24  9:48     ` Bruce Richardson
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Monjalon @ 2017-10-23 23:21 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

19/10/2017 18:36, Bruce Richardson:
> Since the functions exported by DPDK EAL on all OS's should be
> identical, we should not need separate function version files for each
> OS. Therefore move existing version files to the top-level EAL
> directory.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

This small change is missing and added when applying:

--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -88,6 +88,7 @@ EAL API and common code
 F: lib/librte_eal/common/*
 F: lib/librte_eal/common/include/*
 F: lib/librte_eal/common/include/generic/
+F: lib/librte_eal/rte_eal_version.map
 F: doc/guides/prog_guide/env_abstraction_layer.rst
 F: test/test/test_alarm.c
 F: test/test/test_atomic.c

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files
  2017-10-19 16:45 ` [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
@ 2017-10-23 23:23   ` Thomas Monjalon
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2017-10-23 23:23 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

19/10/2017 18:45, Bruce Richardson:
> On Thu, Oct 19, 2017 at 05:36:24PM +0100, Bruce Richardson wrote:
> > Both Linux and BSD EALs should provide exactly the same set of functions
> > to the user, even if in some cases the function is a stub returning
> > ENOTSUP. Because of this we should only need a single version.map file for
> > all of EAL - not one each for Linux and FreeBSD.
> > 
> > Unfortunately, there was some inconsistencies in the two EALs, specifically
> > 4 functions were missing from the BSD interrupts files. As part of adding
> > the needed stubs, I also discovered that there was nothing terribly
> > Linux-specific about the Linux-specific rte_interrupts.h file, which
> > appeared to contain a superset of the BSD contents. Therefore, this file
> > could be made common also.
> > 
> > The net result is that there are now zero BSD-specific EAL headers, and
> > only a single Linux one for KNI. The version.map file is now moved to a
> > common location also, just inside rte_eal directory.
> > 
> > [While an argument could be made to put it in common, this location works
> > best for integration with the existing meson build-sysetm work. It also
> > allows the same version file to be used for non-posix-like environments
> > which may not use the "common" folder as much]
> > 
> > 
> > Bruce Richardson (5):
> >   eal/bsdapp: align interrupt include file with Linux version
> >   eal/bsdapp: fix missing interrupt stub functions
> >   eal: merge bsdapp and linuxapp interrupt headers
> >   eal: mark internal interrupts file as such to doxygen
> >   eal: use a single version map file
> > 
> 
> Compilation tested for both static and shared builds on FreeBSD 11.0 and
> Fedora 26.

Applied, thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 5/5] eal: use a single version map file
  2017-10-23 23:21   ` Thomas Monjalon
@ 2017-10-24  9:48     ` Bruce Richardson
  0 siblings, 0 replies; 11+ messages in thread
From: Bruce Richardson @ 2017-10-24  9:48 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Tue, Oct 24, 2017 at 01:21:39AM +0200, Thomas Monjalon wrote:
> 19/10/2017 18:36, Bruce Richardson:
> > Since the functions exported by DPDK EAL on all OS's should be
> > identical, we should not need separate function version files for each
> > OS. Therefore move existing version files to the top-level EAL
> > directory.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> This small change is missing and added when applying:
> 
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -88,6 +88,7 @@ EAL API and common code
>  F: lib/librte_eal/common/*
>  F: lib/librte_eal/common/include/*
>  F: lib/librte_eal/common/include/generic/
> +F: lib/librte_eal/rte_eal_version.map
>  F: doc/guides/prog_guide/env_abstraction_layer.rst
>  F: test/test/test_alarm.c
>  F: test/test/test_atomic.c
> 

Thanks, good catch.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-10-24  9:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 16:36 [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
2017-10-19 16:36 ` [dpdk-dev] [PATCH 1/5] eal/bsdapp: align interrupt include file with Linux version Bruce Richardson
2017-10-19 16:36 ` [dpdk-dev] [PATCH 2/5] eal/bsdapp: fix missing interrupt stub functions Bruce Richardson
2017-10-20  9:12   ` Bruce Richardson
2017-10-19 16:36 ` [dpdk-dev] [PATCH 3/5] eal: merge bsdapp and linuxapp interrupt headers Bruce Richardson
2017-10-19 16:36 ` [dpdk-dev] [PATCH 4/5] eal: mark internal interrupts file as such to doxygen Bruce Richardson
2017-10-19 16:36 ` [dpdk-dev] [PATCH 5/5] eal: use a single version map file Bruce Richardson
2017-10-23 23:21   ` Thomas Monjalon
2017-10-24  9:48     ` Bruce Richardson
2017-10-19 16:45 ` [dpdk-dev] [PATCH 0/5] Merge Linux and BSD EAL map files Bruce Richardson
2017-10-23 23:23   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).