diff --git a/0002-examples-ip_pipeline-fix-implicit-declaration-of-fun.patch b/0002-examples-ip_pipeline-fix-implicit-declaration-of-fun.patch deleted file mode 100644 index f7b24b6..0000000 --- a/0002-examples-ip_pipeline-fix-implicit-declaration-of-fun.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 760a997d09d671d3d90f738bae7d0c6e466bf058 Mon Sep 17 00:00:00 2001 -From: Nirmoy Das -Date: Mon, 11 Apr 2016 15:28:31 +0200 -Subject: [PATCH 2/2] examples/ip_pipeline: fix implicit declaration of - function '_mm_crc32_u64' - -Inspired by http://pkgs.fedoraproject.org/cgit/rpms/dpdk.git/tree/dpdk-2.2-examples.patch ---- - examples/ip_pipeline/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile -index 10fe1ba..472dc5d 100644 ---- a/examples/ip_pipeline/Makefile -+++ b/examples/ip_pipeline/Makefile -@@ -73,7 +73,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_routing_be.c - SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_routing.c - - CFLAGS += -I$(SRCDIR) -I$(SRCDIR)/pipeline --CFLAGS += -O3 -+CFLAGS += -O3 -msse4 - CFLAGS += $(WERROR_FLAGS) -Wno-error=unused-function -Wno-error=unused-variable - - include $(RTE_SDK)/mk/rte.extapp.mk --- -2.6.2 - diff --git a/0003-mk-fix-external-shared-library-dependencies-of-libraries.patch b/0003-mk-fix-external-shared-library-dependencies-of-libraries.patch deleted file mode 100644 index 18608ce..0000000 --- a/0003-mk-fix-external-shared-library-dependencies-of-libraries.patch +++ /dev/null @@ -1,152 +0,0 @@ -commit f85ab16a916be178a4cb61575f414c43fc98313d -Author: Panu Matilainen -Date: Tue Dec 8 13:42:26 2015 +0200 - - mk: fix external shared library dependencies of libraries - - Similar to commit 5f9115e58cc6f304ff4ade694cf5823d32887d1a etc, but - for libraries. Clean up librte_vhost CFLAGS/LDFLAGS/LDLIBS confusion - while at it. - - Requiring applications to know about library internal details like - dependencies to external helper libraries is a limitation of - static linkage, shared libraries should always know their own - dependencies for sane operation. - - Linking with the combined library (whether shared or not) still - requires knowing the internal dependencies, and intra-dpdk - dependencies are also not currently recorded. - - Signed-off-by: Panu Matilainen - -diff --git a/app/test/Makefile b/app/test/Makefile -index ec33e1a..abb0545 100644 ---- a/app/test/Makefile -+++ b/app/test/Makefile -@@ -182,6 +182,8 @@ endif - endif - endif - -+LDLIBS += -lm -+ - include $(RTE_SDK)/mk/rte.app.mk - - endif -diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile -index 65b293f..b7b6016 100644 ---- a/lib/librte_eal/bsdapp/eal/Makefile -+++ b/lib/librte_eal/bsdapp/eal/Makefile -@@ -42,6 +42,9 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_ring - CFLAGS += -I$(RTE_SDK)/lib/librte_mempool - CFLAGS += $(WERROR_FLAGS) -O3 - -+LDLIBS += -lpthread -+LDLIBS += -ldl -+ - EXPORT_MAP := rte_eal_version.map - - LIBABIVER := 2 -diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile -index 26eced5..0efb9e4 100644 ---- a/lib/librte_eal/linuxapp/eal/Makefile -+++ b/lib/librte_eal/linuxapp/eal/Makefile -@@ -47,6 +47,9 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_mempool - CFLAGS += -I$(RTE_SDK)/lib/librte_ivshmem - CFLAGS += $(WERROR_FLAGS) -O3 - -+LDLIBS += -lpthread -+LDLIBS += -ldl -+ - # specific to linuxapp exec-env - SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) := eal.c - SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_hugepage_info.c -diff --git a/lib/librte_sched/Makefile b/lib/librte_sched/Makefile -index b1cb285..4d631f6 100644 ---- a/lib/librte_sched/Makefile -+++ b/lib/librte_sched/Makefile -@@ -41,6 +41,9 @@ CFLAGS += $(WERROR_FLAGS) - - CFLAGS_rte_red.o := -D_GNU_SOURCE - -+LDLIBS += -lm -+LDLIBS += -lrt -+ - EXPORT_MAP := rte_sched_version.map - - LIBABIVER := 1 -diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile -index 6681f22..4aecc69 100644 ---- a/lib/librte_vhost/Makefile -+++ b/lib/librte_vhost/Makefile -@@ -42,12 +42,12 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -D_FILE_OFFSET_BITS=64 - ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),y) - CFLAGS += -I vhost_user - else --CFLAGS += -I vhost_cuse -lfuse --LDFLAGS += -lfuse -+CFLAGS += -I vhost_cuse -+LDLIBS += -lfuse - endif - - ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) --LDFLAGS += -lnuma -+LDLIBS += -lnuma - endif - - # all source are stored in SRCS-y -diff --git a/mk/exec-env/linuxapp/rte.vars.mk b/mk/exec-env/linuxapp/rte.vars.mk -index 5fd7d85..d51bd17 100644 ---- a/mk/exec-env/linuxapp/rte.vars.mk -+++ b/mk/exec-env/linuxapp/rte.vars.mk -@@ -48,7 +48,7 @@ endif - # Workaround lack of DT_NEEDED entry - EXECENV_LDFLAGS = --no-as-needed - --EXECENV_LDLIBS = -lrt -lm -+EXECENV_LDLIBS = - EXECENV_ASFLAGS = - - ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) -diff --git a/mk/rte.app.mk b/mk/rte.app.mk -index 8ecab41..4ecaa6c 100644 ---- a/mk/rte.app.mk -+++ b/mk/rte.app.mk -@@ -81,23 +81,11 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_LPM) += -lrte_lpm - _LDLIBS-$(CONFIG_RTE_LIBRTE_POWER) += -lrte_power - _LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) += -lrte_acl - _LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lrte_meter -- - _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrte_sched --_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm --_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt -- - _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost - - endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS - --ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) --_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lnuma --endif -- --ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) --_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse --endif -- - # The static libraries do not know their dependencies. - # The combined library fails also to store this information. - # So linking with static or combined library requires explicit dependencies. -@@ -111,6 +99,14 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lxenstore - _LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += -lgxio - # QAT PMD has a dependency on libcrypto (from openssl) for calculating HMAC precomputes - _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += -lcrypto -+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm -+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt -+ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) -+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lnuma -+endif -+ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) -+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse -+endif - endif # CONFIG_RTE_BUILD_COMBINE_LIBS or not CONFIG_RTE_BUILD_SHARED_LIBS - - _LDLIBS-y += --start-group diff --git a/0004-54f9e32-vhost-handle-dirty-pages-logging-request.patch b/0004-54f9e32-vhost-handle-dirty-pages-logging-request.patch deleted file mode 100644 index d6576c1..0000000 --- a/0004-54f9e32-vhost-handle-dirty-pages-logging-request.patch +++ /dev/null @@ -1,152 +0,0 @@ -commit 54f9e32305d4a8d30c2a4ae059d310189b312498 -Author: Yuanhan Liu -Date: Fri Jan 29 12:57:56 2016 +0800 - - vhost: handle dirty pages logging request - - VHOST_USER_SET_LOG_BASE request is used to tell the backend (dpdk - vhost-user) where we should log dirty pages, and how big the log - buffer is. - - This request introduces a new payload: - - typedef struct VhostUserLog { - uint64_t mmap_size; - uint64_t mmap_offset; - } VhostUserLog; - - Also, a fd is delivered from QEMU by ancillary data. - - With those info given, an area of memory is mmaped, assigned - to dev->log_base, for logging dirty pages. - - Signed-off-by: Yuanhan Liu - Signed-off-by: Victor Kaplansky - Tested-by: Pavel Fedin - -Index: dpdk-2.2.0/lib/librte_vhost/rte_virtio_net.h -=================================================================== ---- dpdk-2.2.0.orig/lib/librte_vhost/rte_virtio_net.h -+++ dpdk-2.2.0/lib/librte_vhost/rte_virtio_net.h -@@ -129,7 +129,9 @@ struct virtio_net { - char ifname[IF_NAME_SZ]; /**< Name of the tap device or socket path. */ - uint32_t virt_qp_nb; /**< number of queue pair we have allocated */ - void *priv; /**< private context */ -- uint64_t reserved[64]; /**< Reserve some spaces for future extension. */ -+ uint64_t log_size; /**< Size of log area */ -+ uint64_t log_base; /**< Where dirty pages are logged */ -+ uint64_t reserved[62]; /**< Reserve some spaces for future extension. */ - struct vhost_virtqueue *virtqueue[VHOST_MAX_QUEUE_PAIRS * 2]; /**< Contains all virtqueue information. */ - } __rte_cache_aligned; - -Index: dpdk-2.2.0/lib/librte_vhost/vhost_user/vhost-net-user.c -=================================================================== ---- dpdk-2.2.0.orig/lib/librte_vhost/vhost_user/vhost-net-user.c -+++ dpdk-2.2.0/lib/librte_vhost/vhost_user/vhost-net-user.c -@@ -388,9 +388,12 @@ vserver_message_handler(int connfd, void - break; - - case VHOST_USER_SET_LOG_BASE: -- RTE_LOG(INFO, VHOST_CONFIG, "not implemented.\n"); -- break; -+ user_set_log_base(ctx, &msg); - -+ /* it needs a reply */ -+ msg.size = sizeof(msg.payload.u64); -+ send_vhost_message(connfd, &msg); -+ break; - case VHOST_USER_SET_LOG_FD: - close(msg.fds[0]); - RTE_LOG(INFO, VHOST_CONFIG, "not implemented.\n"); -Index: dpdk-2.2.0/lib/librte_vhost/vhost_user/vhost-net-user.h -=================================================================== ---- dpdk-2.2.0.orig/lib/librte_vhost/vhost_user/vhost-net-user.h -+++ dpdk-2.2.0/lib/librte_vhost/vhost_user/vhost-net-user.h -@@ -83,6 +83,11 @@ typedef struct VhostUserMemory { - VhostUserMemoryRegion regions[VHOST_MEMORY_MAX_NREGIONS]; - } VhostUserMemory; - -+typedef struct VhostUserLog { -+ uint64_t mmap_size; -+ uint64_t mmap_offset; -+} VhostUserLog; -+ - typedef struct VhostUserMsg { - VhostUserRequest request; - -@@ -97,6 +102,7 @@ typedef struct VhostUserMsg { - struct vhost_vring_state state; - struct vhost_vring_addr addr; - VhostUserMemory memory; -+ VhostUserLog log; - } payload; - int fds[VHOST_MEMORY_MAX_NREGIONS]; - } __attribute((packed)) VhostUserMsg; -Index: dpdk-2.2.0/lib/librte_vhost/vhost_user/virtio-net-user.c -=================================================================== ---- dpdk-2.2.0.orig/lib/librte_vhost/vhost_user/virtio-net-user.c -+++ dpdk-2.2.0/lib/librte_vhost/vhost_user/virtio-net-user.c -@@ -365,3 +365,51 @@ user_set_protocol_features(struct vhost_ - - dev->protocol_features = protocol_features; - } -+ -+int -+user_set_log_base(struct vhost_device_ctx ctx, -+ struct VhostUserMsg *msg) -+{ -+ struct virtio_net *dev; -+ int fd = msg->fds[0]; -+ uint64_t size, off; -+ void *addr; -+ -+ dev = get_device(ctx); -+ if (!dev) -+ return -1; -+ -+ if (fd < 0) { -+ RTE_LOG(ERR, VHOST_CONFIG, "invalid log fd: %d\n", fd); -+ return -1; -+ } -+ -+ if (msg->size != sizeof(VhostUserLog)) { -+ RTE_LOG(ERR, VHOST_CONFIG, -+ "invalid log base msg size: %"PRId32" != %d\n", -+ msg->size, (int)sizeof(VhostUserLog)); -+ return -1; -+ } -+ -+ size = msg->payload.log.mmap_size; -+ off = msg->payload.log.mmap_offset; -+ RTE_LOG(INFO, VHOST_CONFIG, -+ "log mmap size: %"PRId64", offset: %"PRId64"\n", -+ size, off); -+ -+ /* -+ * mmap from 0 to workaround a hugepage mmap bug: mmap will -+ * fail when offset is not page size aligned. -+ */ -+ addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); -+ if (addr == MAP_FAILED) { -+ RTE_LOG(ERR, VHOST_CONFIG, "mmap log base failed!\n"); -+ return -1; -+ } -+ -+ /* TODO: unmap on stop */ -+ dev->log_base = (uint64_t)(uintptr_t)addr + off; -+ dev->log_size = size; -+ -+ return 0; -+} -Index: dpdk-2.2.0/lib/librte_vhost/vhost_user/virtio-net-user.h -=================================================================== ---- dpdk-2.2.0.orig/lib/librte_vhost/vhost_user/virtio-net-user.h -+++ dpdk-2.2.0/lib/librte_vhost/vhost_user/virtio-net-user.h -@@ -49,6 +49,7 @@ void user_set_vring_kick(struct vhost_de - - void user_set_protocol_features(struct vhost_device_ctx ctx, - uint64_t protocol_features); -+int user_set_log_base(struct vhost_device_ctx ctx, struct VhostUserMsg *); - - int user_get_vring_base(struct vhost_device_ctx, struct vhost_vring_state *); - diff --git a/0005-d293dac-vhost-claim-support-of-guest-announce.patch b/0005-d293dac-vhost-claim-support-of-guest-announce.patch deleted file mode 100644 index db035eb..0000000 --- a/0005-d293dac-vhost-claim-support-of-guest-announce.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit d293dac8f30e46f0cb66fbcce2977d73d56fe103 -Author: Yuanhan Liu -Date: Fri Jan 29 12:58:00 2016 +0800 - - vhost: claim support of guest announce - - It's actually a feature already enabled in Linux kernel (since v3.5). - What we need to do is simply to claim that we support such feature, - and nothing else. - - With that, the guest will send an ARP message after live migration - to notify the switches about the new location of migrated VM. - - Signed-off-by: Yuanhan Liu - Tested-by: Pavel Fedin - -Index: dpdk-2.2.0/lib/librte_vhost/virtio-net.c -=================================================================== ---- dpdk-2.2.0.orig/lib/librte_vhost/virtio-net.c -+++ dpdk-2.2.0/lib/librte_vhost/virtio-net.c -@@ -74,6 +74,7 @@ static struct virtio_net_config_ll *ll_r - #define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ - (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ - (1ULL << VIRTIO_NET_F_CTRL_RX) | \ -+ (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \ - (VHOST_SUPPORTS_MQ) | \ - (1ULL << VIRTIO_F_VERSION_1) | \ - (1ULL << VHOST_F_LOG_ALL) | \ diff --git a/0006-d639996-vhost-enable-log_shmfd-protocol-feature.patch b/0006-d639996-vhost-enable-log_shmfd-protocol-feature.patch deleted file mode 100644 index df42d2b..0000000 --- a/0006-d639996-vhost-enable-log_shmfd-protocol-feature.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit d639996a74fa71a9553bcef7cb2b2e9bb0fd5203 -Author: Yuanhan Liu -Date: Fri Jan 29 12:58:02 2016 +0800 - - vhost: enable log_shmfd protocol feature - - To claim that we support vhost-user live migration support: - SET_LOG_BASE request will be send only when this feature flag - is set. - - Besides this flag, we actually need another feature flag set - to make vhost-user live migration work: VHOST_F_LOG_ALL. - Which, however, has been enabled long time ago. - - Signed-off-by: Yuanhan Liu - Tested-by: Pavel Fedin - -Index: dpdk-2.2.0/lib/librte_vhost/vhost_user/virtio-net-user.h -=================================================================== ---- dpdk-2.2.0.orig/lib/librte_vhost/vhost_user/virtio-net-user.h -+++ dpdk-2.2.0/lib/librte_vhost/vhost_user/virtio-net-user.h -@@ -38,8 +38,10 @@ - #include "vhost-net-user.h" - - #define VHOST_USER_PROTOCOL_F_MQ 0 -+#define VHOST_USER_PROTOCOL_F_LOG_SHMFD 1 - --#define VHOST_USER_PROTOCOL_FEATURES (1ULL << VHOST_USER_PROTOCOL_F_MQ) -+#define VHOST_USER_PROTOCOL_FEATURES ((1ULL << VHOST_USER_PROTOCOL_F_MQ) | \ -+ (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)) - - int user_set_mem_table(struct vhost_device_ctx, struct VhostUserMsg *); - diff --git a/0007-ixgbe-fix-VLAN-filter-missing-brackets.patch b/0007-ixgbe-fix-VLAN-filter-missing-brackets.patch deleted file mode 100644 index 3c4b6b7..0000000 --- a/0007-ixgbe-fix-VLAN-filter-missing-brackets.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c0de18e856d8c6b4e98ca198091ec7c3528c38e4 Mon Sep 17 00:00:00 2001 -From: Aaron Conole -Date: Tue, 22 Mar 2016 17:37:15 -0400 -Subject: [PATCH] ixgbe: fix VLAN filter missing brackets - -The ixgbe vlan filter code has an if check with an incorrect whitespace. - -Fixes: fe3a45fd4104 ("ixgbe: add VMDq support") - -Signed-off-by: Aaron Conole -Acked-by: Panu Matilainen -Acked-by: Helin Zhang ---- - drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: dpdk/drivers/net/ixgbe/ixgbe_ethdev.c -=================================================================== ---- dpdk.orig/drivers/net/ixgbe/ixgbe_ethdev.c -+++ dpdk/drivers/net/ixgbe/ixgbe_ethdev.c -@@ -4258,10 +4258,11 @@ ixgbe_set_pool_vlan_filter(struct rte_et - if (ixgbe_vmdq_mode_check(hw) < 0) - return (-ENOTSUP); - for (pool_idx = 0; pool_idx < ETH_64_POOLS; pool_idx++) { -- if (pool_mask & ((uint64_t)(1ULL << pool_idx))) -+ if (pool_mask & ((uint64_t)(1ULL << pool_idx))) { - ret = hw->mac.ops.set_vfta(hw,vlan,pool_idx,vlan_on); - if (ret < 0) - return ret; -+ } - } - - return ret; diff --git a/0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch b/0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch deleted file mode 100644 index 6e264e2..0000000 --- a/0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch +++ /dev/null @@ -1,143 +0,0 @@ -From d3a274ce9dee28118b8647e0db72ef0f4b6a6323 Mon Sep 17 00:00:00 2001 -From: Zhihong Wang -Date: Wed, 30 Dec 2015 16:59:49 -0500 -Subject: [PATCH] app/testpmd: handle SIGINT and SIGTERM - -Handle SIGINT and SIGTERM in testpmd. - -Signed-off-by: Zhihong Wang -Acked-by: Michael Qiu ---- - app/test-pmd/cmdline.c | 20 +++++++++++++------- - app/test-pmd/testpmd.c | 39 +++++++++++++++++++++++++++++++++------ - app/test-pmd/testpmd.h | 1 + - 3 files changed, 47 insertions(+), 13 deletions(-) - -diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c -index 73298c9..6d28c1b 100644 ---- a/app/test-pmd/cmdline.c -+++ b/app/test-pmd/cmdline.c -@@ -90,6 +90,8 @@ - - #include "testpmd.h" - -+static struct cmdline *testpmd_cl; -+ - static void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue); - - #ifdef RTE_NIC_BYPASS -@@ -9778,17 +9780,21 @@ cmdline_parse_ctx_t main_ctx[] = { - void - prompt(void) - { -- struct cmdline *cl; -- - /* initialize non-constant commands */ - cmd_set_fwd_mode_init(); - -- cl = cmdline_stdin_new(main_ctx, "testpmd> "); -- if (cl == NULL) { -+ testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> "); -+ if (testpmd_cl == NULL) - return; -- } -- cmdline_interact(cl); -- cmdline_stdin_exit(cl); -+ cmdline_interact(testpmd_cl); -+ cmdline_stdin_exit(testpmd_cl); -+} -+ -+void -+prompt_exit(void) -+{ -+ if (testpmd_cl != NULL) -+ cmdline_quit(testpmd_cl); - } - - static void -diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c -index 98ae46d..1319917 100644 ---- a/app/test-pmd/testpmd.c -+++ b/app/test-pmd/testpmd.c -@@ -1570,13 +1570,16 @@ pmd_test_exit(void) - if (test_done == 0) - stop_packet_forwarding(); - -- FOREACH_PORT(pt_id, ports) { -- printf("Stopping port %d...", pt_id); -- fflush(stdout); -- rte_eth_dev_close(pt_id); -- printf("done\n"); -+ if (ports != NULL) { -+ no_link_check = 1; -+ FOREACH_PORT(pt_id, ports) { -+ printf("\nShutting down port %d...\n", pt_id); -+ fflush(stdout); -+ stop_port(pt_id); -+ close_port(pt_id); -+ } - } -- printf("bye...\n"); -+ printf("\nBye...\n"); - } - - typedef void (*cmd_func_t)(void); -@@ -1984,12 +1987,35 @@ init_port(void) - ports[pid].enabled = 1; - } - -+static void -+force_quit(void) -+{ -+ pmd_test_exit(); -+ prompt_exit(); -+} -+ -+static void -+signal_handler(int signum) -+{ -+ if (signum == SIGINT || signum == SIGTERM) { -+ printf("\nSignal %d received, preparing to exit...\n", -+ signum); -+ force_quit(); -+ /* exit with the expected status */ -+ signal(signum, SIG_DFL); -+ kill(getpid(), signum); -+ } -+} -+ - int - main(int argc, char** argv) - { - int diag; - uint8_t port_id; - -+ signal(SIGINT, signal_handler); -+ signal(SIGTERM, signal_handler); -+ - diag = rte_eal_init(argc, argv); - if (diag < 0) - rte_panic("Cannot init EAL\n"); -@@ -2041,6 +2067,7 @@ main(int argc, char** argv) - start_packet_forwarding(0); - printf("Press enter to exit\n"); - rc = read(0, &c, 1); -+ pmd_test_exit(); - if (rc < 0) - return 1; - } -diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h -index ee7de98..7ffc17b 100644 ---- a/app/test-pmd/testpmd.h -+++ b/app/test-pmd/testpmd.h -@@ -462,6 +462,7 @@ unsigned int parse_item_list(char* str, const char* item_name, - unsigned int *parsed_items, int check_unique_values); - void launch_args_parse(int argc, char** argv); - void prompt(void); -+void prompt_exit(void); - void nic_stats_display(portid_t port_id); - void nic_stats_clear(portid_t port_id); - void nic_xstats_display(portid_t port_id); --- -2.6.2 - diff --git a/0009-bonding-copy-entire-config-structure-in-mode-4.patch b/0009-bonding-copy-entire-config-structure-in-mode-4.patch deleted file mode 100644 index 7f7a364..0000000 --- a/0009-bonding-copy-entire-config-structure-in-mode-4.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 786c990a11e6e6592dfdee02840877070aa3a79a Mon Sep 17 00:00:00 2001 -From: Eric Kinzie -Date: Tue, 1 Mar 2016 09:31:59 -0800 -Subject: [PATCH] bonding: copy entire config structure in mode 4 - -Copy all needed fields from the mode8023ad_private structure in -bond_mode_8023ad_conf_get(). This help ensure that a subsequent call -to rte_eth_bond_8023ad_setup() is not passed uninitialized data that -would result in either incorrect behavior or a failed sanity check. - -Fixes: 46fb43683679 ("bond: add mode 4") - -Signed-off-by: Eric Kinzie -Signed-off-by: Stephen Hemminger -Acked-by: Declan Doherty ---- - drivers/net/bonding/rte_eth_bond_8023ad.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c -index b3b30f6..1b7e93a 100644 ---- a/drivers/net/bonding/rte_eth_bond_8023ad.c -+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c -@@ -1019,6 +1019,7 @@ bond_mode_8023ad_conf_get(struct rte_eth_dev *dev, - conf->aggregate_wait_timeout_ms = mode4->aggregate_wait_timeout / ms_ticks; - conf->tx_period_ms = mode4->tx_period_timeout / ms_ticks; - conf->update_timeout_ms = mode4->update_timeout_us / 1000; -+ conf->rx_marker_period_ms = mode4->rx_marker_timeout / ms_ticks; - } - - void --- -2.6.2 - diff --git a/0010-bonding-fix-active-slaves-with-no-primary.patch b/0010-bonding-fix-active-slaves-with-no-primary.patch deleted file mode 100644 index 6818862..0000000 --- a/0010-bonding-fix-active-slaves-with-no-primary.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 8997a10bfcad789d000debaac4cd85cd3db57997 Mon Sep 17 00:00:00 2001 -From: Eric Kinzie -Date: Tue, 1 Mar 2016 09:32:01 -0800 -Subject: [PATCH] bonding: fix active slaves with no primary - -If the link state of a slave is "up" when added, it is added to the list -of active slaves but, even if it is the only slave, is not selected as -the primary interface. Generally, handling of link state interrupts -selects an interface to be primary, but only if the active count is zero. -This change avoids the situation where there are active slaves but -no primary. - -Fixes: 2efb58cbab6e ("bond: new link bonding library") - -Signed-off-by: Eric Kinzie -Signed-off-by: Stephen Hemminger -Acked-by: Declan Doherty ---- - drivers/net/bonding/rte_eth_bond_api.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c -index a0995ec..5292ae1 100644 ---- a/drivers/net/bonding/rte_eth_bond_api.c -+++ b/drivers/net/bonding/rte_eth_bond_api.c -@@ -419,8 +419,13 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) - if (bonded_eth_dev->data->dev_started) { - rte_eth_link_get_nowait(slave_port_id, &link_props); - -- if (link_props.link_status == 1) -+ if (link_props.link_status == 1) { -+ if (internals->active_slave_count == 0 && -+ !internals->user_defined_primary_port) -+ bond_ethdev_primary_set(internals, -+ slave_port_id); - activate_slave(bonded_eth_dev, slave_port_id); -+ } - } - return 0; - --- -2.6.2 - diff --git a/0011-bonding-do-not-ignore-multicast-in-mode-4.patch b/0011-bonding-do-not-ignore-multicast-in-mode-4.patch deleted file mode 100644 index e5c0e40..0000000 --- a/0011-bonding-do-not-ignore-multicast-in-mode-4.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 6698820b5f6d955b6af2b916e1074db236d4f5a2 Mon Sep 17 00:00:00 2001 -From: Eric Kinzie -Date: Tue, 1 Mar 2016 09:32:00 -0800 -Subject: [PATCH] bonding: do not ignore multicast in mode 4 - -The bonding PMD in mode 4 puts all enslaved interfaces into promiscuous -mode in order to receive LACPDUs and must filter unwanted packets -after the traffic has been "collected". Allow broadcast and multicast -through so that ARP and IPv6 neighbor discovery continue to work. - -Fixes: 46fb43683679 ("bond: add mode 4") - -Signed-off-by: Eric Kinzie -Signed-off-by: Stephen Hemminger -Acked-by: Declan Doherty ---- - app/test/test_link_bonding_mode4.c | 7 +++++-- - drivers/net/bonding/rte_eth_bond_pmd.c | 1 + - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c -index 713368d..31640cd 100644 ---- a/app/test/test_link_bonding_mode4.c -+++ b/app/test/test_link_bonding_mode4.c -@@ -747,8 +747,11 @@ test_mode4_rx(void) - rte_eth_macaddr_get(test_params.bonded_port_id, &bonded_mac); - ether_addr_copy(&bonded_mac, &dst_mac); - -- /* Assert that dst address is not bonding address */ -- dst_mac.addr_bytes[0]++; -+ /* Assert that dst address is not bonding address. Do not set the -+ * least significant bit of the zero byte as this would create a -+ * multicast address. -+ */ -+ dst_mac.addr_bytes[0] += 2; - - /* First try with promiscuous mode enabled. - * Add 2 packets to each slave. First with bonding MAC address, second with -diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c -index b63c886..011150a 100644 ---- a/drivers/net/bonding/rte_eth_bond_pmd.c -+++ b/drivers/net/bonding/rte_eth_bond_pmd.c -@@ -171,6 +171,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, - * mode and packet address does not match. */ - if (unlikely(hdr->ether_type == ether_type_slow_be || - !collecting || (!promisc && -+ !is_multicast_ether_addr(&hdr->d_addr) && - !is_same_ether_addr(&bond_mac, &hdr->d_addr)))) { - - if (hdr->ether_type == ether_type_slow_be) { --- -2.6.2 - diff --git a/0012-bonding-do-not-activate-slave-twice.patch b/0012-bonding-do-not-activate-slave-twice.patch deleted file mode 100644 index 20cb742..0000000 --- a/0012-bonding-do-not-activate-slave-twice.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 7a7122edf1c8d63e516d1b2c2eff6fa9b54e0f82 Mon Sep 17 00:00:00 2001 -From: Eric Kinzie -Date: Tue, 1 Mar 2016 09:32:02 -0800 -Subject: [PATCH] bonding: do not activate slave twice - -The current code for detecting link during slave addition can cause a -slave interface to be activated twice -- once during slave_configure() -and again at the end of __eth_bond_slave_add_lock_free(). This will -either cause the active slave count to be incorrect or will cause the -802.3ad activation function to panic. Ensure that the interface is not -activated more than once. - -Fixes: 46fb43683679 ("bond: add mode 4") - -Signed-off-by: Eric Kinzie -Signed-off-by: Stephen Hemminger -Acked-by: Declan Doherty ---- - drivers/net/bonding/rte_eth_bond_api.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c -index 5292ae1..c6c0ed8 100644 ---- a/drivers/net/bonding/rte_eth_bond_api.c -+++ b/drivers/net/bonding/rte_eth_bond_api.c -@@ -424,7 +424,11 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) - !internals->user_defined_primary_port) - bond_ethdev_primary_set(internals, - slave_port_id); -- activate_slave(bonded_eth_dev, slave_port_id); -+ -+ if (find_slave_by_id(internals->active_slaves, -+ internals->active_slave_count, -+ slave_port_id) == internals->active_slave_count) -+ activate_slave(bonded_eth_dev, slave_port_id); - } - } - return 0; --- -2.6.2 - diff --git a/0013-bonding-fix-crash-when-no-slave-device.patch b/0013-bonding-fix-crash-when-no-slave-device.patch deleted file mode 100644 index 6a8787e..0000000 --- a/0013-bonding-fix-crash-when-no-slave-device.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 2186fff3675d4e774cecc8f918c05063e0367d28 Mon Sep 17 00:00:00 2001 -From: Bernard Iremonger -Date: Mon, 7 Mar 2016 11:40:40 +0000 -Subject: [PATCH] bonding: fix crash when no slave device - -If a bonded device is created when there are no slave devices -there is a loop in bond_ethdev_promiscuous_enable() which results -in a segmentation fault. - -The solution is to initialise the current_primary_port to an -invalid port value when the bonded port is created. - -Fixes: 2efb58cbab6e ("bond: new link bonding library") - -Signed-off-by: Bernard Iremonger -Acked-by: Ferruh Yigit ---- - drivers/net/bonding/rte_eth_bond_api.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c -index c6c0ed8..3fca764 100644 ---- a/drivers/net/bonding/rte_eth_bond_api.c -+++ b/drivers/net/bonding/rte_eth_bond_api.c -@@ -231,7 +231,7 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id) - - internals->port_id = eth_dev->data->port_id; - internals->mode = BONDING_MODE_INVALID; -- internals->current_primary_port = 0; -+ internals->current_primary_port = RTE_MAX_ETHPORTS + 1; - internals->balance_xmit_policy = BALANCE_XMIT_POLICY_LAYER2; - internals->xmit_hash = xmit_l2_hash; - internals->user_defined_mac = 0; --- -2.6.2 - diff --git a/0014-bonding-fix-detach-of-bonded-device.patch b/0014-bonding-fix-detach-of-bonded-device.patch deleted file mode 100644 index 758612c..0000000 --- a/0014-bonding-fix-detach-of-bonded-device.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 6e02723754fb2b341701ac438486b2dfea98b523 Mon Sep 17 00:00:00 2001 -From: Bernard Iremonger -Date: Wed, 10 Feb 2016 10:13:44 +0000 -Subject: [PATCH] bonding: fix detach of bonded device - -Check that the bonded device has no slaves before detaching it. - -Fixes: 8d30fe7fa737 ("bonding: support port hotplug") - -Signed-off-by: Bernard Iremonger -Acked-by: Declan Doherty ---- - drivers/net/bonding/rte_eth_bond_api.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c -index 8a000c8..484a6f3 100644 ---- a/drivers/net/bonding/rte_eth_bond_api.c -+++ b/drivers/net/bonding/rte_eth_bond_api.c -@@ -1,7 +1,7 @@ - /*- - * BSD LICENSE - * -- * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. -+ * Copyright(c) 2010-2016 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -277,6 +277,7 @@ int - rte_eth_bond_free(const char *name) - { - struct rte_eth_dev *eth_dev = NULL; -+ struct bond_dev_private *internals; - - /* now free all data allocation - for eth_dev structure, - * dummy pci driver and internal (private) data -@@ -287,6 +288,10 @@ rte_eth_bond_free(const char *name) - if (eth_dev == NULL) - return -ENODEV; - -+ internals = eth_dev->data->dev_private; -+ if (internals->slave_count != 0) -+ return -EBUSY; -+ - if (eth_dev->data->dev_started == 1) { - bond_ethdev_stop(eth_dev); - bond_ethdev_close(eth_dev); --- -2.6.2 - diff --git a/0015-bonding-fix-detach-of-slave-devices.patch b/0015-bonding-fix-detach-of-slave-devices.patch deleted file mode 100644 index 15900fb..0000000 --- a/0015-bonding-fix-detach-of-slave-devices.patch +++ /dev/null @@ -1,147 +0,0 @@ -From df3e8ad73f4c92b4eb8f49ff33271d4a09e6a04a Mon Sep 17 00:00:00 2001 -From: Bernard Iremonger -Date: Wed, 10 Feb 2016 10:13:45 +0000 -Subject: [PATCH] bonding: fix detach of slave devices - -Ensure that a bonded slave device is not detached, -until it is removed from the bonded device. - -Fixes: 2efb58cbab6e ("bond: new link bonding library") -Fixes: a45b288ef21a ("bond: support link status polling") -Fixes: 494adb7f63f2 ("ethdev: add device fields from PCI layer") -Fixes: b1fb53a39d88 ("ethdev: remove some PCI specific handling") - -Signed-off-by: Bernard Iremonger -Acked-by: Declan Doherty ---- - drivers/net/bonding/rte_eth_bond_api.c | 33 +++++++++++---------------------- - lib/librte_ether/rte_ethdev.c | 8 ++++++-- - lib/librte_ether/rte_ethdev.h | 2 ++ - 3 files changed, 19 insertions(+), 24 deletions(-) - -diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c -index 484a6f3..a0995ec 100644 ---- a/drivers/net/bonding/rte_eth_bond_api.c -+++ b/drivers/net/bonding/rte_eth_bond_api.c -@@ -314,38 +314,23 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) - { - struct rte_eth_dev *bonded_eth_dev, *slave_eth_dev; - struct bond_dev_private *internals; -- struct bond_dev_private *temp_internals; - struct rte_eth_link link_props; - struct rte_eth_dev_info dev_info; - -- int i, j; -- - if (valid_slave_port_id(slave_port_id) != 0) - return -1; - - bonded_eth_dev = &rte_eth_devices[bonded_port_id]; - internals = bonded_eth_dev->data->dev_private; - -- /* Verify that new slave device is not already a slave of another -- * bonded device */ -- for (i = rte_eth_dev_count()-1; i >= 0; i--) { -- if (check_for_bonded_ethdev(&rte_eth_devices[i]) == 0) { -- temp_internals = rte_eth_devices[i].data->dev_private; -- -- for (j = 0; j < temp_internals->slave_count; j++) { -- /* Device already a slave of a bonded device */ -- if (temp_internals->slaves[j].port_id == slave_port_id) { -- RTE_BOND_LOG(ERR, "Slave port %d is already a slave", -- slave_port_id); -- return -1; -- } -- } -- } -- } -- - slave_eth_dev = &rte_eth_devices[slave_port_id]; -+ if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_BONDED_SLAVE) { -+ RTE_BOND_LOG(ERR, "Slave device is already a slave of a bonded device"); -+ return -1; -+ } - - /* Add slave details to bonded device */ -+ slave_eth_dev->data->dev_flags |= RTE_ETH_DEV_BONDED_SLAVE; - slave_add(internals, slave_eth_dev); - - rte_eth_dev_info_get(slave_port_id, &dev_info); -@@ -385,6 +370,7 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) - if (internals->link_props_set) { - if (link_properties_valid(&(bonded_eth_dev->data->dev_link), - &(slave_eth_dev->data->dev_link))) { -+ slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDED_SLAVE); - RTE_BOND_LOG(ERR, - "Slave port %d link speed/duplex not supported", - slave_port_id); -@@ -416,6 +402,7 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) - - if (bonded_eth_dev->data->dev_started) { - if (slave_configure(bonded_eth_dev, slave_eth_dev) != 0) { -+ slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDED_SLAVE); - RTE_BOND_LOG(ERR, "rte_bond_slaves_configure: port=%d", - slave_port_id); - return -1; -@@ -468,7 +455,7 @@ __eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) - { - struct rte_eth_dev *bonded_eth_dev; - struct bond_dev_private *internals; -- -+ struct rte_eth_dev *slave_eth_dev; - int i, slave_idx; - - if (valid_slave_port_id(slave_port_id) != 0) -@@ -508,7 +495,9 @@ __eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) - mac_address_set(&rte_eth_devices[slave_port_id], - &(internals->slaves[slave_idx].persisted_mac_addr)); - -- slave_remove(internals, &rte_eth_devices[slave_port_id]); -+ slave_eth_dev = &rte_eth_devices[slave_port_id]; -+ slave_remove(internals, slave_eth_dev); -+ slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDED_SLAVE); - - /* first slave in the active list will be the primary by default, - * otherwise use first device in list */ -diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c -index f0e7473..db35102 100644 ---- a/lib/librte_ether/rte_ethdev.c -+++ b/lib/librte_ether/rte_ethdev.c -@@ -1,7 +1,7 @@ - /*- - * BSD LICENSE - * -- * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. -+ * Copyright(c) 2010-2016 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -495,7 +495,11 @@ rte_eth_dev_is_detachable(uint8_t port_id) - return -ENOTSUP; - } - dev_flags = rte_eth_devices[port_id].data->dev_flags; -- return !(dev_flags & RTE_ETH_DEV_DETACHABLE); -+ if ((dev_flags & RTE_ETH_DEV_DETACHABLE) && -+ (!(dev_flags & RTE_ETH_DEV_BONDED_SLAVE))) -+ return 0; -+ else -+ return 1; - } - - /* attach the new physical device, then store port_id of the device */ -diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h -index d867976..b5704e1 100644 ---- a/lib/librte_ether/rte_ethdev.h -+++ b/lib/librte_ether/rte_ethdev.h -@@ -1662,6 +1662,8 @@ struct rte_eth_dev_data { - #define RTE_ETH_DEV_DETACHABLE 0x0001 - /** Device supports link state interrupt */ - #define RTE_ETH_DEV_INTR_LSC 0x0002 -+/** Device is a bonded slave */ -+#define RTE_ETH_DEV_BONDED_SLAVE 0x0004 - - /** - * @internal --- -2.6.2 - diff --git a/0016-eal-linux-support-built-in-kernel-modules.patch b/0016-eal-linux-support-built-in-kernel-modules.patch deleted file mode 100644 index 32bced3..0000000 --- a/0016-eal-linux-support-built-in-kernel-modules.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 6e7caa1ad9d597fed0a49468af25ae6e68b8c443 Mon Sep 17 00:00:00 2001 -From: Kamil Rytarowski -Date: Thu, 28 Jan 2016 14:13:54 +0100 -Subject: [PATCH] eal/linux: support built-in kernel modules - -Currently rte_eal_check_module() detects Linux kernel modules via reading -/proc/modules. Built-in ones aren't listed there and therefore they are not -being found. - -Add support for checking built-in modules with parsing the sysfs files - -This commit obsoletes the /proc/modules parsing approach. - -Signed-off-by: Kamil Rytarowski -Acked-by: David Marchand -Acked-by: Yuanhan Liu ---- - lib/librte_eal/linuxapp/eal/eal.c | 35 +++++++++++++++++++++-------------- - 1 file changed, 21 insertions(+), 14 deletions(-) - -diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c -index 635ec36..4d3e0de 100644 ---- a/lib/librte_eal/linuxapp/eal/eal.c -+++ b/lib/librte_eal/linuxapp/eal/eal.c -@@ -49,6 +49,7 @@ - #include - #include - #include -+#include - #if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) - #include - #endif -@@ -901,27 +902,33 @@ int rte_eal_has_hugepages(void) - int - rte_eal_check_module(const char *module_name) - { -- char mod_name[30]; /* Any module names can be longer than 30 bytes? */ -- int ret = 0; -+ char sysfs_mod_name[PATH_MAX]; -+ struct stat st; - int n; - - if (NULL == module_name) - return -1; - -- FILE *fd = fopen("/proc/modules", "r"); -- if (NULL == fd) { -- RTE_LOG(ERR, EAL, "Open /proc/modules failed!" -- " error %i (%s)\n", errno, strerror(errno)); -+ /* Check if there is sysfs mounted */ -+ if (stat("/sys/module", &st) != 0) { -+ RTE_LOG(DEBUG, EAL, "sysfs is not mounted! error %i (%s)\n", -+ errno, strerror(errno)); - return -1; - } -- while (!feof(fd)) { -- n = fscanf(fd, "%29s %*[^\n]", mod_name); -- if ((n == 1) && !strcmp(mod_name, module_name)) { -- ret = 1; -- break; -- } -+ -+ /* A module might be built-in, therefore try sysfs */ -+ n = snprintf(sysfs_mod_name, PATH_MAX, "/sys/module/%s", module_name); -+ if (n < 0 || n > PATH_MAX) { -+ RTE_LOG(DEBUG, EAL, "Could not format module path\n"); -+ return -1; - } -- fclose(fd); - -- return ret; -+ if (stat(sysfs_mod_name, &st) != 0) { -+ RTE_LOG(DEBUG, EAL, "Module %s not found! error %i (%s)\n", -+ sysfs_mod_name, errno, strerror(errno)); -+ return 0; -+ } -+ -+ /* Module has been found */ -+ return 1; - } --- -2.6.2 - diff --git a/0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch b/0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch deleted file mode 100644 index 0f7b2a8..0000000 --- a/0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 308df2bfba3d238fc1d2d16cc10c84681803b408 Mon Sep 17 00:00:00 2001 -From: Zhihong Wang -Date: Wed, 30 Dec 2015 16:59:51 -0500 -Subject: [PATCH] examples/l3fwd: handle SIGINT and SIGTERM - -Handle SIGINT and SIGTERM in l3fwd. - -Signed-off-by: Zhihong Wang -Acked-by: Michael Qiu -Acked-by: Konstantin Ananyev ---- - examples/l3fwd/main.c | 46 ++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 42 insertions(+), 4 deletions(-) - -diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c -index 5b0c2dd..21a5782 100644 ---- a/examples/l3fwd/main.c -+++ b/examples/l3fwd/main.c -@@ -41,6 +41,8 @@ - #include - #include - #include -+#include -+#include - - #include - #include -@@ -75,6 +77,8 @@ - #include - #include - -+static volatile bool force_quit; -+ - #define APP_LOOKUP_EXACT_MATCH 0 - #define APP_LOOKUP_LPM 1 - #define DO_RFC_1812_CHECKS -@@ -1553,7 +1557,7 @@ main_loop(__attribute__((unused)) void *dummy) - portid, queueid); - } - -- while (1) { -+ while (!force_quit) { - - cur_tsc = rte_rdtsc(); - -@@ -1781,6 +1785,8 @@ main_loop(__attribute__((unused)) void *dummy) - - } - } -+ -+ return 0; - } - - static int -@@ -2516,8 +2522,12 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) - printf("\nChecking link status"); - fflush(stdout); - for (count = 0; count <= MAX_CHECK_TIME; count++) { -+ if (force_quit) -+ return; - all_ports_up = 1; - for (portid = 0; portid < port_num; portid++) { -+ if (force_quit) -+ return; - if ((port_mask & (1 << portid)) == 0) - continue; - memset(&link, 0, sizeof(link)); -@@ -2559,6 +2569,16 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) - } - } - -+static void -+signal_handler(int signum) -+{ -+ if (signum == SIGINT || signum == SIGTERM) { -+ printf("\n\nSignal %d received, preparing to exit...\n", -+ signum); -+ force_quit = true; -+ } -+} -+ - int - main(int argc, char **argv) - { -@@ -2579,6 +2599,10 @@ main(int argc, char **argv) - argc -= ret; - argv += ret; - -+ force_quit = false; -+ signal(SIGINT, signal_handler); -+ signal(SIGTERM, signal_handler); -+ - /* pre-init dst MACs for all ports to 02:00:00:00:00:xx */ - for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++) { - dest_eth_addr[portid] = ETHER_LOCAL_ADMIN_ADDR + ((uint64_t)portid << 40); -@@ -2733,12 +2757,26 @@ main(int argc, char **argv) - - check_all_ports_link_status((uint8_t)nb_ports, enabled_port_mask); - -+ ret = 0; - /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { -- if (rte_eal_wait_lcore(lcore_id) < 0) -- return -1; -+ if (rte_eal_wait_lcore(lcore_id) < 0) { -+ ret = -1; -+ break; -+ } - } - -- return 0; -+ /* stop ports */ -+ for (portid = 0; portid < nb_ports; portid++) { -+ if ((enabled_port_mask & (1 << portid)) == 0) -+ continue; -+ printf("Closing port %d...", portid); -+ rte_eth_dev_stop(portid); -+ rte_eth_dev_close(portid); -+ printf(" Done\n"); -+ } -+ printf("Bye...\n"); -+ -+ return ret; - } --- -2.6.2 - diff --git a/0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch b/0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch deleted file mode 100644 index e247883..0000000 --- a/0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7656a546c0609f3205558a5d48352c82607d38d3 Mon Sep 17 00:00:00 2001 -From: Xiao Wang -Date: Fri, 18 Dec 2015 11:09:18 +0800 -Subject: [PATCH] fm10k: fix VLAN flag in scattered Rx - -In fm10k_recv_scattered_pkts function, a packet is stored in a linked list, -offload flags such as PKT_RX_VLAN_PKT should be set in the first segment. - -Fixes: 6b59a3bc82b1 ("fm10k: fix VLAN in Rx mbuf") - -Signed-off-by: Wang Xiao W -Acked-by: Shaopeng He ---- - drivers/net/fm10k/fm10k_rxtx.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c -index e958865..de31cad 100644 ---- a/drivers/net/fm10k/fm10k_rxtx.c -+++ b/drivers/net/fm10k/fm10k_rxtx.c -@@ -305,7 +305,7 @@ fm10k_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, - * So, always PKT_RX_VLAN_PKT flag is set and vlan_tci - * is valid for each RX packet's mbuf. - */ -- mbuf->ol_flags |= PKT_RX_VLAN_PKT; -+ first_seg->ol_flags |= PKT_RX_VLAN_PKT; - first_seg->vlan_tci = desc.w.vlan; - - /* Prefetch data of first segment, if configured to do so. */ --- -2.6.2 - diff --git a/0019-i40e-base-fix-driver-load-failure.patch b/0019-i40e-base-fix-driver-load-failure.patch deleted file mode 100644 index 0c59594..0000000 --- a/0019-i40e-base-fix-driver-load-failure.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8a8807369ffafef90c410279b4b2645d2d7a7483 Mon Sep 17 00:00:00 2001 -From: Helin Zhang -Date: Tue, 8 Mar 2016 16:14:28 +0800 -Subject: [PATCH] i40e/base: fix driver load failure - -Fix the driver load failure with linking with some -PHY types, as the amount of time it takes for the -GLGEN_RSTAT_DEVSTATE to be set increases greatly on those PHY -types, which can lead to a timeout. - -Fixes: 9aeefed05538 ("i40e/base: support ESS") - -Signed-off-by: Helin Zhang -Acked-by: Jingjing Wu -Acked-by: Remy Horton ---- - drivers/net/i40e/base/i40e_common.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c -index a4cf5cf..925bb1c 100644 ---- a/drivers/net/i40e/base/i40e_common.c -+++ b/drivers/net/i40e/base/i40e_common.c -@@ -1316,11 +1316,11 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw) - grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) & - I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> - I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; --#ifdef I40E_ESS_SUPPORT -+ - /* It can take upto 15 secs for GRST steady state */ - grst_del = grst_del * 20; /* bump it to 16 secs max to be safe */ --#endif -- for (cnt = 0; cnt < grst_del + 10; cnt++) { -+ -+ for (cnt = 0; cnt < grst_del; cnt++) { - reg = rd32(hw, I40E_GLGEN_RSTAT); - if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) - break; --- -2.6.2 - diff --git a/0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch b/0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch deleted file mode 100644 index f852c76..0000000 --- a/0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9f44dd3d8ad447c7f797a9564d30a15e5ab7f72b Mon Sep 17 00:00:00 2001 -From: Helin Zhang -Date: Tue, 8 Mar 2016 16:14:14 +0800 -Subject: [PATCH] i40e/base: fix missing check for stopped admin queue - -It's possible that while waiting for the spinlock, another -entity (that owns the spinlock) has shut down the admin queue. -If it then attempts to use the queue, it will panic. -It adds a check for this condition on the receive side. This -matches an existing check on the send queue side. - -Fixes: 8db9e2a1b232 ("i40e: base driver") - -Signed-off-by: Helin Zhang -Acked-by: Jingjing Wu -Acked-by: Remy Horton ---- - drivers/net/i40e/base/i40e_adminq.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c -index 998582c..e1a162e 100644 ---- a/drivers/net/i40e/base/i40e_adminq.c -+++ b/drivers/net/i40e/base/i40e_adminq.c -@@ -1035,6 +1035,13 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw, - /* take the lock before we start messing with the ring */ - i40e_acquire_spinlock(&hw->aq.arq_spinlock); - -+ if (hw->aq.arq.count == 0) { -+ i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, -+ "AQRX: Admin queue not initialized.\n"); -+ ret_code = I40E_ERR_QUEUE_EMPTY; -+ goto clean_arq_element_err; -+ } -+ - /* set next_to_use to head */ - #ifdef PF_DRIVER - #ifdef INTEGRATED_VF -@@ -1113,6 +1120,7 @@ clean_arq_element_out: - /* Set pending if needed, unlock and return */ - if (pending != NULL) - *pending = (ntc > ntu ? hw->aq.arq.count : 0) + (ntu - ntc); -+clean_arq_element_err: - i40e_release_spinlock(&hw->aq.arq_spinlock); - - #ifdef PF_DRIVER --- -2.6.2 - diff --git a/0021-i40e-fix-inverted-check-for-no-refcount.patch b/0021-i40e-fix-inverted-check-for-no-refcount.patch deleted file mode 100644 index e244f9b..0000000 --- a/0021-i40e-fix-inverted-check-for-no-refcount.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 097e920c32bf19cf918cc071525f33b0abdeebaf Mon Sep 17 00:00:00 2001 -From: Rich Lane -Date: Wed, 23 Dec 2015 00:08:00 -0800 -Subject: [PATCH] i40e: fix inverted check for no refcount - -The no-refcount path was being taken without the application opting -in to it. - -Fixes: 4861cde46116 ("i40e: new poll mode driver") - -Reported-by: Mike Stolarchuk -Signed-off-by: Rich Lane -Acked-by: Helin Zhang ---- - drivers/net/i40e/i40e_rxtx.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c -index c10eeff..d777c9b 100644 ---- a/drivers/net/i40e/i40e_rxtx.c -+++ b/drivers/net/i40e/i40e_rxtx.c -@@ -1756,7 +1756,7 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) - for (i = 0; i < txq->tx_rs_thresh; i++) - rte_prefetch0((txep + i)->mbuf); - -- if (!(txq->txq_flags & (uint32_t)ETH_TXQ_FLAGS_NOREFCOUNT)) { -+ if (txq->txq_flags & (uint32_t)ETH_TXQ_FLAGS_NOREFCOUNT) { - for (i = 0; i < txq->tx_rs_thresh; ++i, ++txep) { - rte_mempool_put(txep->mbuf->pool, txep->mbuf); - txep->mbuf = NULL; --- -2.6.2 - diff --git a/0022-i40e-fix-overflow.patch b/0022-i40e-fix-overflow.patch deleted file mode 100644 index cefb16a..0000000 --- a/0022-i40e-fix-overflow.patch +++ /dev/null @@ -1,42 +0,0 @@ -From c7a4ff80722e9237a4c504106d21ba5ca27d8df2 Mon Sep 17 00:00:00 2001 -From: Helin Zhang -Date: Sat, 12 Mar 2016 00:50:58 +0800 -Subject: [PATCH] i40e: fix overflow - -The array 'ptype_table' was defined in depth of 'UINT8_MAX' which -is 255, while the querying index could be from 0 to 255. The issue -can be fixed with expanding the array to one more element. - -Fixes: 9571ea028489 ("i40e: replace some offload flags with unified packet type") - -Signed-off-by: Helin Zhang -Acked-by: Wenzhuo Lu ---- - drivers/net/i40e/i40e_rxtx.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c -index 8931b8e..c10eeff 100644 ---- a/drivers/net/i40e/i40e_rxtx.c -+++ b/drivers/net/i40e/i40e_rxtx.c -@@ -192,7 +192,7 @@ i40e_get_iee15888_flags(struct rte_mbuf *mb, uint64_t qword) - static inline uint32_t - i40e_rxd_pkt_type_mapping(uint8_t ptype) - { -- static const uint32_t ptype_table[UINT8_MAX] __rte_cache_aligned = { -+ static const uint32_t type_table[UINT8_MAX + 1] __rte_cache_aligned = { - /* L2 types */ - /* [0] reserved */ - [1] = RTE_PTYPE_L2_ETHER, -@@ -718,7 +718,7 @@ i40e_rxd_pkt_type_mapping(uint8_t ptype) - /* All others reserved */ - }; - -- return ptype_table[ptype]; -+ return type_table[ptype]; - } - - #define I40E_RX_DESC_EXT_STATUS_FLEXBH_MASK 0x03 --- -2.6.2 - diff --git a/0023-i40e-fix-VLAN-filtering.patch b/0023-i40e-fix-VLAN-filtering.patch deleted file mode 100644 index 1fa85a6..0000000 --- a/0023-i40e-fix-VLAN-filtering.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 330aa319382aec9ea595f9ebcb9a3c44647ad66c Mon Sep 17 00:00:00 2001 -From: Julien Meunier -Date: Thu, 4 Feb 2016 12:02:16 +0100 -Subject: [PATCH] i40e: fix VLAN filtering - -VLAN filtering was always performed, even if hw_vlan_filter was -disabled. During device initialization, default filter -RTE_MACVLAN_PERFECT_MATCH was applied. In this situation, all incoming -VLAN frames were dropped by the card (increase of the register RUPP - Rx -Unsupported Protocol). - -In order to restore default behavior, if HW VLAN filtering is activated, -set a filter to match MAC and VLAN. If not, set a filter to only match -MAC. - -Fixes: 4861cde46116 ("i40e: new poll mode driver") -Fixes: 912b595146d6 ("i40e: mac vlan filter") - -Signed-off-by: Julien Meunier -Acked-by: Helin Zhang ---- - drivers/net/i40e/i40e_ethdev.c | 73 ++++++++++++++++++++++++++++++++++++++++-- - drivers/net/i40e/i40e_ethdev.h | 1 + - 2 files changed, 72 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c -index 2f676f6..87d8f4b 100644 ---- a/drivers/net/i40e/i40e_ethdev.c -+++ b/drivers/net/i40e/i40e_ethdev.c -@@ -2412,6 +2412,13 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask) - struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); - struct i40e_vsi *vsi = pf->main_vsi; - -+ if (mask & ETH_VLAN_FILTER_MASK) { -+ if (dev->data->dev_conf.rxmode.hw_vlan_filter) -+ i40e_vsi_config_vlan_filter(vsi, TRUE); -+ else -+ i40e_vsi_config_vlan_filter(vsi, FALSE); -+ } -+ - if (mask & ETH_VLAN_STRIP_MASK) { - /* Enable or disable VLAN stripping */ - if (dev->data->dev_conf.rxmode.hw_vlan_strip) -@@ -2663,7 +2670,10 @@ i40e_macaddr_add(struct rte_eth_dev *dev, - } - - (void)rte_memcpy(&mac_filter.mac_addr, mac_addr, ETHER_ADDR_LEN); -- mac_filter.filter_type = RTE_MACVLAN_PERFECT_MATCH; -+ if (dev->data->dev_conf.rxmode.hw_vlan_filter) -+ mac_filter.filter_type = RTE_MACVLAN_PERFECT_MATCH; -+ else -+ mac_filter.filter_type = RTE_MAC_PERFECT_MATCH; - - if (pool == 0) - vsi = pf->main_vsi; -@@ -4236,6 +4246,63 @@ fail_mem: - return NULL; - } - -+/* Configure vlan filter on or off */ -+int -+i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on) -+{ -+ int i, num; -+ struct i40e_mac_filter *f; -+ struct i40e_mac_filter_info *mac_filter; -+ enum rte_mac_filter_type desired_filter; -+ int ret = I40E_SUCCESS; -+ -+ if (on) { -+ /* Filter to match MAC and VLAN */ -+ desired_filter = RTE_MACVLAN_PERFECT_MATCH; -+ } else { -+ /* Filter to match only MAC */ -+ desired_filter = RTE_MAC_PERFECT_MATCH; -+ } -+ -+ num = vsi->mac_num; -+ -+ mac_filter = rte_zmalloc("mac_filter_info_data", -+ num * sizeof(*mac_filter), 0); -+ if (mac_filter == NULL) { -+ PMD_DRV_LOG(ERR, "failed to allocate memory"); -+ return I40E_ERR_NO_MEMORY; -+ } -+ -+ i = 0; -+ -+ /* Remove all existing mac */ -+ TAILQ_FOREACH(f, &vsi->mac_list, next) { -+ mac_filter[i] = f->mac_info; -+ ret = i40e_vsi_delete_mac(vsi, &f->mac_info.mac_addr); -+ if (ret) { -+ PMD_DRV_LOG(ERR, "Update VSI failed to %s vlan filter", -+ on ? "enable" : "disable"); -+ goto DONE; -+ } -+ i++; -+ } -+ -+ /* Override with new filter */ -+ for (i = 0; i < num; i++) { -+ mac_filter[i].filter_type = desired_filter; -+ ret = i40e_vsi_add_mac(vsi, &mac_filter[i]); -+ if (ret) { -+ PMD_DRV_LOG(ERR, "Update VSI failed to %s vlan filter", -+ on ? "enable" : "disable"); -+ goto DONE; -+ } -+ } -+ -+DONE: -+ rte_free(mac_filter); -+ return ret; -+} -+ - /* Configure vlan stripping on or off */ - int - i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on) -@@ -4283,9 +4350,11 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev) - { - struct rte_eth_dev_data *data = dev->data; - int ret; -+ int mask = 0; - - /* Apply vlan offload setting */ -- i40e_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK); -+ mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK; -+ i40e_vlan_offload_set(dev, mask); - - /* Apply double-vlan setting, not implemented yet */ - -diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h -index 6edd7dd..db6173a 100644 ---- a/drivers/net/i40e/i40e_ethdev.h -+++ b/drivers/net/i40e/i40e_ethdev.h -@@ -551,6 +551,7 @@ void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi); - int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi, - struct i40e_vsi_vlan_pvid_info *info); - int i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on); -+int i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on); - uint64_t i40e_config_hena(uint64_t flags); - uint64_t i40e_parse_hena(uint64_t flags); - enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf); --- -2.6.2 - diff --git a/0024-mempool-fix-leak-when-creation-fails.patch b/0024-mempool-fix-leak-when-creation-fails.patch deleted file mode 100644 index b3107d5..0000000 --- a/0024-mempool-fix-leak-when-creation-fails.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 86f36ff9578b5f3d697c8fcf6072dcb70e2b246f Mon Sep 17 00:00:00 2001 -From: Olivier Matz -Date: Tue, 16 Feb 2016 15:40:10 +0100 -Subject: [PATCH] mempool: fix leak when creation fails - -Since commits ff909fe21f and 4e32101f9b, it is now possible to free -memzones and rings. - -The rte_mempool_create() should be modified to take advantage of this -and not leak memory when an allocation fails. - -Signed-off-by: Olivier Matz ---- - lib/librte_mempool/rte_mempool.c | 28 +++++++++++++--------------- - 1 file changed, 13 insertions(+), 15 deletions(-) - -diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c -index aff5f6d..f8781e1 100644 ---- a/lib/librte_mempool/rte_mempool.c -+++ b/lib/librte_mempool/rte_mempool.c -@@ -438,8 +438,8 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, - char rg_name[RTE_RING_NAMESIZE]; - struct rte_mempool_list *mempool_list; - struct rte_mempool *mp = NULL; -- struct rte_tailq_entry *te; -- struct rte_ring *r; -+ struct rte_tailq_entry *te = NULL; -+ struct rte_ring *r = NULL; - const struct rte_memzone *mz; - size_t mempool_size; - int mz_flags = RTE_MEMZONE_1GB|RTE_MEMZONE_SIZE_HINT_ONLY; -@@ -511,7 +511,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, - snprintf(rg_name, sizeof(rg_name), RTE_MEMPOOL_MZ_FORMAT, name); - r = rte_ring_create(rg_name, rte_align32pow2(n+1), socket_id, rg_flags); - if (r == NULL) -- goto exit; -+ goto exit_unlock; - - /* - * reserve a memory zone for this mempool: private data is -@@ -536,7 +536,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, - te = rte_zmalloc("MEMPOOL_TAILQ_ENTRY", sizeof(*te), 0); - if (te == NULL) { - RTE_LOG(ERR, MEMPOOL, "Cannot allocate tailq entry!\n"); -- goto exit; -+ goto exit_unlock; - } - - /* -@@ -561,15 +561,8 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, - snprintf(mz_name, sizeof(mz_name), RTE_MEMPOOL_MZ_FORMAT, name); - - mz = rte_memzone_reserve(mz_name, mempool_size, socket_id, mz_flags); -- -- /* -- * no more memory: in this case we loose previously reserved -- * space for the ring as we cannot free it -- */ -- if (mz == NULL) { -- rte_free(te); -- goto exit; -- } -+ if (mz == NULL) -+ goto exit_unlock; - - if (rte_eal_has_hugepages()) { - startaddr = (void*)mz->addr; -@@ -633,11 +626,16 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size, - rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK); - TAILQ_INSERT_TAIL(mempool_list, te, next); - rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); -- --exit: - rte_rwlock_write_unlock(RTE_EAL_MEMPOOL_RWLOCK); - - return mp; -+ -+exit_unlock: -+ rte_rwlock_write_unlock(RTE_EAL_MEMPOOL_RWLOCK); -+ rte_ring_free(r); -+ rte_free(te); -+ -+ return NULL; - } - - /* Return the number of entries in the mempool */ --- -2.6.2 - diff --git a/0025-pcap-fix-captured-frame-length.patch b/0025-pcap-fix-captured-frame-length.patch deleted file mode 100644 index 9e68fba..0000000 --- a/0025-pcap-fix-captured-frame-length.patch +++ /dev/null @@ -1,58 +0,0 @@ -From c6fb0e55585206a89f6db396de860e6e844cad06 Mon Sep 17 00:00:00 2001 -From: Dror Birkman -Date: Thu, 28 Jan 2016 13:09:50 +0200 -Subject: [PATCH] pcap: fix captured frame length -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The actual captured length is header.caplen, whereas header.len is -the original length on the wire. - -Fixes: 4c173302c307 ("pcap: add new driver") - -Signed-off-by: Dror Birkman -Acked-by: Nicolás Pernas Maradei ---- - drivers/net/pcap/rte_eth_pcap.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c -index f9230eb..1d121f8 100644 ---- a/drivers/net/pcap/rte_eth_pcap.c -+++ b/drivers/net/pcap/rte_eth_pcap.c -@@ -220,25 +220,25 @@ eth_pcap_rx(void *queue, - buf_size = (uint16_t)(rte_pktmbuf_data_room_size(pcap_q->mb_pool) - - RTE_PKTMBUF_HEADROOM); - -- if (header.len <= buf_size) { -+ if (header.caplen <= buf_size) { - /* pcap packet will fit in the mbuf, go ahead and copy */ - rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet, -- header.len); -- mbuf->data_len = (uint16_t)header.len; -+ header.caplen); -+ mbuf->data_len = (uint16_t)header.caplen; - } else { - /* Try read jumbo frame into multi mbufs. */ - if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool, - mbuf, - packet, -- header.len) == -1)) -+ header.caplen) == -1)) - break; - } - -- mbuf->pkt_len = (uint16_t)header.len; -+ mbuf->pkt_len = (uint16_t)header.caplen; - mbuf->port = pcap_q->in_port; - bufs[num_rx] = mbuf; - num_rx++; -- rx_bytes += header.len; -+ rx_bytes += header.caplen; - } - pcap_q->rx_pkts += num_rx; - pcap_q->rx_bytes += rx_bytes; --- -2.6.2 - diff --git a/0026-port-fix-crash-for-ethdev-writer-nodrop.patch b/0026-port-fix-crash-for-ethdev-writer-nodrop.patch deleted file mode 100644 index 373058e..0000000 --- a/0026-port-fix-crash-for-ethdev-writer-nodrop.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 04f366906ab395c8047bebfc1ddea244dfcb40f5 Mon Sep 17 00:00:00 2001 -From: Jasvinder Singh -Date: Wed, 2 Mar 2016 21:19:29 +0000 -Subject: [PATCH] port: fix crash for ethdev writer nodrop - -Error log: - [APP] Initializing PIPELINE0 ... - pipeline> [APP] Initializing PIPELINE1 ... - [PIPELINE1] Pass-through - Segmentation fault (core dumped) - -Fixes: 304c8091e90a ("port: add ethdev writer nodrop") - -Signed-off-by: Jasvinder Singh -Acked-by: Cristian Dumitrescu ---- - lib/librte_port/rte_port_ethdev.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/lib/librte_port/rte_port_ethdev.c b/lib/librte_port/rte_port_ethdev.c -index 1f0c81c..1c34602 100644 ---- a/lib/librte_port/rte_port_ethdev.c -+++ b/lib/librte_port/rte_port_ethdev.c -@@ -390,16 +390,20 @@ send_burst_nodrop(struct rte_port_ethdev_writer_nodrop *p) - p->tx_buf_count); - - /* We sent all the packets in a first try */ -- if (nb_tx >= p->tx_buf_count) -+ if (nb_tx >= p->tx_buf_count) { -+ p->tx_buf_count = 0; - return; -+ } - - for (i = 0; i < p->n_retries; i++) { - nb_tx += rte_eth_tx_burst(p->port_id, p->queue_id, - p->tx_buf + nb_tx, p->tx_buf_count - nb_tx); - - /* We sent all the packets in more than one try */ -- if (nb_tx >= p->tx_buf_count) -+ if (nb_tx >= p->tx_buf_count) { -+ p->tx_buf_count = 0; - return; -+ } - } - - /* We didn't send the packets in maximum allowed attempts */ --- -2.6.2 - diff --git a/0027-port-fix-crash-for-ring-writer-nodrop.patch b/0027-port-fix-crash-for-ring-writer-nodrop.patch deleted file mode 100644 index 9c4c274..0000000 --- a/0027-port-fix-crash-for-ring-writer-nodrop.patch +++ /dev/null @@ -1,74 +0,0 @@ -From fa11a8a7251e14eca0a4190128732386f13551bd Mon Sep 17 00:00:00 2001 -From: Jasvinder Singh -Date: Wed, 2 Mar 2016 21:19:58 +0000 -Subject: [PATCH] port: fix crash for ring writer nodrop - -Error log: - [APP] Initializing PIPELINE0 ... - pipeline> [APP] Initializing PIPELINE1 ... - [PIPELINE1] Pass-through - [APP] Initializing PIPELINE2 ... - [PIPELINE2] Pass-through - Segmentation fault (core dumped) - -Fixes: 5f4cd47309d6 ("port: add ring writer nodrop") -Fixes: d58f69c54172 ("port: add ring multi reader or writer") - -Signed-off-by: Jasvinder Singh ---- - lib/librte_port/rte_port_ring.c | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -diff --git a/lib/librte_port/rte_port_ring.c b/lib/librte_port/rte_port_ring.c -index 755dfc1..b847fea 100644 ---- a/lib/librte_port/rte_port_ring.c -+++ b/lib/librte_port/rte_port_ring.c -@@ -520,16 +520,20 @@ send_burst_nodrop(struct rte_port_ring_writer_nodrop *p) - p->tx_buf_count); - - /* We sent all the packets in a first try */ -- if (nb_tx >= p->tx_buf_count) -+ if (nb_tx >= p->tx_buf_count) { -+ p->tx_buf_count = 0; - return; -+ } - - for (i = 0; i < p->n_retries; i++) { - nb_tx += rte_ring_sp_enqueue_burst(p->ring, - (void **) (p->tx_buf + nb_tx), p->tx_buf_count - nb_tx); - - /* We sent all the packets in more than one try */ -- if (nb_tx >= p->tx_buf_count) -+ if (nb_tx >= p->tx_buf_count) { -+ p->tx_buf_count = 0; - return; -+ } - } - - /* We didn't send the packets in maximum allowed attempts */ -@@ -549,16 +553,20 @@ send_burst_mp_nodrop(struct rte_port_ring_writer_nodrop *p) - p->tx_buf_count); - - /* We sent all the packets in a first try */ -- if (nb_tx >= p->tx_buf_count) -+ if (nb_tx >= p->tx_buf_count) { -+ p->tx_buf_count = 0; - return; -+ } - - for (i = 0; i < p->n_retries; i++) { - nb_tx += rte_ring_mp_enqueue_burst(p->ring, - (void **) (p->tx_buf + nb_tx), p->tx_buf_count - nb_tx); - - /* We sent all the packets in more than one try */ -- if (nb_tx >= p->tx_buf_count) -+ if (nb_tx >= p->tx_buf_count) { -+ p->tx_buf_count = 0; - return; -+ } - } - - /* We didn't send the packets in maximum allowed attempts */ --- -2.6.2 - diff --git a/0028-tools-fix-unbinding-failure-handling.patch b/0028-tools-fix-unbinding-failure-handling.patch deleted file mode 100644 index 0c24097..0000000 --- a/0028-tools-fix-unbinding-failure-handling.patch +++ /dev/null @@ -1,29 +0,0 @@ -From da82ee17e6ea99bf2931383ac33b0caccaaaefce Mon Sep 17 00:00:00 2001 -From: Jeff Shaw -Date: Mon, 8 Feb 2016 16:33:46 -0800 -Subject: [PATCH] tools: fix unbinding failure handling - -We should call sys.exit(), not divide sys by exit(). - -Signed-off-by: Jeff Shaw -Acked-by: Bruce Richardson ---- - tools/dpdk_nic_bind.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py -index f02454e..a1923c5 100755 ---- a/tools/dpdk_nic_bind.py -+++ b/tools/dpdk_nic_bind.py -@@ -317,7 +317,7 @@ def unbind_one(dev_id, force): - f = open(filename, "a") - except: - print "Error: unbind failed for %s - Cannot open %s" % (dev_id, filename) -- sys/exit(1) -+ sys.exit(1) - f.write(dev_id) - f.close() - --- -2.6.2 - diff --git a/0029-tools-support-Python-3-in-bind-script.patch b/0029-tools-support-Python-3-in-bind-script.patch deleted file mode 100644 index 4a8d95f..0000000 --- a/0029-tools-support-Python-3-in-bind-script.patch +++ /dev/null @@ -1,253 +0,0 @@ -From 16c1814c802c205f6d3c32e3d3d10de9f87e7f22 Mon Sep 17 00:00:00 2001 -From: Dawid Jurczak -Date: Wed, 27 Jan 2016 20:59:44 +0100 -Subject: [PATCH] tools: support Python 3 in bind script - -This patch fixes syntax errors during binding ethernet device -on systems where Python 3 is default. -Backward compatibility with Python 2 is preserved. - -Signed-off-by: Dawid Jurczak ---- - tools/dpdk_nic_bind.py | 74 +++++++++++++++++++++++++------------------------- - 1 file changed, 37 insertions(+), 37 deletions(-) - -diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py -index a1923c5..dfefdae 100755 ---- a/tools/dpdk_nic_bind.py -+++ b/tools/dpdk_nic_bind.py -@@ -54,7 +54,7 @@ args = [] - def usage(): - '''Print usage information for the program''' - argv0 = basename(sys.argv[0]) -- print """ -+ print (""" - Usage: - ------ - -@@ -110,7 +110,7 @@ To unbind 0000:01:00.0 from using any driver - To bind 0000:02:00.0 and 0000:02:00.1 to the ixgbe kernel driver - %(argv0)s -b ixgbe 02:00.0 02:00.1 - -- """ % locals() # replace items from local variables -+ """ % locals()) # replace items from local variables - - # This is roughly compatible with check_output function in subprocess module - # which is only available in python 2.7. -@@ -156,7 +156,7 @@ def check_modules(): - '''Checks that igb_uio is loaded''' - global dpdk_drivers - -- fd = file("/proc/modules") -+ fd = open("/proc/modules", 'r') - loaded_mods = fd.readlines() - fd.close() - -@@ -176,10 +176,10 @@ def check_modules(): - # check if we have at least one loaded module - if True not in [mod["Found"] for mod in mods] and b_flag is not None: - if b_flag in dpdk_drivers: -- print "Error - no supported modules(DPDK driver) are loaded" -+ print ("Error - no supported modules(DPDK driver) are loaded") - sys.exit(1) - else: -- print "Warning - no supported modules(DPDK driver) are loaded" -+ print ("Warning - no supported modules(DPDK driver) are loaded") - - # change DPDK driver list to only contain drivers that are loaded - dpdk_drivers = [mod["Name"] for mod in mods if mod["Found"]] -@@ -198,7 +198,7 @@ def get_pci_device_details(dev_id): - for line in extra_info: - if len(line) == 0: - continue -- name, value = line.split("\t", 1) -+ name, value = line.decode().split("\t", 1) - name = name.strip(":") + "_str" - device[name] = value - # check for a unix interface name -@@ -234,7 +234,7 @@ def get_nic_details(): - dev["Device"] = int(dev["Device"],16) - devices[dev["Slot"]] = dict(dev) # use dict to make copy of dev - else: -- name, value = dev_line.split("\t", 1) -+ name, value = dev_line.decode().split("\t", 1) - dev[name.rstrip(":")] = value - - # check what is the interface if any for an ssh connection if -@@ -243,17 +243,17 @@ def get_nic_details(): - route = check_output(["ip", "-o", "route"]) - # filter out all lines for 169.254 routes - route = "\n".join(filter(lambda ln: not ln.startswith("169.254"), -- route.splitlines())) -+ route.decode().splitlines())) - rt_info = route.split() -- for i in xrange(len(rt_info) - 1): -+ for i in range(len(rt_info) - 1): - if rt_info[i] == "dev": - ssh_if.append(rt_info[i+1]) - - # based on the basic info, get extended text details - for d in devices.keys(): - # get additional info and add it to existing data -- devices[d] = dict(devices[d].items() + -- get_pci_device_details(d).items()) -+ devices[d] = devices[d].copy() -+ devices[d].update(get_pci_device_details(d).items()) - - for _if in ssh_if: - if _if in devices[d]["Interface"].split(","): -@@ -293,22 +293,22 @@ def dev_id_from_dev_name(dev_name): - if dev_name in devices[d]["Interface"].split(","): - return devices[d]["Slot"] - # if nothing else matches - error -- print "Unknown device: %s. " \ -- "Please specify device in \"bus:slot.func\" format" % dev_name -+ print ("Unknown device: %s. " \ -+ "Please specify device in \"bus:slot.func\" format" % dev_name) - sys.exit(1) - - def unbind_one(dev_id, force): - '''Unbind the device identified by "dev_id" from its current driver''' - dev = devices[dev_id] - if not has_driver(dev_id): -- print "%s %s %s is not currently managed by any driver\n" % \ -- (dev["Slot"], dev["Device_str"], dev["Interface"]) -+ print ("%s %s %s is not currently managed by any driver\n" % \ -+ (dev["Slot"], dev["Device_str"], dev["Interface"])) - return - - # prevent us disconnecting ourselves - if dev["Ssh_if"] and not force: -- print "Routing table indicates that interface %s is active" \ -- ". Skipping unbind" % (dev_id) -+ print ("Routing table indicates that interface %s is active" \ -+ ". Skipping unbind" % (dev_id)) - return - - # write to /sys to unbind -@@ -316,7 +316,7 @@ def unbind_one(dev_id, force): - try: - f = open(filename, "a") - except: -- print "Error: unbind failed for %s - Cannot open %s" % (dev_id, filename) -+ print ("Error: unbind failed for %s - Cannot open %s" % (dev_id, filename)) - sys.exit(1) - f.write(dev_id) - f.close() -@@ -329,14 +329,14 @@ def bind_one(dev_id, driver, force): - - # prevent disconnection of our ssh session - if dev["Ssh_if"] and not force: -- print "Routing table indicates that interface %s is active" \ -- ". Not modifying" % (dev_id) -+ print ("Routing table indicates that interface %s is active" \ -+ ". Not modifying" % (dev_id)) - return - - # unbind any existing drivers we don't want - if has_driver(dev_id): - if dev["Driver_str"] == driver: -- print "%s already bound to driver %s, skipping\n" % (dev_id, driver) -+ print ("%s already bound to driver %s, skipping\n" % (dev_id, driver)) - return - else: - saved_driver = dev["Driver_str"] -@@ -349,14 +349,14 @@ def bind_one(dev_id, driver, force): - try: - f = open(filename, "w") - except: -- print "Error: bind failed for %s - Cannot open %s" % (dev_id, filename) -+ print ("Error: bind failed for %s - Cannot open %s" % (dev_id, filename)) - return - try: - f.write("%04x %04x" % (dev["Vendor"], dev["Device"])) - f.close() - except: -- print "Error: bind failed for %s - Cannot write new PCI ID to " \ -- "driver %s" % (dev_id, driver) -+ print ("Error: bind failed for %s - Cannot write new PCI ID to " \ -+ "driver %s" % (dev_id, driver)) - return - - # do the bind by writing to /sys -@@ -364,7 +364,7 @@ def bind_one(dev_id, driver, force): - try: - f = open(filename, "a") - except: -- print "Error: bind failed for %s - Cannot open %s" % (dev_id, filename) -+ print ("Error: bind failed for %s - Cannot open %s" % (dev_id, filename)) - if saved_driver is not None: # restore any previous driver - bind_one(dev_id, saved_driver, force) - return -@@ -378,7 +378,7 @@ def bind_one(dev_id, driver, force): - tmp = get_pci_device_details(dev_id) - if "Driver_str" in tmp and tmp["Driver_str"] == driver: - return -- print "Error: bind failed for %s - Cannot bind to driver %s" % (dev_id, driver) -+ print ("Error: bind failed for %s - Cannot bind to driver %s" % (dev_id, driver)) - if saved_driver is not None: # restore any previous driver - bind_one(dev_id, saved_driver, force) - return -@@ -423,8 +423,8 @@ def display_devices(title, dev_list, extra_params = None): - %()s fields in it for replacement by the named fields in each device's - dictionary.''' - strings = [] # this holds the strings to print. We sort before printing -- print "\n%s" % title -- print "="*len(title) -+ print ("\n%s" % title) -+ print ("="*len(title)) - if len(dev_list) == 0: - strings.append("") - else: -@@ -436,7 +436,7 @@ def display_devices(title, dev_list, extra_params = None): - strings.append("%s '%s'" % (dev["Slot"], dev["Device_str"])) - # sort before printing, so that the entries appear in PCI order - strings.sort() -- print "\n".join(strings) # print one per line -+ print ("\n".join(strings)) # print one per line - - def show_status(): - '''Function called when the script is passed the "--status" option. Displays -@@ -480,9 +480,9 @@ def parse_args(): - opts, args = getopt.getopt(sys.argv[1:], "b:us", - ["help", "usage", "status", "force", - "bind=", "unbind"]) -- except getopt.GetoptError, error: -- print str(error) -- print "Run '%s --usage' for further information" % sys.argv[0] -+ except (getopt.GetoptError, error): -+ print (str(error)) -+ print ("Run '%s --usage' for further information" % sys.argv[0]) - sys.exit(1) - - for opt, arg in opts: -@@ -495,7 +495,7 @@ def parse_args(): - force_flag = True - if opt == "-b" or opt == "-u" or opt == "--bind" or opt == "--unbind": - if b_flag is not None: -- print "Error - Only one bind or unbind may be specified\n" -+ print ("Error - Only one bind or unbind may be specified\n") - sys.exit(1) - if opt == "-u" or opt == "--unbind": - b_flag = "none" -@@ -510,13 +510,13 @@ def do_arg_actions(): - global args - - if b_flag is None and not status_flag: -- print "Error: No action specified for devices. Please give a -b or -u option" -- print "Run '%s --usage' for further information" % sys.argv[0] -+ print ("Error: No action specified for devices. Please give a -b or -u option") -+ print ("Run '%s --usage' for further information" % sys.argv[0]) - sys.exit(1) - - if b_flag is not None and len(args) == 0: -- print "Error: No devices specified." -- print "Run '%s --usage' for further information" % sys.argv[0] -+ print ("Error: No devices specified.") -+ print ("Run '%s --usage' for further information" % sys.argv[0]) - sys.exit(1) - - if b_flag == "none" or b_flag == "None": --- -2.6.2 - diff --git a/0030-tools-support-binding-to-built-in-kernel-modules.patch b/0030-tools-support-binding-to-built-in-kernel-modules.patch deleted file mode 100644 index 787721d..0000000 --- a/0030-tools-support-binding-to-built-in-kernel-modules.patch +++ /dev/null @@ -1,69 +0,0 @@ -From bb9f408550d13af6c1da104b0d9d9b9837f69bde Mon Sep 17 00:00:00 2001 -From: Kamil Rytarowski -Date: Thu, 28 Jan 2016 14:13:53 +0100 -Subject: [PATCH] tools: support binding to built-in kernel modules - -Currently dpdk_nic_bind.py detects Linux kernel modules via reading -/proc/modules. Built-in ones aren't listed there and therefore they are -not being found by the script. - -Add support for checking built-in modules with parsing the sysfs files. - -This commit obsoletes the /proc/modules parsing approach. - -Signed-off-by: Kamil Rytarowski -Acked-by: Yuanhan Liu ---- - tools/dpdk_nic_bind.py | 30 ++++++++++++++++++++---------- - 1 file changed, 20 insertions(+), 10 deletions(-) - -diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py -index dfefdae..14c5311 100755 ---- a/tools/dpdk_nic_bind.py -+++ b/tools/dpdk_nic_bind.py -@@ -156,22 +156,32 @@ def check_modules(): - '''Checks that igb_uio is loaded''' - global dpdk_drivers - -- fd = open("/proc/modules", 'r') -- loaded_mods = fd.readlines() -- fd.close() -- - # list of supported modules - mods = [{"Name" : driver, "Found" : False} for driver in dpdk_drivers] - - # first check if module is loaded -- for line in loaded_mods: -+ try: -+ # Get list of sysfs modules (both built-in and dynamically loaded) -+ sysfs_path = '/sys/module/' -+ -+ # Get the list of directories in sysfs_path -+ sysfs_mods = [os.path.join(sysfs_path, o) for o -+ in os.listdir(sysfs_path) -+ if os.path.isdir(os.path.join(sysfs_path, o))] -+ -+ # Extract the last element of '/sys/module/abc' in the array -+ sysfs_mods = [a.split('/')[-1] for a in sysfs_mods] -+ -+ # special case for vfio_pci (module is named vfio-pci, -+ # but its .ko is named vfio_pci) -+ sysfs_mods = map(lambda a: -+ a if a != 'vfio_pci' else 'vfio-pci', sysfs_mods) -+ - for mod in mods: -- if line.startswith(mod["Name"]): -- mod["Found"] = True -- # special case for vfio_pci (module is named vfio-pci, -- # but its .ko is named vfio_pci) -- elif line.replace("_", "-").startswith(mod["Name"]): -+ if mod["Name"] in sysfs_mods: - mod["Found"] = True -+ except: -+ pass - - # check if we have at least one loaded module - if True not in [mod["Found"] for mod in mods] and b_flag is not None: --- -2.6.2 - diff --git a/0031-vhost-fix-leak-of-fds-and-mmaps.patch b/0031-vhost-fix-leak-of-fds-and-mmaps.patch deleted file mode 100644 index 2d08823..0000000 --- a/0031-vhost-fix-leak-of-fds-and-mmaps.patch +++ /dev/null @@ -1,151 +0,0 @@ -From ca67ed289a76f38d6c4a4021985a36eaf1d77e28 Mon Sep 17 00:00:00 2001 -From: Rich Lane -Date: Wed, 10 Feb 2016 10:40:55 -0800 -Subject: [PATCH] vhost: fix leak of fds and mmaps - -The common vhost code only supported a single mmap per device. vhost-user -worked around this by saving the address/length/fd of each mmap after the end -of the rte_virtio_memory struct. This only works if the vhost-user code frees -dev->mem, since the common code is unaware of the extra info. The -VHOST_USER_RESET_OWNER message is one situation where the common code frees -dev->mem and leaks the fds and mappings. This happens every time I shut down a -VM. - -The new code calls back into the implementation (vhost-user or vhost-cuse) to -clean up these resources. - -The vhost-cuse changes are only compile tested. - -Signed-off-by: Rich Lane -Acked-by: Yuanhan Liu ---- - lib/librte_vhost/vhost-net.h | 6 ++++++ - lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 12 ++++++++++++ - lib/librte_vhost/vhost_user/vhost-net-user.c | 1 - - lib/librte_vhost/vhost_user/virtio-net-user.c | 25 ++++++++++--------------- - lib/librte_vhost/vhost_user/virtio-net-user.h | 1 - - lib/librte_vhost/virtio-net.c | 8 +------- - 6 files changed, 29 insertions(+), 24 deletions(-) - -diff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_vhost/vhost-net.h -index c69b60b..affbd1a 100644 ---- a/lib/librte_vhost/vhost-net.h -+++ b/lib/librte_vhost/vhost-net.h -@@ -115,4 +115,10 @@ struct vhost_net_device_ops { - - - struct vhost_net_device_ops const *get_virtio_net_callbacks(void); -+ -+/* -+ * Backend-specific cleanup. Defined by vhost-cuse and vhost-user. -+ */ -+void vhost_backend_cleanup(struct virtio_net *dev); -+ - #endif /* _VHOST_NET_CDEV_H_ */ -diff --git a/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c b/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c -index ae2c3fa..374c884 100644 ---- a/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c -+++ b/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c -@@ -421,3 +421,15 @@ int cuse_set_backend(struct vhost_device_ctx ctx, struct vhost_vring_file *file) - - return ops->set_backend(ctx, file); - } -+ -+void -+vhost_backend_cleanup(struct virtio_net *dev) -+{ -+ /* Unmap QEMU memory file if mapped. */ -+ if (dev->mem) { -+ munmap((void *)(uintptr_t)dev->mem->mapped_address, -+ (size_t)dev->mem->mapped_size); -+ free(dev->mem); -+ dev->mem = NULL; -+ } -+} -diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c b/lib/librte_vhost/vhost_user/vhost-net-user.c -index cb18396..6ed7669 100644 ---- a/lib/librte_vhost/vhost_user/vhost-net-user.c -+++ b/lib/librte_vhost/vhost_user/vhost-net-user.c -@@ -348,7 +348,6 @@ vserver_message_handler(int connfd, void *dat, int *remove) - close(connfd); - *remove = 1; - free(cfd_ctx); -- user_destroy_device(ctx); - ops->destroy_device(ctx); - - return; -diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.c b/lib/librte_vhost/vhost_user/virtio-net-user.c -index 4270c98..ffce0d6 100644 ---- a/lib/librte_vhost/vhost_user/virtio-net-user.c -+++ b/lib/librte_vhost/vhost_user/virtio-net-user.c -@@ -94,6 +94,16 @@ free_mem_region(struct virtio_net *dev) - } - } - -+void -+vhost_backend_cleanup(struct virtio_net *dev) -+{ -+ if (dev->mem) { -+ free_mem_region(dev); -+ free(dev->mem); -+ dev->mem = NULL; -+ } -+} -+ - int - user_set_mem_table(struct vhost_device_ctx ctx, struct VhostUserMsg *pmsg) - { -@@ -345,21 +355,6 @@ user_set_vring_enable(struct vhost_device_ctx ctx, - } - - void --user_destroy_device(struct vhost_device_ctx ctx) --{ -- struct virtio_net *dev = get_device(ctx); -- -- if (dev && (dev->flags & VIRTIO_DEV_RUNNING)) -- notify_ops->destroy_device(dev); -- -- if (dev && dev->mem) { -- free_mem_region(dev); -- free(dev->mem); -- dev->mem = NULL; -- } --} -- --void - user_set_protocol_features(struct vhost_device_ctx ctx, - uint64_t protocol_features) - { -diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.h b/lib/librte_vhost/vhost_user/virtio-net-user.h -index 28213f3..559bb46 100644 ---- a/lib/librte_vhost/vhost_user/virtio-net-user.h -+++ b/lib/librte_vhost/vhost_user/virtio-net-user.h -@@ -61,5 +61,4 @@ int user_get_vring_base(struct vhost_device_ctx, struct vhost_vring_state *); - int user_set_vring_enable(struct vhost_device_ctx ctx, - struct vhost_vring_state *state); - --void user_destroy_device(struct vhost_device_ctx); - #endif -diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c -index 9059b11..196e1cf 100644 ---- a/lib/librte_vhost/virtio-net.c -+++ b/lib/librte_vhost/virtio-net.c -@@ -207,13 +207,7 @@ cleanup_device(struct virtio_net *dev, int destroy) - { - uint32_t i; - -- /* Unmap QEMU memory file if mapped. */ -- if (dev->mem) { -- munmap((void *)(uintptr_t)dev->mem->mapped_address, -- (size_t)dev->mem->mapped_size); -- free(dev->mem); -- dev->mem = NULL; -- } -+ vhost_backend_cleanup(dev); - - for (i = 0; i < dev->virt_qp_nb; i++) { - cleanup_vq(dev->virtqueue[i * VIRTIO_QNUM + VIRTIO_RXQ], destroy); --- -2.6.2 - diff --git a/0032-virtio-fix-crash-in-statistics-functions.patch b/0032-virtio-fix-crash-in-statistics-functions.patch deleted file mode 100644 index 23ea38a..0000000 --- a/0032-virtio-fix-crash-in-statistics-functions.patch +++ /dev/null @@ -1,50 +0,0 @@ -From c680a4a88c4312068f60937a7ba51eac8211c9a6 Mon Sep 17 00:00:00 2001 -From: Bernard Iremonger -Date: Wed, 23 Dec 2015 09:45:19 +0000 -Subject: [PATCH] virtio: fix crash in statistics functions - -This initialisation of nb_rx_queues and nb_tx_queues has been removed -from eth_virtio_dev_init. - -The nb_rx_queues and nb_tx_queues were being initialised in -eth_virtio_dev_init before the tx_queues and rx_queues arrays were -allocated. - -The arrays are allocated when the ethdev port is configured and the -nb_tx_queues and nb_rx_queues are initialised. - -If any of the following functions were called before the ethdev -port was configured there was a segmentation fault because -rx_queues and tx_queues were NULL: - -rte_eth_stats_get -rte_eth_stats_reset -rte_eth_xstats_get -rte_eth_xstats_reset - -Fixes: 823ad647950a ("virtio: support multiple queues") - -Signed-off-by: Bernard Iremonger -Acked-by: Konstantin Ananyev -Acked-by: Yuanhan Liu ---- - drivers/net/virtio/virtio_ethdev.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c -index ec18fd0..ebefdb4 100644 ---- a/drivers/net/virtio/virtio_ethdev.c -+++ b/drivers/net/virtio/virtio_ethdev.c -@@ -1131,9 +1131,6 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) - hw->max_tx_queues = 1; - } - -- eth_dev->data->nb_rx_queues = hw->max_rx_queues; -- eth_dev->data->nb_tx_queues = hw->max_tx_queues; -- - PMD_INIT_LOG(DEBUG, "hw->max_rx_queues=%d hw->max_tx_queues=%d", - hw->max_rx_queues, hw->max_tx_queues); - PMD_INIT_LOG(DEBUG, "port %d vendorID=0x%x deviceID=0x%x", --- -2.6.2 - diff --git a/0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch b/0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch deleted file mode 100644 index a794d21..0000000 --- a/0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 3b1e3e4e362453df8cecbc6d481444be8b84326e Mon Sep 17 00:00:00 2001 -From: Huawei Xie -Date: Fri, 11 Dec 2015 00:07:32 +0800 -Subject: [PATCH] virtio: fix descriptors pointing to the same buffer - -The virtio_net_hdr desc all pointed to the same buffer. It doesn't cause -issue because in the simple TX mode we don't use the header. This patch -makes the header desc point to different buffer. - -Fixes: b4ae9c505f2e ("virtio: optimize ring layout") - -Signed-off-by: Huawei Xie -Acked-by: Jianfeng Tan -Acked-by: Yuanhan Liu ---- - drivers/net/virtio/virtio_rxtx.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c -index e96352c..a7a58be 100644 ---- a/drivers/net/virtio/virtio_rxtx.c -+++ b/drivers/net/virtio/virtio_rxtx.c -@@ -353,7 +353,7 @@ virtio_dev_vring_start(struct virtqueue *vq, int queue_type) - vq->vq_ring.desc[i + mid_idx].next = i; - vq->vq_ring.desc[i + mid_idx].addr = - vq->virtio_net_hdr_mem + -- mid_idx * vq->hw->vtnet_hdr_size; -+ i * vq->hw->vtnet_hdr_size; - vq->vq_ring.desc[i + mid_idx].len = - vq->hw->vtnet_hdr_size; - vq->vq_ring.desc[i + mid_idx].flags = --- -2.6.2 - diff --git a/0034-virtio-fix-restart.patch b/0034-virtio-fix-restart.patch deleted file mode 100644 index d0f712c..0000000 --- a/0034-virtio-fix-restart.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 9a0615af7746485d73d10561cc0743bc2fcd4bf7 Mon Sep 17 00:00:00 2001 -From: Jianfeng Tan -Date: Mon, 11 Jan 2016 14:16:13 +0800 -Subject: [PATCH] virtio: fix restart - -Fix the issue that virtio device cannot be started after stopped. - -The field, hw->started, should be changed by virtio_dev_start/stop instead -of virtio_dev_close. - -Fixes: a85786dc816f ("virtio: fix states handling during initialization") - -Reported-by: Pavel Fedin -Signed-off-by: Jianfeng Tan -Acked-by: Yuanhan Liu -Tested-by: Pavel Fedin ---- - drivers/net/virtio/virtio_ethdev.c | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c -index 06bddd7..ec18fd0 100644 ---- a/drivers/net/virtio/virtio_ethdev.c -+++ b/drivers/net/virtio/virtio_ethdev.c -@@ -478,11 +478,13 @@ virtio_dev_close(struct rte_eth_dev *dev) - - PMD_INIT_LOG(DEBUG, "virtio_dev_close"); - -+ if (hw->started == 1) -+ virtio_dev_stop(dev); -+ - /* reset the NIC */ - if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC) - vtpci_irq_config(hw, VIRTIO_MSI_NO_VECTOR); - vtpci_reset(hw); -- hw->started = 0; - virtio_dev_free_mbufs(dev); - virtio_free_queues(dev); - } -@@ -1159,10 +1161,9 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev) - if (rte_eal_process_type() == RTE_PROC_SECONDARY) - return -EPERM; - -- if (hw->started == 1) { -- virtio_dev_stop(eth_dev); -- virtio_dev_close(eth_dev); -- } -+ /* Close it anyway since there's no way to know if closed */ -+ virtio_dev_close(eth_dev); -+ - pci_dev = eth_dev->pci_dev; - - eth_dev->dev_ops = NULL; -@@ -1364,9 +1365,12 @@ static void - virtio_dev_stop(struct rte_eth_dev *dev) - { - struct rte_eth_link link; -+ struct virtio_hw *hw = dev->data->dev_private; - - PMD_INIT_LOG(DEBUG, "stop"); - -+ hw->started = 0; -+ - if (dev->data->dev_conf.intr_conf.lsc) - rte_intr_disable(&dev->pci_dev->intr_handle); - --- -2.6.2 - diff --git a/0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi.patch b/0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi.patch deleted file mode 100644 index 8b29814..0000000 --- a/0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a81e0a0f73a834d2cd8e5fd3237fac85574ad778 Mon Sep 17 00:00:00 2001 -From: Nirmoy Das -Date: Mon, 11 Jul 2016 11:56:27 +0200 -Subject: [PATCH] PAGE_SIZE constant is not defined on ARM since multiple - values are possible, so DPDK needs to dynamically get the page size. - ---- - drivers/net/bnx2x/bnx2x.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c -index 67af5da..766d66b 100644 ---- a/drivers/net/bnx2x/bnx2x.c -+++ b/drivers/net/bnx2x/bnx2x.c -@@ -34,6 +34,10 @@ - #define BNX2X_PMD_VERSION_MINOR 0 - #define BNX2X_PMD_VERSION_PATCH 0 - -+#ifndef PAGE_SIZE -+#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) -+#endif -+ - static inline const char * - bnx2x_pmd_version(void) - { --- -2.9.0 - diff --git a/0036-examples-fix-build-dependencies.patch b/0036-examples-fix-build-dependencies.patch deleted file mode 100644 index 005376e..0000000 --- a/0036-examples-fix-build-dependencies.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 1f1d7f76edc37acc879746ef3822dae54cbfe2a3 Mon Sep 17 00:00:00 2001 -From: Thomas Monjalon -Date: Fri, 5 Feb 2016 15:43:56 +0100 -Subject: [PATCH] examples: fix build dependencies - -When building for ARM some examples were failing to compile because -of some dependencies disabled. -Declaring these dependencies prevent from trying to compile some -not supported examples. - -Signed-off-by: Thomas Monjalon ---- - examples/Makefile | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/examples/Makefile b/examples/Makefile -index 1cb4785..1665df1 100644 ---- a/examples/Makefile -+++ b/examples/Makefile -@@ -46,21 +46,25 @@ endif - DIRS-y += ethtool - DIRS-y += exception_path - DIRS-y += helloworld --DIRS-y += ip_pipeline --DIRS-y += ip_reassembly -+DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += ip_pipeline -+ifeq ($(CONFIG_RTE_LIBRTE_LPM),y) -+DIRS-$(CONFIG_RTE_IP_FRAG) += ip_reassembly - DIRS-$(CONFIG_RTE_IP_FRAG) += ip_fragmentation -+endif - DIRS-y += ipv4_multicast - DIRS-$(CONFIG_RTE_LIBRTE_KNI) += kni - DIRS-y += l2fwd - DIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += l2fwd-ivshmem - DIRS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += l2fwd-jobstats - DIRS-y += l2fwd-keepalive --DIRS-y += l3fwd -+DIRS-$(CONFIG_RTE_LIBRTE_LPM) += l3fwd - DIRS-$(CONFIG_RTE_LIBRTE_ACL) += l3fwd-acl -+ifeq ($(CONFIG_RTE_LIBRTE_LPM),y) - DIRS-$(CONFIG_RTE_LIBRTE_POWER) += l3fwd-power - DIRS-y += l3fwd-vf -+endif - DIRS-y += link_status_interrupt --DIRS-y += load_balancer -+DIRS-$(CONFIG_RTE_LIBRTE_LPM) += load_balancer - DIRS-y += multi_process - DIRS-y += netmap_compat/bridge - DIRS-$(CONFIG_RTE_LIBRTE_REORDER) += packet_ordering --- -2.6.6 - diff --git a/0037-examples-ethtool-fix-build.patch b/0037-examples-ethtool-fix-build.patch deleted file mode 100644 index 70098af..0000000 --- a/0037-examples-ethtool-fix-build.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 71e6e8c51906102ba1f7da0a75f29f9c26b651f0 Mon Sep 17 00:00:00 2001 -From: Thomas Monjalon -Date: Fri, 5 Feb 2016 15:38:02 +0100 -Subject: [PATCH] examples/ethtool: fix build - -When building for ARM, the spinlock structure was not found. -It appears to be a mismatch with rwlock which is not used in this file. - -Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application") - -Signed-off-by: Thomas Monjalon -Acked-by: Remy Horton ---- - examples/ethtool/ethtool-app/main.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c -index e21abcd..2c655d8 100644 ---- a/examples/ethtool/ethtool-app/main.c -+++ b/examples/ethtool/ethtool-app/main.c -@@ -36,7 +36,7 @@ - #include - - #include --#include -+#include - #include - #include - #include --- -2.6.6 - diff --git a/0099-mk-fix-gcc-5-version-on-suse.patch b/0099-mk-fix-gcc-5-version-on-suse.patch deleted file mode 100644 index f74d42a..0000000 --- a/0099-mk-fix-gcc-5-version-on-suse.patch +++ /dev/null @@ -1,41 +0,0 @@ -From a5c5b9f76767badb3f198326bd5cbbebba803e36 Mon Sep 17 00:00:00 2001 -From: Markos Chandras -Date: Tue, 22 Mar 2016 17:13:36 +0000 -Subject: [PATCH] mk: fix gcc-5 version on Suse - -In openSUSE Tumbleweed (and in any other SUSE distribution which -uses (or will use) gcc >= 5), gcc -dumpversion returns '5'. This is on -purpose as discussed in https://bugzilla.opensuse.org/show_bug.cgi?id=941428 -As a result of which, the gcc-4.x comparison (40 against 5) does not -work leading to tons of warnings and failures during build. - -This patch aims to change the way the gcc version is obtained by using -the gcc macros directly. -This is similar to what's being used in the Linux kernel. Querying the -GCC macros directly gives more accurate results compared to -dumpversion -which could vary across distributions. - -Signed-off-by: Markos Chandras -Acked-by: Thomas Monjalon ---- - mk/toolchain/gcc/rte.toolchain-compat.mk | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk -index e144216..6eed20c 100644 ---- a/mk/toolchain/gcc/rte.toolchain-compat.mk -+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk -@@ -38,7 +38,9 @@ - - #find out GCC version - --GCC_VERSION = $(subst .,,$(shell $(CC) -dumpversion | cut -f1-2 -d.)) -+GCC_MAJOR = $(shell echo __GNUC__ | $(CC) -E -x c - | tail -n 1) -+GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(CC) -E -x c - | tail -n 1) -+GCC_VERSION = $(GCC_MAJOR)$(GCC_MINOR) - - # if GCC is older than 4.x - ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1) --- -2.7.3 - diff --git a/0100-kni-fix-build-with-gcc-6.patch b/0100-kni-fix-build-with-gcc-6.patch deleted file mode 100644 index 9809aaf..0000000 --- a/0100-kni-fix-build-with-gcc-6.patch +++ /dev/null @@ -1,73 +0,0 @@ -From cba50f6be0db9efdf694dcf4bce4a6945a275182 Mon Sep 17 00:00:00 2001 -From: Anupam Kapoor -Date: Tue, 21 Jun 2016 17:13:22 +0530 -Subject: [PATCH] kni: fix build with gcc 6 - -This commit fixes build errors triggered due misleading indentation. - -Fixes: b9ee370557f1 ("kni: update kernel driver ethtool baseline") -Fixes: 3fc5ca2f6352 ("kni: initial import") - -Signed-off-by: Anupam Kapoor -Acked-by: Ferruh Yigit ---- - lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c | 6 ++++-- - lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 3 ++- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c -index df22470..140a2a4 100644 ---- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c -+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c -@@ -3300,12 +3300,13 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 *data) - *data = E1000_READ_REG(hw, E1000_MPHY_DATA); - - /* Disable access to mPHY if it was originally disabled */ -- if (locked) -+ if (locked) { - ready = e1000_is_mphy_ready(hw); - if (!ready) - return -E1000_ERR_PHY; - E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, - E1000_MPHY_DIS_ACCESS); -+ } - - return E1000_SUCCESS; - } -@@ -3365,12 +3366,13 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 data, - E1000_WRITE_REG(hw, E1000_MPHY_DATA, data); - - /* Disable access to mPHY if it was originally disabled */ -- if (locked) -+ if (locked) { - ready = e1000_is_mphy_ready(hw); - if (!ready) - return -E1000_ERR_PHY; - E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, - E1000_MPHY_DIS_ACCESS); -+ } - - return E1000_SUCCESS; - } -diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c -index 017dfe1..c6f4130 100644 ---- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c -+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c -@@ -867,12 +867,13 @@ s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw, - link_mode == IXGBE_AUTOC_LMS_KX4_KX_KR_SGMII) { - /* Set KX4/KX/KR support according to speed requested */ - autoc &= ~(IXGBE_AUTOC_KX4_KX_SUPP_MASK | IXGBE_AUTOC_KR_SUPP); -- if (speed & IXGBE_LINK_SPEED_10GB_FULL) -+ if (speed & IXGBE_LINK_SPEED_10GB_FULL) { - if (orig_autoc & IXGBE_AUTOC_KX4_SUPP) - autoc |= IXGBE_AUTOC_KX4_SUPP; - if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) && - (hw->phy.smart_speed_active == false)) - autoc |= IXGBE_AUTOC_KR_SUPP; -+ } - if (speed & IXGBE_LINK_SPEED_1GB_FULL) - autoc |= IXGBE_AUTOC_KX_SUPP; - } else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) && --- -2.8.4 - diff --git a/0101-ixgbe-fix-uninitialized-warning.patch b/0101-ixgbe-fix-uninitialized-warning.patch deleted file mode 100644 index 9b7a91a..0000000 --- a/0101-ixgbe-fix-uninitialized-warning.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e64a0edb01812bb688c32ddda18eede344ffe163 Mon Sep 17 00:00:00 2001 -From: Aaron Conole -Date: Tue, 22 Mar 2016 17:37:18 -0400 -Subject: [PATCH] ixgbe: fix uninitialized warning - -Silence a compiler warning that this variable may be used uninitialized. - -Signed-off-by: Aaron Conole -Acked-by: Helin Zhang ---- - drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c -index 89c0eb9..b018ba7 100644 ---- a/drivers/net/ixgbe/ixgbe_rxtx.c -+++ b/drivers/net/ixgbe/ixgbe_rxtx.c -@@ -1616,7 +1616,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts, - struct ixgbe_rx_entry *rxe; - struct ixgbe_scattered_rx_entry *sc_entry; - struct ixgbe_scattered_rx_entry *next_sc_entry; -- struct ixgbe_rx_entry *next_rxe; -+ struct ixgbe_rx_entry *next_rxe = NULL; - struct rte_mbuf *first_seg; - struct rte_mbuf *rxm; - struct rte_mbuf *nmb; -@@ -1793,7 +1793,7 @@ next_desc: - * the pointer to the first mbuf at the NEXTP entry in the - * sw_sc_ring and continue to parse the RX ring. - */ -- if (!eop) { -+ if (!eop && next_rxe) { - rxm->next = next_rxe->mbuf; - next_sc_entry->fbuf = first_seg; - goto next_desc; --- -2.8.4 - diff --git a/0102-ixgbe-fix-constant-sign-in-left-shift-operator.patch b/0102-ixgbe-fix-constant-sign-in-left-shift-operator.patch deleted file mode 100644 index 9283c46..0000000 --- a/0102-ixgbe-fix-constant-sign-in-left-shift-operator.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d3ff9b833441c6983534e7eb8df14fbe700d5488 Mon Sep 17 00:00:00 2001 -From: Aaron Conole -Date: Tue, 22 Mar 2016 17:37:17 -0400 -Subject: [PATCH] ixgbe: fix constant sign in left shift operator - -Tell the compiler to use an unsigned constant for the config shifts. - -Signed-off-by: Aaron Conole -Acked-by: Panu Matilainen -Acked-by: Helin Zhang ---- - drivers/net/ixgbe/ixgbe_pf.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c -index a540343..a2787d9 100644 ---- a/drivers/net/ixgbe/ixgbe_pf.c -+++ b/drivers/net/ixgbe/ixgbe_pf.c -@@ -236,9 +236,9 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev) - vfre_slot = (vf_num >> VFRE_SHIFT) > 0 ? 1 : 0; - - /* Enable pools reserved to PF only */ -- IXGBE_WRITE_REG(hw, IXGBE_VFRE(vfre_slot), (~0) << vfre_offset); -+ IXGBE_WRITE_REG(hw, IXGBE_VFRE(vfre_slot), (~0U) << vfre_offset); - IXGBE_WRITE_REG(hw, IXGBE_VFRE(vfre_slot ^ 1), vfre_slot - 1); -- IXGBE_WRITE_REG(hw, IXGBE_VFTE(vfre_slot), (~0) << vfre_offset); -+ IXGBE_WRITE_REG(hw, IXGBE_VFTE(vfre_slot), (~0U) << vfre_offset); - IXGBE_WRITE_REG(hw, IXGBE_VFTE(vfre_slot ^ 1), vfre_slot - 1); - - /* PFDMA Tx General Switch Control Enables VMDQ loopback */ --- -2.8.4 - diff --git a/0103-e1000-base-Add-missing-braces-to-the-if-statements.patch b/0103-e1000-base-Add-missing-braces-to-the-if-statements.patch deleted file mode 100644 index 669a0df..0000000 --- a/0103-e1000-base-Add-missing-braces-to-the-if-statements.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 67f1325574e0acc45f277b5bcb88bb1653c32f37 Mon Sep 17 00:00:00 2001 -From: Markos Chandras -Date: Wed, 22 Jun 2016 23:32:29 +0100 -Subject: [PATCH] e1000/base: Add missing braces to the 'if' statements - -Add the missing braces to the 'if' statements to fix the misleading -identation. This also fixes the following build errors when building -with gcc >= 6: - -drivers/net/e1000/base/e1000_phy.c:4156:2: -error: this 'if' clause does not guard... [-Werror=misleading-indentation] -if (locked) -^~ - -drivers/net/e1000/base/e1000_phy.c:4158:3: -note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' -if (!ready) -^~ - -drivers/net/e1000/base/e1000_phy.c: In function 'e1000_write_phy_reg_mphy': -drivers/net/e1000/base/e1000_phy.c:4221:2: -error: this 'if' clause does not guard... [-Werror=misleading-indentation] -if (locked) -^~ - -drivers/net/e1000/base/e1000_phy.c:4223:3: -note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' -if (!ready) -^~ - -Signed-off-by: Markos Chandras ---- - drivers/net/e1000/base/e1000_phy.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c -index d43b7ce..33f478b 100644 ---- a/drivers/net/e1000/base/e1000_phy.c -+++ b/drivers/net/e1000/base/e1000_phy.c -@@ -4153,12 +4153,13 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 *data) - *data = E1000_READ_REG(hw, E1000_MPHY_DATA); - - /* Disable access to mPHY if it was originally disabled */ -- if (locked) -+ if (locked) { - ready = e1000_is_mphy_ready(hw); - if (!ready) - return -E1000_ERR_PHY; - E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, - E1000_MPHY_DIS_ACCESS); -+ } - - return E1000_SUCCESS; - } -@@ -4218,12 +4219,13 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 data, - E1000_WRITE_REG(hw, E1000_MPHY_DATA, data); - - /* Disable access to mPHY if it was originally disabled */ -- if (locked) -+ if (locked) { - ready = e1000_is_mphy_ready(hw); - if (!ready) - return -E1000_ERR_PHY; - E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, - E1000_MPHY_DIS_ACCESS); -+ } - - return E1000_SUCCESS; - } --- -2.8.4 - diff --git a/0104-igb-fix-constant-sign-in-left-shift-operator.patch b/0104-igb-fix-constant-sign-in-left-shift-operator.patch deleted file mode 100644 index 123c56c..0000000 --- a/0104-igb-fix-constant-sign-in-left-shift-operator.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d988d78fa2ea0ff0607d8cd089ed1d3ccddeed1c Mon Sep 17 00:00:00 2001 -From: Aaron Conole -Date: Tue, 22 Mar 2016 17:37:16 -0400 -Subject: [PATCH] igb: fix constant sign in left shift operator - -Tell the compiler to use an unsigned constant for the config shifts. - -Signed-off-by: Aaron Conole -Acked-by: Panu Matilainen -Acked-by: Helin Zhang ---- - drivers/net/e1000/igb_pf.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c -index 7f45a44..5845bc2 100644 ---- a/drivers/net/e1000/igb_pf.c -+++ b/drivers/net/e1000/igb_pf.c -@@ -172,8 +172,8 @@ int igb_pf_host_configure(struct rte_eth_dev *eth_dev) - E1000_WRITE_REG(hw, E1000_VT_CTL, vtctl); - - /* Enable pools reserved to PF only */ -- E1000_WRITE_REG(hw, E1000_VFRE, (~0) << vf_num); -- E1000_WRITE_REG(hw, E1000_VFTE, (~0) << vf_num); -+ E1000_WRITE_REG(hw, E1000_VFRE, (~0U) << vf_num); -+ E1000_WRITE_REG(hw, E1000_VFTE, (~0U) << vf_num); - - /* PFDMA Tx General Switch Control Enables VMDQ loopback */ - if (hw->mac.type == e1000_i350) --- -2.8.4 - diff --git a/0105-e1000-fix-missing-link-interrupt-check-brackets.patch b/0105-e1000-fix-missing-link-interrupt-check-brackets.patch deleted file mode 100644 index 6235ae0..0000000 --- a/0105-e1000-fix-missing-link-interrupt-check-brackets.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b3cadb2825422e37c35fdc78ea9497e4bdc95990 Mon Sep 17 00:00:00 2001 -From: Aaron Conole -Date: Tue, 22 Mar 2016 17:37:14 -0400 -Subject: [PATCH] e1000: fix missing link interrupt check brackets - -The device lsc interrupt check has a misleading whitespace around it which -can be improved by adding appropriate braces to the check. Since the ret -variable was checked after previous assignment, this introduces no functional -change. - -Fixes: 921a72008f76 ("e1000: add Rx interrupt handler") - -Signed-off-by: Aaron Conole -Acked-by: Panu Matilainen ---- - drivers/net/e1000/em_ethdev.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c -index 1f0a7f4..9b5e1af 100644 ---- a/drivers/net/e1000/em_ethdev.c -+++ b/drivers/net/e1000/em_ethdev.c -@@ -666,13 +666,14 @@ eth_em_start(struct rte_eth_dev *dev) - - if (rte_intr_allow_others(intr_handle)) { - /* check if lsc interrupt is enabled */ -- if (dev->data->dev_conf.intr_conf.lsc != 0) -+ if (dev->data->dev_conf.intr_conf.lsc != 0) { - ret = eth_em_interrupt_setup(dev); - if (ret) { - PMD_INIT_LOG(ERR, "Unable to setup interrupts"); - em_dev_clear_queues(dev); - return ret; - } -+ } - } else { - rte_intr_callback_unregister(intr_handle, - eth_em_interrupt_handler, --- -2.8.4 - diff --git a/0106-app-test-fix-missing-brackets.patch b/0106-app-test-fix-missing-brackets.patch deleted file mode 100644 index 85d633b..0000000 --- a/0106-app-test-fix-missing-brackets.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 29815f5a2331d361593ec62f3a54d154423a192d Mon Sep 17 00:00:00 2001 -From: Aaron Conole -Date: Tue, 22 Mar 2016 17:37:12 -0400 -Subject: [PATCH] app/test: fix missing brackets - -The test application calls printf(...) with the suite->suite_name argument. -The intent (based on whitespace) in the printf is to check suite->suite_name -first and then apply the printf. This doesn't happen due to missing brackets. - -Signed-off-by: Aaron Conole -Acked-by: Panu Matilainen ---- - app/test/test.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/app/test/test.c b/app/test/test.c -index f35b304..ccad0e3 100644 ---- a/app/test/test.c -+++ b/app/test/test.c -@@ -162,9 +162,10 @@ unit_test_suite_runner(struct unit_test_suite *suite) - int test_success; - unsigned total = 0, executed = 0, skipped = 0, succeeded = 0, failed = 0; - -- if (suite->suite_name) -+ if (suite->suite_name) { - printf(" + ------------------------------------------------------- +\n"); - printf(" + Test Suite : %s\n", suite->suite_name); -+ } - - if (suite->setup) - if (suite->setup() != 0) --- -2.8.4 - diff --git a/0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch b/0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch deleted file mode 100644 index cfc8813..0000000 --- a/0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch +++ /dev/null @@ -1,82 +0,0 @@ -From e04f6a64f158a2163fc47000b19d33d20a23e299 Mon Sep 17 00:00:00 2001 -From: Panu Matilainen -Date: Thu, 10 Mar 2016 15:49:55 +0200 -Subject: [PATCH] examples/ip_pipeline: use unsigned constants for left shift - operations - -Tell the compiler to use unsigned constants for left shift ops, -otherwise building with gcc >= 6.0 fails due to multiple warnings like: -warning: left shift of negative value [-Wshift-negative-value] - -Signed-off-by: Panu Matilainen -Acked-by: Cristian Dumitrescu ---- - examples/ip_pipeline/pipeline/pipeline_common_fe.c | 4 ++-- - examples/ip_pipeline/pipeline/pipeline_firewall.c | 4 ++-- - examples/ip_pipeline/pipeline/pipeline_routing.c | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/examples/ip_pipeline/pipeline/pipeline_common_fe.c b/examples/ip_pipeline/pipeline/pipeline_common_fe.c -index bffc9a4..a691d42 100644 ---- a/examples/ip_pipeline/pipeline/pipeline_common_fe.c -+++ b/examples/ip_pipeline/pipeline/pipeline_common_fe.c -@@ -337,7 +337,7 @@ app_link_config(struct app_params *app, - return -1; - } - -- netmask = (~0) << (32 - depth); -+ netmask = (~0U) << (32 - depth); - host = ip & netmask; - bcast = host | (~netmask); - -@@ -889,7 +889,7 @@ print_link_info(struct app_link_params *p) - { - struct rte_eth_stats stats; - struct ether_addr *mac_addr; -- uint32_t netmask = (~0) << (32 - p->depth); -+ uint32_t netmask = (~0U) << (32 - p->depth); - uint32_t host = p->ip & netmask; - uint32_t bcast = host | (~netmask); - -diff --git a/examples/ip_pipeline/pipeline/pipeline_firewall.c b/examples/ip_pipeline/pipeline/pipeline_firewall.c -index 3d7ea7a..320b25d 100644 ---- a/examples/ip_pipeline/pipeline/pipeline_firewall.c -+++ b/examples/ip_pipeline/pipeline/pipeline_firewall.c -@@ -256,10 +256,10 @@ app_pipeline_firewall_key_check_and_normalize(struct pipeline_firewall_key *key) - return -1; - - if (src_ip_depth) -- src_ip_netmask = (~0) << (32 - src_ip_depth); -+ src_ip_netmask = (~0U) << (32 - src_ip_depth); - - if (dst_ip_depth) -- dst_ip_netmask = ((~0) << (32 - dst_ip_depth)); -+ dst_ip_netmask = ((~0U) << (32 - dst_ip_depth)); - - key->key.ipv4_5tuple.src_ip &= src_ip_netmask; - key->key.ipv4_5tuple.dst_ip &= dst_ip_netmask; -diff --git a/examples/ip_pipeline/pipeline/pipeline_routing.c b/examples/ip_pipeline/pipeline/pipeline_routing.c -index 6354730..eab89f2 100644 ---- a/examples/ip_pipeline/pipeline/pipeline_routing.c -+++ b/examples/ip_pipeline/pipeline/pipeline_routing.c -@@ -319,7 +319,7 @@ app_pipeline_routing_add_route(struct app_params *app, - if ((depth == 0) || (depth > 32)) - return -1; - -- netmask = (~0) << (32 - depth); -+ netmask = (~0U) << (32 - depth); - key->key.ipv4.ip &= netmask; - - /* data */ -@@ -421,7 +421,7 @@ app_pipeline_routing_delete_route(struct app_params *app, - if ((depth == 0) || (depth > 32)) - return -1; - -- netmask = (~0) << (32 - depth); -+ netmask = (~0U) << (32 - depth); - key->key.ipv4.ip &= netmask; - } - break; --- -2.8.4 - diff --git a/dpdk-16.07.tar.gz b/dpdk-16.07.tar.gz new file mode 100644 index 0000000..dcc4c8d --- /dev/null +++ b/dpdk-16.07.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc982455a74357e465112bede5c29451b6eeb35f8c1c0dcea280dd3e7829f0e9 +size 16961844 diff --git a/dpdk-2.2.0.tar.xz b/dpdk-2.2.0.tar.xz deleted file mode 100644 index e744e71..0000000 --- a/dpdk-2.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:789167543539f9f89749feeac215f8400c28463426a81d136b637ec2ec62cff9 -size 10753636 diff --git a/dpdk.changes b/dpdk.changes index ec0717a..980f17a 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -1,3 +1,99 @@ +------------------------------------------------------------------- +Thu Oct 6 10:36:52 UTC 2016 - mchandras@suse.de + +- Drop code for generating our own linker script. + * Commit 948fd64befc3 (" mk: replace the combined library with a + linker script") added upstream support for building and installing + a linker script so we drop our code from the spec file which + generated a much larger and possibly broken linker script resulting + to linking issues (boo#1002534) + +------------------------------------------------------------------- +Wed Aug 10 16:51:17 CEST 2016 - ndas@suse.de + +- Update to version 16.07. Some of the new features are listed below: + + * Removed the mempool cache memory if caching is not being used. + * Added mempool external cache for non-EAL thread. + * Changed the memory allocation scheme in the mempool library. + * Added a new driver for Broadcom NetXtreme-C devices. + * Added a new driver for ThunderX nicvf devices. + * Added mailbox interrupt support for ixgbe and igb VFs. + * Updated the ixgbe base driver. + * Updated the i40e base driver. + * Updated the enic driver. + * Updated the mlx5 driver. + * Added support for virtio on IBM POWER8. + * Added support for Virtio in containers. + * Added vhost-user client mode. + * Added NSH packet recognition in i40e. + * Added AES-CTR support to AESNI MB PMD. + * Added AES counter mode support for Intel QuickAssist devices. + * Added KASUMI SW PMD. + * Added multi-writer support for RTE Hash with Intel TSX. + * Improved IP Pipeline Application. + * Added keepalive enhancements. + * Added packet capture framework. + * Added floating VEB support for i40e PF driver. + * Added support for live migration of a VM with SRIOV VF. + * [The list of changes is rather long so please consult the following + resources for the complete list of new features, bugfixes and other + changes in this release: + - http://dpdk.org/doc/guides/rel_notes/release_16_07.html + - http://dpdk.org/browse/dpdk/tree/doc/guides/rel_notes/release_16_07.rst + - Or the doc/guides/rel_notes/release_16_07.rst file in the released + tarball]a +- Removed patches that are already avilable in dpdk-16.07 + [ -0002-examples-ip_pipeline-fix-implicit-declaration-of-fun.patch + -0003-mk-fix-external-shared-library-dependencies-of-libraries.patch + -0004-54f9e32-vhost-handle-dirty-pages-logging-request.patch + -0005-d293dac-vhost-claim-support-of-guest-announce.patch + -0006-d639996-vhost-enable-log_shmfd-protocol-feature.patch + -0007-ixgbe-fix-VLAN-filter-missing-brackets.patch + -0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch + -0009-bonding-copy-entire-config-structure-in-mode-4.patch + -0010-bonding-fix-active-slaves-with-no-primary.patch + -0011-bonding-do-not-ignore-multicast-in-mode-4.patch + -0012-bonding-do-not-activate-slave-twice.patch + -0013-bonding-fix-crash-when-no-slave-device.patch + -0014-bonding-fix-detach-of-bonded-device.patch + -0015-bonding-fix-detach-of-slave-devices.patch + -0016-eal-linux-support-built-in-kernel-modules.patch + -0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch + -0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch + -0019-i40e-base-fix-driver-load-failure.patch + -0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch + -0021-i40e-fix-inverted-check-for-no-refcount.patch + -0022-i40e-fix-overflow.patch + -0023-i40e-fix-VLAN-filtering.patch + -0024-mempool-fix-leak-when-creation-fails.patch + -0025-pcap-fix-captured-frame-length.patch + -0026-port-fix-crash-for-ethdev-writer-nodrop.patch + -0027-port-fix-crash-for-ring-writer-nodrop.patch + -0028-tools-fix-unbinding-failure-handling.patch + -0029-tools-support-Python-3-in-bind-script.patch + -0030-tools-support-binding-to-built-in-kernel-modules.patch + -0031-vhost-fix-leak-of-fds-and-mmaps.patch + -0032-virtio-fix-crash-in-statistics-functions.patch + -0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch + -0034-virtio-fix-restart.patch + -0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi.patch + -0036-examples-fix-build-dependencies.patch + -0037-examples-ethtool-fix-build.patch + -0099-mk-fix-gcc-5-version-on-suse.patch + -0100-kni-fix-build-with-gcc-6.patch + -0101-ixgbe-fix-uninitialized-warning.patch + -0102-ixgbe-fix-constant-sign-in-left-shift-operator.patch + -0103-e1000-base-Add-missing-braces-to-the-if-statements.patch + -0104-igb-fix-constant-sign-in-left-shift-operator.patch + -0105-e1000-fix-missing-link-interrupt-check-brackets.patch + -0106-app-test-fix-missing-brackets.patch + -0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch + ] + +- Created soft link for dpdk_proc_info and dpdk_nic_bind(from dpdk-procinfo, dpdk-devbind) to keep compatibility. +- Added a new binary dpdk-pdump dpdk-procinfo + ------------------------------------------------------------------- Thu Jul 28 16:39:07 CEST 2016 - ndas@suse.de diff --git a/dpdk.spec b/dpdk.spec index 2e6a89b..d3c9f94 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -30,115 +30,31 @@ %define machine2 armv8a %define target arm64-%{machine2}-linuxapp-gcc %endif - %ifarch ppc64le %define machine2 power8 %define target ppc_64-%{machine2}-linuxapp-gcc %endif -%bcond_without examples %bcond_without shared +# Add option to build without examples +%bcond_without examples # Add option to build without tools %bcond_without tools Name: dpdk -Version: 2.2.0 +Version: 16.07 Release: 0 Summary: Set of libraries and drivers for fast packet processing License: BSD-3-Clause and GPL-2.0 and LGPL-2.1 Group: System/Libraries Url: http://dpdk.org -Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz +Source: http://dpdk.org/browse/dpdk/snapshot/dpdk-%{version}.tar.gz +# PATCH-FIX-OPENSUSE 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch +# This patch was originally taken from the fedora package but they have +# removed it since then because of +# http://osdir.com/ml/scm-fedora-commits/2016-03/msg00849.html +# However, the problem still exists and the fix has to find its way to the +# upstream code. Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch -Patch2: 0002-examples-ip_pipeline-fix-implicit-declaration-of-fun.patch -Patch3: 0003-mk-fix-external-shared-library-dependencies-of-libraries.patch -Patch4: 0004-54f9e32-vhost-handle-dirty-pages-logging-request.patch -Patch5: 0005-d293dac-vhost-claim-support-of-guest-announce.patch -Patch6: 0006-d639996-vhost-enable-log_shmfd-protocol-feature.patch -#PATCH-FIX-UPSTREAM 0007-ixgbe-fix-VLAN-filter-missing-brackets.patch -Patch7: 0007-ixgbe-fix-VLAN-filter-missing-brackets.patch -#PATCH-FIX-UPSTREAM 0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch -Patch8: 0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch -#PATCH-FIX-UPSTREAM 0009-bonding-copy-entire-config-structure-in-mode-4.patch -Patch9: 0009-bonding-copy-entire-config-structure-in-mode-4.patch -#PATCH-FIX-UPSTREAM 0010-bonding-fix-active-slaves-with-no-primary.patch -Patch10: 0010-bonding-fix-active-slaves-with-no-primary.patch -#PATCH-FIX-UPSTREAM 0011-bonding-do-not-ignore-multicast-in-mode-4.patch -Patch11: 0011-bonding-do-not-ignore-multicast-in-mode-4.patch -#PATCH-FIX-UPSTREAM 0012-bonding-do-not-activate-slave-twice.patch -Patch12: 0012-bonding-do-not-activate-slave-twice.patch -#PATCH-FIX-UPSTREAM 0013-bonding-fix-crash-when-no-slave-device.patch -Patch13: 0013-bonding-fix-crash-when-no-slave-device.patch -#PATCH-FIX-UPSTREAM 0014-bonding-fix-detach-of-bonded-device.patch -Patch14: 0014-bonding-fix-detach-of-bonded-device.patch -#PATCH-FIX-UPSTREAM 0015-bonding-fix-detach-of-slave-devices.patch -Patch15: 0015-bonding-fix-detach-of-slave-devices.patch -#PATCH-FIX-UPSTREAM 0016-eal-linux-support-built-in-kernel-modules.patch -Patch16: 0016-eal-linux-support-built-in-kernel-modules.patch -#PATCH-FIX-UPSTREAM 0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch -Patch17: 0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch -#PATCH-FIX-UPSTREAM 0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch -Patch18: 0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch -#PATCH-FIX-UPSTREAM 0019-i40e-base-fix-driver-load-failure.patch -Patch19: 0019-i40e-base-fix-driver-load-failure.patch -#PATCH-FIX-UPSTREAM 0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch -Patch20: 0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch -#PATCH-FIX-UPSTREAM 0021-i40e-fix-inverted-check-for-no-refcount.patch -Patch21: 0021-i40e-fix-inverted-check-for-no-refcount.patch -#PATCH-FIX-UPSTREAM 0022-i40e-fix-overflow.patch -Patch22: 0022-i40e-fix-overflow.patch -#PATCH-FIX-UPSTREAM 0023-i40e-fix-VLAN-filtering.patch -Patch23: 0023-i40e-fix-VLAN-filtering.patch -#PATCH-FIX-UPSTREAM 0024-mempool-fix-leak-when-creation-fails.patch -Patch24: 0024-mempool-fix-leak-when-creation-fails.patch -#PATCH-FIX-UPSTREAM 0025-pcap-fix-captured-frame-length.patch -Patch25: 0025-pcap-fix-captured-frame-length.patch -#PATCH-FIX-UPSTREAM 0026-port-fix-crash-for-ethdev-writer-nodrop.patch -Patch26: 0026-port-fix-crash-for-ethdev-writer-nodrop.patch -#PATCH-FIX-UPSTREAM 0027-port-fix-crash-for-ring-writer-nodrop.patch -Patch27: 0027-port-fix-crash-for-ring-writer-nodrop.patch -#PATCH-FIX-UPSTREAM 0028-tools-fix-unbinding-failure-handling.patch -Patch28: 0028-tools-fix-unbinding-failure-handling.patch -#PATCH-FIX-UPSTREAM 0029-tools-support-Python-3-in-bind-script.patch -Patch29: 0029-tools-support-Python-3-in-bind-script.patch -#PATCH-FIX-UPSTREAM 0030-tools-support-binding-to-built-in-kernel-modules.patch -Patch30: 0030-tools-support-binding-to-built-in-kernel-modules.patch -#PATCH-FIX-UPSTREAM 0031-vhost-fix-leak-of-fds-and-mmaps.patch -Patch31: 0031-vhost-fix-leak-of-fds-and-mmaps.patch -#PATCH-FIX-UPSTREAM 0032-virtio-fix-crash-in-statistics-functions.patch -Patch32: 0032-virtio-fix-crash-in-statistics-functions.patch -#PATCH-FIX-UPSTREAM 0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch -Patch33: 0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch -#PATCH-FIX-UPSTREAM 0034-virtio-fix-restart.patch -Patch34: 0034-virtio-fix-restart.patch -#PATCH-FIX-OPENSUSE 0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi -Patch35: 0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi.patch -#PATCH-FIX-UPSTREAM 0036-examples-fix-build-dependencies -Patch36: 0036-examples-fix-build-dependencies.patch -#PATCH-FIX-UPSTREAM 0037-examples-ethtool-fix-build -Patch37: 0037-examples-ethtool-fix-build.patch - -# -# Patches for build fixes -# -#PATCH-FIX-UPSTREAM: 0099-mk-fix-gcc-5-version-on-suse.patch -Patch99: 0099-mk-fix-gcc-5-version-on-suse.patch -#PATCH-FIX-UPSTREAM: 0100-kni-fix-build-with-gcc-6.patch -Patch100: 0100-kni-fix-build-with-gcc-6.patch -#PATCH-FIX-UPSTREAM: 0101-ixgbe-fix-uninitialized-warning.patch -Patch101: 0101-ixgbe-fix-uninitialized-warning.patch -#PATCH-FIX-UPSTREAM: 0102-ixgbe-fix-constant-sign-in-left-shift-operator.patch -Patch102: 0102-ixgbe-fix-constant-sign-in-left-shift-operator.patch -#PATCH-FIX-OPENSUSE: 0103-e1000-base-Add-missing-braces-to-the-if-statements.patch -#Not merged yet: http://dpdk.org/dev/patchwork/patch/14268/ -Patch103: 0103-e1000-base-Add-missing-braces-to-the-if-statements.patch -#PATCH-FIX-UPSTREAM: 0104-igb-fix-constant-sign-in-left-shift-operator.patch -Patch104: 0104-igb-fix-constant-sign-in-left-shift-operator.patch -#PATCH-FIX-UPSTREAM: 0105-e1000-fix-missing-link-interrupt-check-brackets.patch -Patch105: 0105-e1000-fix-missing-link-interrupt-check-brackets.patch -#PATCH-FIX-UPSTREAM: 0106-app-test-fix-missing-brackets.patch -Patch106: 0106-app-test-fix-missing-brackets.patch -#PATCH-FIX-UPSTREAM: 0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch -Patch107: 0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch BuildRequires: doxygen BuildRequires: fdupes BuildRequires: libnuma-devel @@ -200,53 +116,6 @@ as L2 and L3 forwarding. %prep %setup -q %patch1 -p1 -z .enic -%patch2 -p1 -z .examples -%patch3 -p1 -z .dtneeded -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 -%patch35 -p1 -%patch36 -p1 -%patch37 -p1 - -# Build fixes -%patch99 -p1 -z .rtetoolchain -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch104 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 %build # set up a method for modifying the resulting .config file @@ -320,6 +189,8 @@ rm -rf %{buildroot}%{sdkdir}/tools rm -rf %{buildroot}%{_sbindir}/dpdk_nic_bind %endif rm -f %{buildroot}%{sdkdir}/tools/setup.sh +#TODO pip elftools has issues to fix +rm -rf %{buildroot}%{_bindir}/dpdk-pmdinfo %if %{with examples} find %{target}/examples/ -name "*.map" | xargs rm -f @@ -357,36 +228,15 @@ EOF # Fixup target machine mismatch sed -i -e 's:-%{machine}-:-%{machine2}-:g' %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk* -# Upstream has an option to build a combined library but it's bloatware which -# wont work at all when library versions start moving, replace it with a -# linker script which avoids these issues. Linking against the script during -# build resolves into links to the actual used libraries which is just fine -# for us, so this combined library is a build-time only construct now. -%if %{with shared} -libext=so -%else -libext=a -%endif -comblib=libdpdk.${libext} - -echo "GROUP (" > ${comblib} -find %{buildroot}/%{_libdir}/ -name "*.${libext}" |\ - sed -e "s:^%{buildroot}/: :g" >> ${comblib} -echo ")" >> ${comblib} -install -m 644 ${comblib} %{buildroot}/%{_libdir}/${comblib} #doc mkdir %{buildroot}%{_docdir}/ mv %{buildroot}%{_datadir}/doc/dpdk %{buildroot}%{_docdir}/ -# Remove unwanted binaries "-f" so if the file -# doesn't exist --> don't complain! -rm -f %{buildroot}%{_bindir}/cmdline_test -rm -f %{buildroot}%{_bindir}/test -rm -f %{buildroot}%{_bindir}/testpipeline -rm -f %{buildroot}%{_bindir}/testacl -rm -f %{buildroot}%{_bindir}/*.map +ln -s %{_bindir}/dpdk-procinfo %{buildroot}%{_bindir}/dpdk_proc_info +ln -s %{_sbindir}/dpdk-devbind %{buildroot}%{_sbindir}/dpdk_nic_bind + # Remove duplicates -%fdupes %{buildroot}/%{_prefix} +%fdupes %{buildroot}/%{_prefix} %post devel -p /sbin/ldconfig %postun devel -p /sbin/ldconfig @@ -397,7 +247,9 @@ rm -f %{buildroot}%{_bindir}/*.map %defattr(-,root,root) # BSD %{_bindir}/testpmd +%{_bindir}/dpdk-procinfo %{_bindir}/dpdk_proc_info +%{_bindir}/dpdk-pdump %if %{with shared} %dir %{_libdir}/dpdk-pmds @@ -410,7 +262,7 @@ rm -f %{buildroot}%{_bindir}/*.map %defattr(-,root,root) #BSD %docdir -%doc LICENSE.GPL LICENSE.LGPL +%doc LICENSE.GPL LICENSE.LGPL %files devel %defattr(-,root,root) @@ -420,11 +272,9 @@ rm -f %{buildroot}%{_bindir}/*.map %if %{with tools} %exclude %{sdkdir}/tools/ %endif - %if %{with examples} %exclude %{sdkdir}/examples/ %endif - %{_sysconfdir}/profile.d/dpdk-sdk-*.* %if ! %{with shared} %{_libdir}/*.a @@ -436,6 +286,7 @@ rm -f %{buildroot}%{_bindir}/*.map %files tools %defattr(-,root,root) %{sdkdir}/tools/ +%{_sbindir}/dpdk-devbind %{_sbindir}/dpdk_nic_bind %endif