All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 00/22] upgrade with 6WIND's enhancements
@ 2013-03-20 16:04 Thomas Monjalon
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Here are some patches which were not integrated by Intel in their 1.2.3 version.

---

Adrien Mazarguil (3):
  lib: fix non-C99 macros definitions in exported headers
  pci: reference driver structure for each device
  pci: allow drivers to be bound several times to the same PCI device

Damien Millescamps (3):
  app: fix config crash in testpmd
  timer: option --vmware-tsc-map for VMware guest
  igb_uio: fix driver dependency

Didier Pallard (2):
  mk: fix verbose display of install command
  mk: add a makefile for shared libraries

Ivan Boule (3):
  app: fix volatile read for GCC >= 4.6
  app: fix testpmd compliance with __rte_mbuf_sanity_check()
  timer: check TSC reliability

Nicolas Dichtel (1):
  igb_uio: fix build with kernel >= 3.8

Olivier Matz (1):
  app: use (void)variable when unused

Samuel Gauthier (1):
  mk: use $CC to detect toolchain version

Thierry Herbelot (1):
  mk: fix typo in LDFLAGS for 32-bit

Thomas Monjalon (3):
  app: fix autotest summary in error cases
  mem: fix access to huge page with high address
  timer: get TSC frequency from /proc/cpuinfo

Zijie Pan (4):
  mk: allow corei7-avx flag with gcc 4.7
  app: fix unused values
  lib: fix unused values
  lib: fix uninitialized variables

 app/test-pmd/config.c                              |   21 ++--
 app/test-pmd/testpmd.c                             |    1 +
 app/test-pmd/txonly.c                              |    1 +
 app/test/autotest.py                               |    7 +-
 app/test/test.c                                    |    1 -
 app/test/test_hash.c                               |    6 +-
 app/test/test_lpm.c                                |    4 +-
 app/test/test_memory.c                             |    4 +-
 app/test/test_ring.c                               |    4 +-
 config/defconfig_i686-default-linuxapp-gcc         |    5 +
 config/defconfig_i686-default-linuxapp-icc         |    5 +
 config/defconfig_x86_64-default-linuxapp-gcc       |    5 +
 config/defconfig_x86_64-default-linuxapp-icc       |    5 +
 lib/librte_cmdline/cmdline_cirbuf.h                |    5 +-
 lib/librte_cmdline/cmdline_parse_ipaddr.c          |    1 -
 lib/librte_eal/common/eal_common_pci.c             |   17 ++-
 lib/librte_eal/common/include/rte_cycles.h         |   19 +++
 lib/librte_eal/common/include/rte_debug.h          |    3 +-
 lib/librte_eal/common/include/rte_log.h            |   15 +-
 lib/librte_eal/common/include/rte_pci.h            |    5 +
 lib/librte_eal/linuxapp/eal/eal.c                  |   23 +++
 lib/librte_eal/linuxapp/eal/eal_hpet.c             |   84 +++++++++++-
 lib/librte_eal/linuxapp/eal/eal_memory.c           |    3 +-
 lib/librte_eal/linuxapp/eal/eal_pci.c              |   23 +++-
 lib/librte_eal/linuxapp/eal/eal_thread.c           |    2 -
 .../linuxapp/eal/include/eal_internal_cfg.h        |    1 +
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c          |    4 +
 lib/librte_lpm/rte_lpm.c                           |    2 +-
 lib/librte_pmd_igb/e1000_rxtx.c                    |    6 +-
 lib/librte_pmd_igb/igb/e1000_vf.c                  |    3 +-
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c                |    4 +
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c                  |    2 +-
 mk/arch/i686/rte.vars.mk                           |    2 +-
 mk/internal/rte.install-post.mk                    |    2 +-
 mk/{arch/i686/rte.vars.mk => rte.extshared.mk}     |   93 ++++++-------
 mk/rte.shared.mk                                   |  141 ++++++++++++++++++++
 mk/toolchain/gcc/rte.toolchain-compat.mk           |    6 +-
 37 files changed, 417 insertions(+), 118 deletions(-)
 copy mk/{arch/i686/rte.vars.mk => rte.extshared.mk} (55%)
 create mode 100644 mk/rte.shared.mk

-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 01/22] mk: use $CC to detect toolchain version
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 02/22] mk: fix typo in LDFLAGS for 32-bit Thomas Monjalon
                     ` (21 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Samuel Gauthier <samuel.gauthier-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Using gcc is wrong, we should use the cross gcc to detect the
version of gcc.

Acked-by: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Samuel Gauthier <samuel.gauthier-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 mk/toolchain/gcc/rte.toolchain-compat.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 4e65122..2e05ecb 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -40,7 +40,7 @@
 
 #find out GCC version
 
-GCC_MAJOR_VERSION = $(shell gcc -dumpversion | cut -f1 -d.)
+GCC_MAJOR_VERSION = $(shell $(CC) -dumpversion | cut -f1 -d.)
 
 # if GCC is not 4.x
 ifneq ($(GCC_MAJOR_VERSION),4)
@@ -49,7 +49,7 @@ $(warning You are not using GCC 4.x. This is neither supported, nor tested.)
 
 
 else
-	GCC_MINOR_VERSION = $(shell gcc -dumpversion | cut -f2 -d.)
+	GCC_MINOR_VERSION = $(shell $(CC) -dumpversion | cut -f2 -d.)
 
 # GCC graceful degradation
 # GCC 4.2.x - added support for generic target
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 02/22] mk: fix typo in LDFLAGS for 32-bit
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 01/22] mk: use $CC to detect toolchain version Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 03/22] mk: fix verbose display of install command Thomas Monjalon
                     ` (20 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Thierry Herbelot <thierry.herbelot-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Enable compilation for 32-bit architecture.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Thierry Herbelot <thierry.herbelot-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 mk/arch/i686/rte.vars.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mk/arch/i686/rte.vars.mk b/mk/arch/i686/rte.vars.mk
index 6f8e474..d6a3fe4 100644
--- a/mk/arch/i686/rte.vars.mk
+++ b/mk/arch/i686/rte.vars.mk
@@ -53,7 +53,7 @@ ARCH  ?= i386
 CROSS ?=
 
 CPU_CFLAGS  ?= -m32
-CPU_LDFLAGS ?= -m elf_i386
+CPU_LDFLAGS ?= -melf_i386
 CPU_ASFLAGS ?= -felf
 
 export ARCH CROSS CPU_CFLAGS CPU_LDFLAGS CPU_ASFLAGS
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 03/22] mk: fix verbose display of install command
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 01/22] mk: use $CC to detect toolchain version Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 02/22] mk: fix typo in LDFLAGS for 32-bit Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 04/22] mk: add a makefile for shared libraries Thomas Monjalon
                     ` (19 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Didier Pallard <didier.pallard-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Correctly display executed install command in
  rte.install-post.mk install rules

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Didier Pallard <didier.pallard-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 mk/internal/rte.install-post.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mk/internal/rte.install-post.mk b/mk/internal/rte.install-post.mk
index 1e84a10..29a8606 100644
--- a/mk/internal/rte.install-post.mk
+++ b/mk/internal/rte.install-post.mk
@@ -43,7 +43,7 @@ define install_rule
 $(addprefix $(RTE_OUTPUT)/$(1)/,$(notdir $(2))): $(2)
 	@echo "  INSTALL-FILE $(addprefix $(1)/,$(notdir $(2)))"
 	@[ -d $(RTE_OUTPUT)/$(1) ] || mkdir -p $(RTE_OUTPUT)/$(1)
-	@cp -rf $$(<) $(RTE_OUTPUT)/$(1)
+	$(Q)cp -rf $$(<) $(RTE_OUTPUT)/$(1)
 endef
 
 $(foreach dir,$(INSTALL-DIRS-y),\
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 04/22] mk: add a makefile for shared libraries
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (2 preceding siblings ...)
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 03/22] mk: fix verbose display of install command Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 05/22] mk: allow corei7-avx flag with gcc 4.7 Thomas Monjalon
                     ` (18 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Didier Pallard <didier.pallard-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Add mk/rte.shared.mk and mk/rte.extshared.mk in framework to
   allow shared libraries compilation through framework

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Didier Pallard <didier.pallard-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 mk/rte.extshared.mk |   54 +++++++++++++++++++
 mk/rte.shared.mk    |  141 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 195 insertions(+), 0 deletions(-)
 create mode 100644 mk/rte.extshared.mk
 create mode 100644 mk/rte.shared.mk

diff --git a/mk/rte.extshared.mk b/mk/rte.extshared.mk
new file mode 100644
index 0000000..f240fd8
--- /dev/null
+++ b/mk/rte.extshared.mk
@@ -0,0 +1,54 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2012-2013 6WIND.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of 6WIND S.A. nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+MAKEFLAGS += --no-print-directory
+
+# we must create the output dir first and recall the same Makefile
+# from this directory
+ifeq ($(NOT_FIRST_CALL),)
+
+NOT_FIRST_CALL = 1
+export NOT_FIRST_CALL
+
+all:
+	$(Q)mkdir -p $(RTE_OUTPUT)
+	$(Q)$(MAKE) -C $(RTE_OUTPUT) -f $(RTE_EXTMK) \
+		S=$(RTE_SRCDIR) O=$(RTE_OUTPUT) SRCDIR=$(RTE_SRCDIR)
+	@echo $(RTE_OUTPUT)/lib must be added to /etc/ld.so.conf or \
+		LD_LIBRARY_PATH variable to allow binary to link with dynamic library
+
+%::
+	$(Q)mkdir -p $(RTE_OUTPUT)
+	$(Q)$(MAKE) -C $(RTE_OUTPUT) -f $(RTE_EXTMK) $@ \
+		S=$(RTE_SRCDIR) O=$(RTE_OUTPUT) SRCDIR=$(RTE_SRCDIR)
+else
+include $(RTE_SDK)/mk/rte.shared.mk
+endif
diff --git a/mk/rte.shared.mk b/mk/rte.shared.mk
new file mode 100644
index 0000000..43f8625
--- /dev/null
+++ b/mk/rte.shared.mk
@@ -0,0 +1,141 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2012-2013 6WIND.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of 6WIND S.A. nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+include $(RTE_SDK)/mk/internal/rte.compile-pre.mk
+include $(RTE_SDK)/mk/internal/rte.install-pre.mk
+include $(RTE_SDK)/mk/internal/rte.clean-pre.mk
+include $(RTE_SDK)/mk/internal/rte.build-pre.mk
+include $(RTE_SDK)/mk/internal/rte.depdirs-pre.mk
+
+# VPATH contains at least SRCDIR
+VPATH += $(SRCDIR)
+
+_BUILD = $(SHARED)
+_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(SHARED)
+_CLEAN = doclean
+
+# Set fPIC in CFLAGS for .so generation
+CFLAGS += -fPIC
+
+.PHONY: all
+all: install
+
+.PHONY: install
+install: build _postinstall
+
+_postinstall: build
+
+.PHONY: build
+build: _postbuild
+
+exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
+
+ifeq ($(LINK_USING_CC),1)
+comma := ,
+LDLIBS := $(addprefix -Wl$(comma),$(LDLIBS))
+LDFLAGS := $(addprefix -Wl$(comma),$(LDFLAGS))
+EXTRA_LDFLAGS := $(addprefix -Wl$(comma),$(EXTRA_LDFLAGS))
+O_TO_SO = $(CC) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
+	-shared -o $@ $(OBJS-y) $(LDLIBS)
+else
+O_TO_SO = $(LD) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
+	-shared -o $@ $(OBJS-y) $(LDLIBS)
+endif
+
+O_TO_SO_STR = $(subst ','\'',$(O_TO_SO)) #'# fix syntax highlight
+O_TO_SO_DISP = $(if $(V),"$(O_TO_SO_STR)","  LD $(@)")
+O_TO_SO_CMD = "cmd_$@ = $(O_TO_SO_STR)"
+O_TO_SO_DO = @set -e; \
+	echo $(O_TO_SO_DISP); \
+	$(O_TO_SO) && \
+	echo $(O_TO_SO_CMD) > $(call exe2cmd,$(@))
+
+-include .$(SHARED).cmd
+
+# path where libraries are retrieved
+LDLIBS_PATH := $(subst -Wl$(comma)-L,,$(filter -Wl$(comma)-L%,$(LDLIBS)))
+LDLIBS_PATH += $(subst -L,,$(filter -L%,$(LDLIBS)))
+
+# list of .a files that are linked to this application
+LDLIBS_NAMES := $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS)))
+LDLIBS_NAMES += $(patsubst -Wl$(comma)-l%,lib%.a,$(filter -Wl$(comma)-l%,$(LDLIBS)))
+
+# list of found libraries files (useful for deps). If not found, the
+# library is silently ignored and dep won't be checked
+LDLIBS_FILES := $(wildcard $(foreach dir,$(LDLIBS_PATH),\
+	$(addprefix $(dir)/,$(LDLIBS_NAMES))))
+
+#
+# Archive objects in .so file if needed
+#
+$(SHARED): $(OBJS-y) $(LDLIBS_FILES) $(DEP_$(SHARED)) FORCE
+	@[ -d $(dir $@) ] || mkdir -p $(dir $@)
+	$(if $(D),\
+		@echo -n "$< -> $@ " ; \
+		echo -n "file_missing=$(call boolean,$(file_missing)) " ; \
+		echo -n "cmdline_changed=$(call boolean,$(call cmdline_changed,$(O_TO_SO_STR))) " ; \
+		echo -n "depfile_missing=$(call boolean,$(depfile_missing)) " ; \
+		echo "depfile_newer=$(call boolean,$(depfile_newer)) ")
+	$(if $(or \
+		$(file_missing),\
+		$(call cmdline_changed,$(O_TO_SO_STR)),\
+		$(depfile_missing),\
+		$(depfile_newer)),\
+		$(O_TO_SO_DO))
+
+#
+# install lib in $(RTE_OUTPUT)/lib
+#
+$(RTE_OUTPUT)/lib/$(SHARED): $(SHARED)
+	@echo "  INSTALL-SHARED $(SHARED)"
+	@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
+	$(Q)cp -f $(SHARED) $(RTE_OUTPUT)/lib
+
+#
+# Clean all generated files
+#
+.PHONY: clean
+clean: _postclean
+
+.PHONY: doclean
+doclean:
+	$(Q)rm -rf $(SHARED) $(OBJS-all) $(DEPS-all) $(DEPSTMP-all) \
+	  $(CMDS-all) $(INSTALL-FILES-all)
+	$(Q)rm -f $(_BUILD_TARGETS) $(_INSTALL_TARGETS) $(_CLEAN_TARGETS)
+
+include $(RTE_SDK)/mk/internal/rte.compile-post.mk
+include $(RTE_SDK)/mk/internal/rte.install-post.mk
+include $(RTE_SDK)/mk/internal/rte.clean-post.mk
+include $(RTE_SDK)/mk/internal/rte.build-post.mk
+include $(RTE_SDK)/mk/internal/rte.depdirs-post.mk
+
+.PHONY: FORCE
+FORCE:
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 05/22] mk: allow corei7-avx flag with gcc 4.7
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (3 preceding siblings ...)
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 04/22] mk: add a makefile for shared libraries Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 06/22] app: fix volatile read for GCC >= 4.6 Thomas Monjalon
                     ` (17 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Zijie Pan <zijie.pan-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

In rte.toolchain-compat.mk, ensure MACHINE_CFLAGS is initialized when
using GCC 4.7. Update the GCC 4.6 test to also include GCC 4.7.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Krzysztof Witek <krzysztof.witek-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Zijie Pan <zijie.pan-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 mk/toolchain/gcc/rte.toolchain-compat.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 2e05ecb..137659d 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -59,7 +59,7 @@ else
 # GCC 4.6.x - added support for corei7, corei7-avx
 # GCC 4.7.x - added support for fsgsbase, rdrnd, f16c, core-avx-i, core-avx2
 
-	ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 7 && echo 1), 1)
+	ifeq ($(shell test $(GCC_MINOR_VERSION) -le 7 && echo 1), 1)
 		MACHINE_CFLAGS := $(patsubst -march=core-avx-i,-march=corei7-avx,$(MACHINE_CFLAGS))
 		MACHINE_CFLAGS := $(patsubst -march=core-avx2,-march=corei7-avx,$(MACHINE_CFLAGS))
 	endif
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 06/22] app: fix volatile read for GCC >= 4.6
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (4 preceding siblings ...)
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 05/22] mk: allow corei7-avx flag with gcc 4.7 Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 07/22] app: fix unused values Thomas Monjalon
                     ` (16 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

When a memory address must be read, for instance a [mapped] PCI register,
the read value is assigned to a local variable that is not used after,
as for instance:
    x = *((uint8_t *) mem_addr);

Such instructions do not compile with gcc 4.6.
The fix consists in adding the "volatile" attribute to the accessed data type
and to not assign the read value:
    *((volatile uint8_t *) mem_addr);

Acked-by: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 app/test/test_memory.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index 8a25eca..96d35d9 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -61,7 +61,6 @@ test_memory(void)
 	uint64_t s;
 	unsigned i, j;
 	const struct rte_memseg *mem;
-	volatile uint8_t x;
 
 	/*
 	 * dump the mapped memory: the python-expect script checks
@@ -83,8 +82,7 @@ test_memory(void)
 
 		/* check memory */
 		for (j = 0; j<mem[i].len; j++) {
-			x = *((uint8_t *) mem[i].addr + j);
-			RTE_SET_USED(x);
+			*((volatile uint8_t *) mem[i].addr + j);
 		}
 	}
 
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 07/22] app: fix unused values
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (5 preceding siblings ...)
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 06/22] app: fix volatile read for GCC >= 4.6 Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 08/22] app: use (void)variable when unused Thomas Monjalon
                     ` (15 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Zijie Pan <zijie.pan-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Fix warnings of type "Value stored to 'xxx' is never read".

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Zijie Pan <zijie.pan-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 app/test-pmd/config.c |    1 -
 app/test/test.c       |    1 -
 app/test/test_lpm.c   |    4 +---
 app/test/test_ring.c  |    4 +---
 4 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index fd62235..10cf699 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -520,7 +520,6 @@ setup_fwd_config_of_each_lcore(struct fwd_config *cfg)
 		nb_fs_per_lcore = (streamid_t) (nb_fs / nb_fc);
 		nb_extra = (lcoreid_t) (nb_fs % nb_fc);
 	}
-	nb_extra = (lcoreid_t) (nb_fs % nb_fc);
 
 	nb_lc = (lcoreid_t) (nb_fc - nb_extra);
 	sm_id = 0;
diff --git a/app/test/test.c b/app/test/test.c
index f98656c..ef978cf 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -132,7 +132,6 @@ main(int argc, char **argv)
 
 	rte_timer_subsystem_init();
 
-	argc -= ret;
 	argv += ret;
 
 	prgname = argv[0];
diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
index 3a9400f..5b8118a 100644
--- a/app/test/test_lpm.c
+++ b/app/test/test_lpm.c
@@ -752,7 +752,6 @@ test10(void)
 
 	ip = IPv4(128, 0, 0, 0);
 	depth = 24;
-	next_hop_add = 100;
 
 	status = rte_lpm_delete(lpm, ip, depth);
 	TEST_LPM_ASSERT(status < 0);
@@ -766,7 +765,6 @@ test10(void)
 
 	ip = IPv4(128, 0, 0, 0);
 	depth = 32;
-	next_hop_add = 100;
 
 	status = rte_lpm_delete(lpm, ip, depth);
 	TEST_LPM_ASSERT(status < 0);
@@ -976,7 +974,7 @@ test14(void)
 	next_hop_add = 100;
 
 	/* Add 256 rules that require a tbl8 extension */
-	for (ip = 0; ip <= IPv4(0, 0, 255, 0); ip += 256) {
+	for (; ip <= IPv4(0, 0, 255, 0); ip += 256) {
 		status = rte_lpm_add(lpm, ip, depth, next_hop_add);
 		TEST_LPM_ASSERT(status == 0);
 
diff --git a/app/test/test_ring.c b/app/test/test_ring.c
index d6bb44b..39f69b0 100644
--- a/app/test/test_ring.c
+++ b/app/test/test_ring.c
@@ -518,7 +518,7 @@ test_set_watermark( void ){
 	}
 
 	count = 0;
-	setwm = rte_ring_set_water_mark(r, count);
+	rte_ring_set_water_mark(r, count);
 	if (r->prod.watermark != r->prod.size) {
 		printf("Test failed to detect invalid watermark count value\n");
 		goto error;
@@ -759,8 +759,6 @@ test_ring_basic(void)
 		printf("data after dequeue is not the same\n");
 		goto fail;
 	}
-	cur_src = src;
-	cur_dst = dst;
 
 	if (src)
 		free(src);
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 08/22] app: use (void)variable when unused
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (6 preceding siblings ...)
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 07/22] app: fix unused values Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 09/22] app: fix testpmd compliance with __rte_mbuf_sanity_check() Thomas Monjalon
                     ` (14 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

When compiling with llvm-clang, the notation "variable = variable"
produces a warning. We shall use "(void)variable" instead.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 app/test/test_hash.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 5992fa3..528baba 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -1604,7 +1604,7 @@ test_hash_jhash_1word(const void *key, uint32_t length, uint32_t initval)
 {
 	const uint32_t *k = key;
 
-	length =length;
+	(void)length;
 
 	return rte_jhash_1word(k[0], initval);
 }
@@ -1614,7 +1614,7 @@ test_hash_jhash_2word(const void *key, uint32_t length, uint32_t initval)
 {
 	const uint32_t *k = key;
 
-	length =length;
+	(void)length;
 
 	return rte_jhash_2words(k[0], k[1], initval);
 }
@@ -1624,7 +1624,7 @@ test_hash_jhash_3word(const void *key, uint32_t length, uint32_t initval)
 {
 	const uint32_t *k = key;
 
-	length =length;
+	(void)length;
 
 	return rte_jhash_3words(k[0], k[1], k[2], initval);
 }
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 09/22] app: fix testpmd compliance with __rte_mbuf_sanity_check()
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (7 preceding siblings ...)
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 08/22] app: use (void)variable when unused Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 10/22] app: fix config crash in testpmd Thomas Monjalon
                     ` (13 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Build mbuf and lists of mbufs in a way compliant with the checks performed
by the function __rte_mbuf_sanity_check() when CONFIG_RTE_LIBRTE_MBUF_DEBUG=y

Acked-by: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 app/test-pmd/testpmd.c |    1 +
 app/test-pmd/txonly.c  |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 6813b66..d67b662 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -323,6 +323,7 @@ testpmd_mbuf_ctor(struct rte_mempool *mp,
 	mb_ctor_arg = (struct mbuf_ctor_arg *) opaque_arg;
 	mb = (struct rte_mbuf *) raw_mbuf;
 
+	mb->type         = RTE_MBUF_PKT;
 	mb->pool         = mp;
 	mb->buf_addr     = (void *) ((char *)mb + mb_ctor_arg->seg_buf_offset);
 	mb->buf_physaddr = (uint64_t) (rte_mempool_virt2phy(mp, mb) +
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index bf0a3e2..d7c8c31 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -235,6 +235,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
 		for (i = 1; i < tx_pkt_nb_segs; i++) {
 			pkt_seg->pkt.next = tx_mbuf_alloc(mbp);
 			if (pkt_seg->pkt.next == NULL) {
+				pkt->pkt.nb_segs = i;
 				rte_pktmbuf_free(pkt);
 				goto nomore_mbuf;
 			}
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 10/22] app: fix config crash in testpmd
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (8 preceding siblings ...)
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 09/22] app: fix testpmd compliance with __rte_mbuf_sanity_check() Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 11/22] app: fix autotest summary in error cases Thomas Monjalon
                     ` (12 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

A chained topology must always have an increment of 1.
Here, it was 2 if ports number is even.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 app/test-pmd/config.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 10cf699..708ebad 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2,6 +2,7 @@
  *   BSD LICENSE
  * 
  *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2012-2013 6WIND.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -547,17 +548,14 @@ simple_fwd_config_setup(void)
 	portid_t j;
 	portid_t inc = 2;
 
-	if (nb_fwd_ports % 2) {
-		if (port_topology == PORT_TOPOLOGY_CHAINED) {
-			inc = 1;
-		}
-		else {
-			printf("\nWarning! Cannot handle an odd number of ports "
-			       "with the current port topology. Configuration "
-			       "must be changed to have an even number of ports, "
-			       "or relaunch application with "
-			       "--port-topology=chained\n\n");
-		}
+	if (port_topology == PORT_TOPOLOGY_CHAINED) {
+		inc = 1;
+	} else if (nb_fwd_ports % 2) {
+		printf("\nWarning! Cannot handle an odd number of ports "
+		       "with the current port topology. Configuration "
+		       "must be changed to have an even number of ports, "
+		       "or relaunch application with "
+		       "--port-topology=chained\n\n");
 	}
 
 	cur_fwd_config.nb_fwd_ports = (portid_t) nb_fwd_ports;
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 11/22] app: fix autotest summary in error cases
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (9 preceding siblings ...)
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 10/22] app: fix config crash in testpmd Thomas Monjalon
@ 2013-03-20 16:04   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 12/22] lib: fix unused values Thomas Monjalon
                     ` (11 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:04 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

It was reporting "All test OK" even if previous tests (except the last
one) were failed.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 app/test/autotest.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/test/autotest.py b/app/test/autotest.py
index 2609142..6613897 100755
--- a/app/test/autotest.py
+++ b/app/test/autotest.py
@@ -143,6 +143,7 @@ class AutoTest:
             self.report_list.append(report)
 
     def gen_report(self):
+        fails = 0
         for report in self.report_list:
             # main report header and stats
             self.literal = 0
@@ -186,15 +187,17 @@ class AutoTest:
                     reportlog.write(s)
 
             reportlog.close()
+            if report["fails"] > 0:
+                fails += 1
 
         # displayed on console
         print
         print "-------------------------"
         print
-        if report["fails"] == 0:
+        if fails == 0:
             print "All test OK"
         else:
-            print "%s test(s) failed"%(report["fails"])
+            print "%s test(s) failed" % fails
 
     # file API, to store logs from pexpect
     def write(self, buf):
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 12/22] lib: fix unused values
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (10 preceding siblings ...)
  2013-03-20 16:04   ` [dpdk-dev] [PATCH 11/22] app: fix autotest summary in error cases Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 13/22] lib: fix uninitialized variables Thomas Monjalon
                     ` (10 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Zijie Pan <zijie.pan-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Fix warnings of type "Value stored to 'xxx' is never read".

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Zijie Pan <zijie.pan-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_cmdline/cmdline_parse_ipaddr.c |    1 -
 lib/librte_eal/linuxapp/eal/eal_thread.c  |    2 --
 lib/librte_lpm/rte_lpm.c                  |    2 +-
 lib/librte_pmd_igb/e1000_rxtx.c           |    2 --
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c       |    4 ++++
 5 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.c b/lib/librte_cmdline/cmdline_parse_ipaddr.c
index 66a1493..a7dcd2b 100644
--- a/lib/librte_cmdline/cmdline_parse_ipaddr.c
+++ b/lib/librte_cmdline/cmdline_parse_ipaddr.c
@@ -262,7 +262,6 @@ inet_pton6(const char *src, unsigned char *dst)
 		    inet_pton4(curtok, tp) > 0) {
 			tp += INADDRSZ;
 			saw_xdigit = 0;
-			count_xdigit = 0;
 			break;  /* '\0' was seen by inet_pton4(). */
 		}
 		return (0);
diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c
index 7409d28..d36030e 100644
--- a/lib/librte_eal/linuxapp/eal/eal_thread.c
+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c
@@ -86,7 +86,6 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)
 		rte_panic("cannot write on configuration pipe\n");
 
 	/* wait ack */
-	n = 0;
 	do {
 		n = read(s2m, &c, 1);
 	} while (n < 0 && errno == EINTR);
@@ -203,7 +202,6 @@ eal_thread_loop(__attribute__((unused)) void *arg)
 		void *fct_arg;
 
 		/* wait command */
-		n = 0;
 		do {
 			n = read(m2s, &c, 1);
 		} while (n < 0 && errno == EINTR);
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 4269b3c..bb1ec48 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -276,7 +276,7 @@ rule_add(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth,
 	last_rule = rule_gindex + lpm->used_rules_at_depth[depth - 1];
 
 	/* Scan through rule group to see if rule already exists. */
-	for (rule_index = rule_gindex; rule_index < last_rule; rule_index++) {
+	for (; rule_index < last_rule; rule_index++) {
 
 		/* If rule already exists update its next_hop and return. */
 		if (lpm->rules_tbl[rule_index].ip == ip_masked) {
diff --git a/lib/librte_pmd_igb/e1000_rxtx.c b/lib/librte_pmd_igb/e1000_rxtx.c
index a891d12..96b0682 100644
--- a/lib/librte_pmd_igb/e1000_rxtx.c
+++ b/lib/librte_pmd_igb/e1000_rxtx.c
@@ -1247,8 +1247,6 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev,
 	txq->tx_ring_phys_addr = (uint64_t) tz->phys_addr;
 	txq->tx_ring = (union e1000_adv_tx_desc *) tz->addr;
 
-	size = sizeof(union e1000_adv_tx_desc) * nb_desc;
-
 	/* Allocate software ring */
 	txq->sw_ring = rte_zmalloc("txq->sw_ring",
 				   sizeof(struct igb_tx_entry) * nb_desc,
diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
index f3b3cda..6f41fbe 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
@@ -507,6 +507,10 @@ eth_ixgbevf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,
 
 	hw->mac.num_rar_entries = hw->mac.max_rx_queues;
 	diag = hw->mac.ops.reset_hw(hw);
+	if (diag != IXGBE_SUCCESS) {
+		PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", diag);
+		return (diag);
+	}
 
 	/* Allocate memory for storing MAC addresses */
 	eth_dev->data->mac_addrs = rte_zmalloc("ixgbevf", ETHER_ADDR_LEN *
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 13/22] lib: fix uninitialized variables
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (11 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 12/22] lib: fix unused values Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 14/22] lib: fix non-C99 macros definitions in exported headers Thomas Monjalon
                     ` (9 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Zijie Pan <zijie.pan-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Fix compilation errors caused by uninitialized variables.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Krzysztof Witek <krzysztof.witek-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Zijie Pan <zijie.pan-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_pmd_igb/e1000_rxtx.c   |    4 ++--
 lib/librte_pmd_igb/igb/e1000_vf.c |    3 ++-
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/librte_pmd_igb/e1000_rxtx.c b/lib/librte_pmd_igb/e1000_rxtx.c
index 96b0682..ef2b88b 100644
--- a/lib/librte_pmd_igb/e1000_rxtx.c
+++ b/lib/librte_pmd_igb/e1000_rxtx.c
@@ -330,8 +330,8 @@ eth_igb_xmit_pkts(struct igb_tx_queue *txq, struct rte_mbuf **tx_pkts,
 	uint16_t tx_last;
 	uint16_t nb_tx;
 	uint16_t tx_ol_req;
-	uint32_t new_ctx;
-	uint32_t ctx;
+	uint32_t new_ctx = 0;
+	uint32_t ctx = 0;
 	uint32_t vlan_macip_lens;
 
 	sw_ring = txq->sw_ring;
diff --git a/lib/librte_pmd_igb/igb/e1000_vf.c b/lib/librte_pmd_igb/igb/e1000_vf.c
index 8b81e4b..5d71210 100644
--- a/lib/librte_pmd_igb/igb/e1000_vf.c
+++ b/lib/librte_pmd_igb/igb/e1000_vf.c
@@ -405,12 +405,13 @@ void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
 
 	DEBUGOUT1("MC Addr Count = %d\n", mc_addr_count);
 
+	msgbuf[0] = E1000_VF_SET_MULTICAST;
+
 	if (mc_addr_count > 30) {
 		msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW;
 		mc_addr_count = 30;
 	}
 
-	msgbuf[0] = E1000_VF_SET_MULTICAST;
 	msgbuf[0] |= mc_addr_count << E1000_VT_MSGINFO_SHIFT;
 
 	for (i = 0; i < mc_addr_count; i++) {
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index aa698a3..47922c9 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -399,7 +399,7 @@ ixgbe_xmit_pkts(struct igb_tx_queue *txq, struct rte_mbuf **tx_pkts,
 	uint16_t nb_used;
 	uint16_t tx_ol_req;
 	uint32_t vlan_macip_lens;
-	uint32_t ctx;
+	uint32_t ctx = 0;
 	uint32_t new_ctx;
 
 	sw_ring = txq->sw_ring;
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 14/22] lib: fix non-C99 macros definitions in exported headers
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (12 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 13/22] lib: fix uninitialized variables Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 15/22] mem: fix access to huge page with high address Thomas Monjalon
                     ` (8 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

The original definitions prevent external programs/libraries from compiling
without warnings when using these headers and -std=gnu99 (relaxed C99 mode).

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_cmdline/cmdline_cirbuf.h       |    5 +++--
 lib/librte_eal/common/include/rte_debug.h |    3 ++-
 lib/librte_eal/common/include/rte_log.h   |   15 +++++++--------
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/lib/librte_cmdline/cmdline_cirbuf.h b/lib/librte_cmdline/cmdline_cirbuf.h
index f934292..36b04ec 100644
--- a/lib/librte_cmdline/cmdline_cirbuf.h
+++ b/lib/librte_cmdline/cmdline_cirbuf.h
@@ -81,9 +81,10 @@ struct cirbuf {
 /* #define CIRBUF_DEBUG */
 
 #ifdef CIRBUF_DEBUG
-#define dprintf(fmt, ...) printf("line %3.3d - " fmt, __LINE__, ##__VA_ARGS__)
+#define dprintf_(fmt, ...) printf("line %3.3d - " fmt "%.0s", __LINE__, __VA_ARGS__)
+#define dprintf(...) dprintf_(__VA_ARGS__, "dummy")
 #else
-#define dprintf(args...) do {} while(0)
+#define dprintf(...) (void)0
 #endif
 
 
diff --git a/lib/librte_eal/common/include/rte_debug.h b/lib/librte_eal/common/include/rte_debug.h
index 451220e..1936dde 100644
--- a/lib/librte_eal/common/include/rte_debug.h
+++ b/lib/librte_eal/common/include/rte_debug.h
@@ -77,7 +77,8 @@ void rte_dump_registers(void);
  * @param args
  *   The variable list of arguments.
  */
-#define rte_panic(format, args...) __rte_panic(__func__, format, ## args)
+#define rte_panic_(func, format, ...) __rte_panic(func, format "%.0s", __VA_ARGS__)
+#define rte_panic(...) rte_panic_(__func__, __VA_ARGS__, "dummy")
 
 /*
  * Provide notification of a critical non-recoverable error and stop.
diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h
index d361130..9a17730 100644
--- a/lib/librte_eal/common/include/rte_log.h
+++ b/lib/librte_eal/common/include/rte_log.h
@@ -274,14 +274,13 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap);
  *   - 0: Success.
  *   - Negative on error.
  */
-#define RTE_LOG(l, t, fmt, args...) ({					\
-	if ((RTE_LOG_##l <= RTE_LOG_LEVEL) &&				\
-	    (RTE_LOG_##l <= rte_logs.level) &&				\
-	    (RTE_LOGTYPE_##t & rte_logs.type)) {			\
-		rte_log(RTE_LOG_##l, RTE_LOGTYPE_##t,			\
-			  #t ": " fmt, ## args);			\
-	}								\
-})
+#define RTE_LOG(l, t, ...)					\
+	(((RTE_LOG_ ## l <= RTE_LOG_LEVEL) &&			\
+	  (RTE_LOG_ ## l <= rte_logs.level) &&			\
+	  (RTE_LOGTYPE_ ## t & rte_logs.type)) ?		\
+	 rte_log(RTE_LOG_ ## l,					\
+		 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) :	\
+	 0)
 
 #ifdef __cplusplus
 }
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 15/22] mem: fix access to huge page with high address
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (13 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 14/22] lib: fix non-C99 macros definitions in exported headers Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 16/22] timer: check TSC reliability Thomas Monjalon
                     ` (7 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

The returned value of lseek is a virtual address
which can be different from the offset.
Indeed, if the return address has a 64-bit canonical form,
the 16 higher bits are all 1 if bit 47 is 1.

So the check was wrong. It is better to test against an error value.

Acked-by: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index a47dab4..30a955f 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -2,6 +2,7 @@
  *   BSD LICENSE
  * 
  *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2012-2013 6WIND.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -292,7 +293,7 @@ find_physaddr(struct hugepage *hugepg_tbl, struct hugepage_info *hpi)
 		virt_pfn = (unsigned long)hugepg_tbl[i].orig_va /
 			page_size;
 		offset = sizeof(uint64_t) * virt_pfn;
-		if (lseek(fd, offset, SEEK_SET) != offset){
+		if (lseek(fd, offset, SEEK_SET) == (off_t) -1) {
 			RTE_LOG(ERR, EAL, "%s(): seek error in /proc/self/pagemap: %s",
 					__func__, strerror(errno));
 			close(fd);
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 16/22] timer: check TSC reliability
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (14 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 15/22] mem: fix access to huge page with high address Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 17/22] timer: get TSC frequency from /proc/cpuinfo Thomas Monjalon
                     ` (6 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Read flags from /proc/cpuinfo and warn if constant_tsc or nonstop_tsc is
not found.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_eal/linuxapp/eal/eal_hpet.c |   37 ++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_hpet.c b/lib/librte_eal/linuxapp/eal/eal_hpet.c
index aa686b1..de05151 100644
--- a/lib/librte_eal/linuxapp/eal/eal_hpet.c
+++ b/lib/librte_eal/linuxapp/eal/eal_hpet.c
@@ -2,6 +2,7 @@
  *   BSD LICENSE
  * 
  *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2012-2013 6WIND.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -140,6 +141,41 @@ set_rdtsc_freq(void)
 			((1.0 / eal_hpet_resolution_hz) / 1e-15);
 }
 
+static void
+check_tsc_flags(void)
+{
+	char line[512];
+	FILE *stream;
+
+	stream = fopen("/proc/cpuinfo", "r");
+	if (!stream) {
+		RTE_LOG(WARNING, EAL, "WARNING: Unable to open /proc/cpuinfo\n");
+		return;
+	}
+
+	while (fgets(line, sizeof line, stream)) {
+		char *constant_tsc;
+		char *nonstop_tsc;
+
+		if (strncmp(line, "flags", 5) != 0)
+			continue;
+
+		constant_tsc = strstr(line, "constant_tsc");
+		nonstop_tsc = strstr(line, "nonstop_tsc");
+		if (!constant_tsc || !nonstop_tsc)
+			RTE_LOG(WARNING, EAL,
+				"WARNING: cpu flags "
+				"constant_tsc=%s "
+				"nonstop_tsc=%s "
+				"-> using unreliable clock cycles !\n",
+				constant_tsc ? "yes":"no",
+				nonstop_tsc ? "yes":"no");
+		break;
+	}
+
+	fclose(stream);
+}
+
 /*
  * Open and mmap /dev/hpet (high precision event timer) that will
  * provide our time reference.
@@ -192,6 +228,7 @@ rte_eal_hpet_init(void)
 use_rdtsc:
 	internal_config.no_hpet = 1;
 	set_rdtsc_freq();
+	check_tsc_flags();
 	return 0;
 }
 
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 17/22] timer: get TSC frequency from /proc/cpuinfo
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (15 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 16/22] timer: check TSC reliability Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 18/22] timer: option --vmware-tsc-map for VMware guest Thomas Monjalon
                     ` (5 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Frequency was guessed by sleeping 1 sec.
Now, read frequency from cpuinfo first.
Keep sleep method as fallback.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_eal/linuxapp/eal/eal_hpet.c |   47 ++++++++++++++++++++++++++++---
 1 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_hpet.c b/lib/librte_eal/linuxapp/eal/eal_hpet.c
index de05151..d41e857 100644
--- a/lib/librte_eal/linuxapp/eal/eal_hpet.c
+++ b/lib/librte_eal/linuxapp/eal/eal_hpet.c
@@ -129,14 +129,51 @@ hpet_msb_inc(__attribute__((unused)) void *arg)
 	}
 }
 
-static inline void
-set_rdtsc_freq(void)
+static uint64_t
+get_tsc_freq_from_cpuinfo(void)
 {
-	uint64_t start;
+	char line[256];
+	FILE *stream;
+	double dmhz;
+	uint64_t freq = 0;
+
+	stream = fopen("/proc/cpuinfo", "r");
+	if (!stream) {
+		RTE_LOG(WARNING, EAL, "WARNING: Unable to open /proc/cpuinfo\n");
+		return 0;
+	}
+
+	while (fgets(line, sizeof line, stream)) {
+		if (sscanf(line, "cpu MHz\t: %lf", &dmhz) == 1) {
+			freq = (uint64_t)(dmhz * 1000000UL);
+			break;
+		}
+	}
+
+	fclose(stream);
+	return freq;
+}
 
-	start = rte_rdtsc();
+static uint64_t
+get_tsc_freq_from_sleep(void)
+{
+	uint64_t start = rte_rdtsc();
 	sleep(1);
-	eal_hpet_resolution_hz = rte_rdtsc() - start;
+	return rte_rdtsc() - start;
+}
+
+static inline void
+set_rdtsc_freq(void)
+{
+	uint64_t freq;
+	freq = get_tsc_freq_from_cpuinfo();
+	if (!freq) {
+		RTE_LOG(WARNING, EAL, "WARNING: Cannot read CPU clock\n");
+		freq = get_tsc_freq_from_sleep();
+	}
+	RTE_LOG(INFO, EAL, "TSC clock @ %lu MHz\n",
+		(unsigned long) (freq / (1000000UL)));
+	eal_hpet_resolution_hz = freq;
 	eal_hpet_resolution_fs = (uint32_t)
 			((1.0 / eal_hpet_resolution_hz) / 1e-15);
 }
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 18/22] timer: option --vmware-tsc-map for VMware guest
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (16 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 17/22] timer: get TSC frequency from /proc/cpuinfo Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 19/22] pci: reference driver structure for each device Thomas Monjalon
                     ` (4 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

The VMware TSC mapping uses a hook to RDPMC to read the physical TSC
in the case of VMware ESXi.

Introduce new option --vmware-tsc-map, ignored if
CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT is not set.

Default is CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y.

if CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT is set:
	rte_rdtsc() selects at runtime between Vmware mapping of
	TSC or native TSC
else
	rte_rdtsc() always uses native rdtsc.

When running DPDK on VMware guest, enable --vmware-tsc-map to
read the physical TSC.
Caution: ESXi should pass monitor_control.pseudo_perfctr = TRUE
otherwise it results in general protection fault.

Acked-by: Vincent Jardin <vincent.jardin-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 config/defconfig_i686-default-linuxapp-gcc         |    5 ++++
 config/defconfig_i686-default-linuxapp-icc         |    5 ++++
 config/defconfig_x86_64-default-linuxapp-gcc       |    5 ++++
 config/defconfig_x86_64-default-linuxapp-icc       |    5 ++++
 lib/librte_eal/common/include/rte_cycles.h         |   19 ++++++++++++++++
 lib/librte_eal/linuxapp/eal/eal.c                  |   23 ++++++++++++++++++++
 .../linuxapp/eal/include/eal_internal_cfg.h        |    1 +
 7 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/config/defconfig_i686-default-linuxapp-gcc b/config/defconfig_i686-default-linuxapp-gcc
index ed54434..e64bb86 100644
--- a/config/defconfig_i686-default-linuxapp-gcc
+++ b/config/defconfig_i686-default-linuxapp-gcc
@@ -121,6 +121,11 @@ CONFIG_RTE_LIBRTE_EAL_LINUXAPP=y
 CONFIG_RTE_LIBRTE_EAL_BAREMETAL=n
 
 #
+# Compile Environment Abstraction Layer to support VMware TSC map
+#
+CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y
+
+#
 # Compile generic ethernet library
 #
 CONFIG_RTE_LIBRTE_ETHER=y
diff --git a/config/defconfig_i686-default-linuxapp-icc b/config/defconfig_i686-default-linuxapp-icc
index cb0d017..3f15a53 100644
--- a/config/defconfig_i686-default-linuxapp-icc
+++ b/config/defconfig_i686-default-linuxapp-icc
@@ -121,6 +121,11 @@ CONFIG_RTE_LIBRTE_EAL_LINUXAPP=y
 CONFIG_RTE_LIBRTE_EAL_BAREMETAL=n
 
 #
+# Compile Environment Abstraction Layer to support VMware TSC map
+#
+CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y
+
+#
 # Compile generic ethernet library
 #
 CONFIG_RTE_LIBRTE_ETHER=y
diff --git a/config/defconfig_x86_64-default-linuxapp-gcc b/config/defconfig_x86_64-default-linuxapp-gcc
index 3555187..f5213d5 100644
--- a/config/defconfig_x86_64-default-linuxapp-gcc
+++ b/config/defconfig_x86_64-default-linuxapp-gcc
@@ -121,6 +121,11 @@ CONFIG_RTE_LIBRTE_EAL_LINUXAPP=y
 CONFIG_RTE_LIBRTE_EAL_BAREMETAL=n
 
 #
+# Compile Environment Abstraction Layer to support VMware TSC map
+#
+CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y
+
+#
 # Compile generic ethernet library
 #
 CONFIG_RTE_LIBRTE_ETHER=y
diff --git a/config/defconfig_x86_64-default-linuxapp-icc b/config/defconfig_x86_64-default-linuxapp-icc
index f527f53..f28943a 100644
--- a/config/defconfig_x86_64-default-linuxapp-icc
+++ b/config/defconfig_x86_64-default-linuxapp-icc
@@ -121,6 +121,11 @@ CONFIG_RTE_LIBRTE_EAL_LINUXAPP=y
 CONFIG_RTE_LIBRTE_EAL_BAREMETAL=n
 
 #
+# Compile Environment Abstraction Layer to support VMware TSC map
+#
+CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y
+
+#
 # Compile generic ethernet library
 #
 CONFIG_RTE_LIBRTE_ETHER=y
diff --git a/lib/librte_eal/common/include/rte_cycles.h b/lib/librte_eal/common/include/rte_cycles.h
index a1eca6c..fa0b408 100644
--- a/lib/librte_eal/common/include/rte_cycles.h
+++ b/lib/librte_eal/common/include/rte_cycles.h
@@ -2,6 +2,7 @@
  *   BSD LICENSE
  * 
  *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2012-2013 6WIND.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -48,6 +49,13 @@ extern "C" {
 
 #include <stdint.h>
 
+#ifdef RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT
+/** Global switch to use VMware mapping of TSC instead of RDTSC */
+extern int rte_cycles_vmware_tsc_map;
+#include <rte_branch_prediction.h>
+#endif
+
+
 /**
  * Read the TSC register.
  *
@@ -65,9 +73,20 @@ rte_rdtsc(void)
 		};
 	} tsc;
 
+#ifdef RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT
+	if (unlikely(rte_cycles_vmware_tsc_map)) {
+		/* ecx = 0x10000 corresponds to the Physical TSC for VMware */
+		asm volatile("rdpmc" :
+		             "=a" (tsc.lo_32),
+		             "=d" (tsc.hi_32) :
+		             "c"(0x10000));
+		return tsc.tsc_64;
+	}
+#endif
 	asm volatile("rdtsc" :
 		     "=a" (tsc.lo_32),
 		     "=d" (tsc.hi_32));
+
 	return tsc.tsc_64;
 }
 
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 8d82cc3..a63881c 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -78,6 +78,7 @@
 #define OPT_PROC_TYPE   "proc-type"
 #define OPT_NO_SHCONF   "no-shconf"
 #define OPT_NO_HPET     "no-hpet"
+#define OPT_VMWARE_TSC_MAP   "vmware-tsc-map"
 #define OPT_NO_PCI      "no-pci"
 #define OPT_NO_HUGE     "no-huge"
 #define OPT_FILE_PREFIX "file-prefix"
@@ -125,6 +126,9 @@ struct lcore_config lcore_config[RTE_MAX_LCORE];
 /* internal configuration */
 struct internal_config internal_config;
 
+/* used by rte_rdtsc() */
+int rte_cycles_vmware_tsc_map;
+
 /* Return a pointer to the configuration structure */
 struct rte_config *
 rte_eal_get_configuration(void)
@@ -264,6 +268,7 @@ eal_usage(const char *prgname)
 	       "  --"OPT_HUGE_DIR" : directory where hugetlbfs is mounted\n"
 	       "  --"OPT_PROC_TYPE": type of this process\n"
 	       "  --"OPT_FILE_PREFIX": prefix for hugepage filenames\n"
+	       "  --"OPT_VMWARE_TSC_MAP"  : use VMware TSC map instead of native RDTSC\n\n"
 	       "\nEAL options for DEBUG use only:\n"
 	       "  --"OPT_NO_HUGE"  : use malloc instead of hugetlbfs\n"
 	       "  --"OPT_NO_PCI"   : disable pci\n"
@@ -379,6 +384,7 @@ eal_parse_args(int argc, char **argv)
 		{OPT_NO_HUGE, 0, 0, 0},
 		{OPT_NO_PCI, 0, 0, 0},
 		{OPT_NO_HPET, 0, 0, 0},
+		{OPT_VMWARE_TSC_MAP, 0, 0, 0},
 		{OPT_HUGE_DIR, 1, 0, 0},
 		{OPT_NO_SHCONF, 0, 0, 0},
 		{OPT_PROC_TYPE, 1, 0, 0},
@@ -399,6 +405,8 @@ eal_parse_args(int argc, char **argv)
 	internal_config.no_hpet = 1;
 #endif
 
+	internal_config.vmware_tsc_map = 0;
+
 	while ((opt = getopt_long(argc, argvopt, "b:c:m:n:r:v",
 				  lgopts, &option_index)) != EOF) {
 
@@ -464,6 +472,9 @@ eal_parse_args(int argc, char **argv)
 			else if (!strcmp(lgopts[option_index].name, OPT_NO_HPET)) {
 				internal_config.no_hpet = 1;
 			}
+			else if (!strcmp(lgopts[option_index].name, OPT_VMWARE_TSC_MAP)) {
+				internal_config.vmware_tsc_map = 1;
+			}
 			else if (!strcmp(lgopts[option_index].name, OPT_NO_SHCONF)) {
 				internal_config.no_shconf = 1;
 			}
@@ -547,6 +558,18 @@ rte_eal_init(int argc, char **argv)
 			internal_config.memory = eal_get_hugepage_mem_size();
 	}
 
+	if (internal_config.vmware_tsc_map == 1) {
+#ifdef RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT
+		rte_cycles_vmware_tsc_map = 1;
+		RTE_LOG (DEBUG, EAL, "Using VMware TSC map, "
+				"you must have monitor_control.pseudo_perfctr = TRUE\n");
+#else
+		RTE_LOG (WARNING, EAL, "Ignoring --vmware-tsc-map because "
+				"RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT is not set\n");
+#endif
+	} else {
+		RTE_LOG (DEBUG, EAL, "Using native RDTSC\n");
+	}
 	rte_srand(rte_rdtsc());
 	rte_config_init();
 
diff --git a/lib/librte_eal/linuxapp/eal/include/eal_internal_cfg.h b/lib/librte_eal/linuxapp/eal/include/eal_internal_cfg.h
index 70d5afb..470b746 100644
--- a/lib/librte_eal/linuxapp/eal/include/eal_internal_cfg.h
+++ b/lib/librte_eal/linuxapp/eal/include/eal_internal_cfg.h
@@ -63,6 +63,7 @@ struct internal_config {
 	volatile unsigned no_hugetlbfs;   /* true to disable hugetlbfs */
 	volatile unsigned no_pci;         /* true to disable PCI */
 	volatile unsigned no_hpet;        /* true to disable HPET */
+	volatile unsigned vmware_tsc_map; /* true to use VMware TSC mapping instead of native TSC */
 	volatile unsigned no_shconf;      /* true if there is no shared config */
 	volatile enum rte_proc_type_t process_type; /* multi-process proc type */
 	const char *hugefile_prefix;      /* the base filename of hugetlbfs files */
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 19/22] pci: reference driver structure for each device
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (17 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 18/22] timer: option --vmware-tsc-map for VMware guest Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 20/22] pci: allow drivers to be bound several times to the same PCI device Thomas Monjalon
                     ` (3 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Add a driver reference (if available) to every PCI devices,
even when blacklisted. This information is made available in the global
device_list variable so users know which network devices are managed or
ignored.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_eal/common/eal_common_pci.c  |    3 +--
 lib/librte_eal/common/include/rte_pci.h |    2 ++
 lib/librte_eal/linuxapp/eal/eal_pci.c   |   11 ++++++++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index fe24265..73d8fb3 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -81,9 +81,8 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
 {
 	struct rte_pci_driver *dr = NULL;
 
+	dev->blacklisted = !!is_blacklisted(dev);
 	TAILQ_FOREACH(dr, &driver_list, next) {
-		if (is_blacklisted(dev))
-			return -1;
 		if (rte_eal_pci_probe_one_driver(dr, dev) == 0)
 			return 0;
 	}
diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index f2128b5..b465995 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -111,6 +111,8 @@ struct rte_pci_device {
 	struct rte_pci_id id;                   /**< PCI ID. */
 	struct rte_pci_resource mem_resource;   /**< PCI Memory Resource */
 	struct rte_intr_handle intr_handle;     /**< Interrupt handle */
+	const struct rte_pci_driver *driver;    /**< Associated driver */
+	unsigned int blacklisted:1;             /**< Device is blacklisted */
 };
 
 /** Any PCI device identifier (vendor, device, ...) */
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 78687d6..86002bd 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -731,7 +731,8 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d
 		dev->id.vendor_id, dev->id.device_id, dr->name);
 
 		/* Unbind PCI devices if needed */
-		if (module_name != NULL) {
+		if ((!dev->blacklisted) &&
+		    (module_name != NULL)) {
 			if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 			/* unbind current driver, bind ours */
 				if (pci_unbind_kernel_driver(dev) < 0)
@@ -743,6 +744,14 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d
 			if (pci_uio_map_resource(dev) < 0)
 				return -1;
 		}
+
+		/* reference driver structure */
+		dev->driver = dr;
+
+		/* no initialization when blacklisted */
+		if (dev->blacklisted)
+			return -1;
+
 		/* call the driver devinit() function */
 		return dr->devinit(dr, dev);
 
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 20/22] pci: allow drivers to be bound several times to the same PCI device
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (18 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 19/22] pci: reference driver structure for each device Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 21/22] igb_uio: fix driver dependency Thomas Monjalon
                     ` (2 subsequent siblings)
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Drivers with the flag RTE_PCI_DRV_MULTIPLE enabled will be bound several
times to the same device until they return an error.

These drivers must internally keep track of each device state in order for
this to work reliably.

This flag is currently required for Ethernet adapters with several physical
ports but a single address on the PCI bus.

It is currently used by librte_pmd_mlx4 that we are developping.

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_eal/common/eal_common_pci.c  |   14 ++++++++++++--
 lib/librte_eal/common/include/rte_pci.h |    3 +++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 73d8fb3..3a6ab70 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -2,6 +2,7 @@
  *   BSD LICENSE
  * 
  *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2013 6WIND.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -75,6 +76,10 @@ static int is_blacklisted(struct rte_pci_device *dev)
  * If vendor/device ID match, call the devinit() function of all
  * registered driver for the given device. Return -1 if no driver is
  * found for this device.
+ * For drivers with the RTE_PCI_DRV_MULTIPLE flag enabled, register
+ * the same device multiple times until failure to do so.
+ * It is required for non-Intel NIC drivers provided by third-parties such
+ * as 6WIND.
  */
 static int
 pci_probe_all_drivers(struct rte_pci_device *dev)
@@ -83,8 +88,13 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
 
 	dev->blacklisted = !!is_blacklisted(dev);
 	TAILQ_FOREACH(dr, &driver_list, next) {
-		if (rte_eal_pci_probe_one_driver(dr, dev) == 0)
-			return 0;
+		if (rte_eal_pci_probe_one_driver(dr, dev))
+			continue;
+		/* initialize subsequent driver instances for this device */
+		if (dr->drv_flags & RTE_PCI_DRV_MULTIPLE)
+			while (rte_eal_pci_probe_one_driver(dr, dev) == 0)
+				;
+		return 0;
 	}
 	return -1;
 }
diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index b465995..1007f51 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -2,6 +2,7 @@
  *   BSD LICENSE
  * 
  *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2013 6WIND.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -154,6 +155,8 @@ struct rte_pci_driver {
 
 /**< Device needs igb_uio kernel module */
 #define RTE_PCI_DRV_NEED_IGB_UIO 0x0001
+/**< Device driver must be registered several times until failure */
+#define RTE_PCI_DRV_MULTIPLE 0x0002
 
 /**
  * Probe the PCI bus for registered drivers.
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 21/22] igb_uio: fix driver dependency
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (19 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 20/22] pci: allow drivers to be bound several times to the same PCI device Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 22/22] igb_uio: fix build with kernel >= 3.8 Thomas Monjalon
  2013-03-20 16:58   ` [dpdk-dev] [PATCH 00/22] upgrade with 6WIND's enhancements Vincent JARDIN
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

Allow to run without igb_uio if probed devices don't require it.

The condition for exiting with an error is:
 - Tested driver is needed by a probed device
 AND
 - Tested driver needs igb_uio

Acked-by: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Damien Millescamps <damien.millescamps-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_eal/linuxapp/eal/eal_pci.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 86002bd..882fd6f 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -701,15 +701,12 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d
 {
 	struct rte_pci_id *id_table;
 	const char *module_name = NULL;
-	int ret;
+	int uio_status = -1;
 
 	if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO)
 		module_name = IGB_UIO_NAME;
 
-	ret = pci_uio_check_module(module_name);
-	if (ret != 0)
-		rte_exit(1, "The %s module is required by the %s driver\n",
-				module_name, dr->name);
+	uio_status = pci_uio_check_module(module_name);
 
 	for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {
 
@@ -730,6 +727,11 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d
 		RTE_LOG(DEBUG, EAL, "probe driver: %x:%x %s\n",
 		dev->id.vendor_id, dev->id.device_id, dr->name);
 
+		if ((!dev->blacklisted) && (uio_status != 0)) {
+			rte_exit(1, "The %s module is required by the %s driver\n",
+					module_name, dr->name);
+		}
+
 		/* Unbind PCI devices if needed */
 		if ((!dev->blacklisted) &&
 		    (module_name != NULL)) {
-- 
1.7.2.5

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

* [dpdk-dev] [PATCH 22/22] igb_uio: fix build with kernel >= 3.8
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (20 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 21/22] igb_uio: fix driver dependency Thomas Monjalon
@ 2013-03-20 16:05   ` Thomas Monjalon
  2013-03-20 16:58   ` [dpdk-dev] [PATCH 00/22] upgrade with 6WIND's enhancements Vincent JARDIN
  22 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-20 16:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Nicolas Dichtel <nicolas.dichtel-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

__devinit has been removed in linux commit 54b956b903
("Remove __dev* markings from init.h", 3.8-rc4).

Acked-by: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Acked-by: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index 51733f6..4e54c46 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -255,7 +255,11 @@ igbuio_pci_release_iomem(struct uio_info *info)
 	}
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
 static int __devinit
+#else
+static int
+#endif
 igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	struct rte_uio_pci_dev *udev;
-- 
1.7.2.5

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

* Re: [dpdk-dev] [PATCH 00/22] upgrade with 6WIND's enhancements
       [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
                     ` (21 preceding siblings ...)
  2013-03-20 16:05   ` [dpdk-dev] [PATCH 22/22] igb_uio: fix build with kernel >= 3.8 Thomas Monjalon
@ 2013-03-20 16:58   ` Vincent JARDIN
       [not found]     ` <5149EAD1.8070801-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  22 siblings, 1 reply; 25+ messages in thread
From: Vincent JARDIN @ 2013-03-20 16:58 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

All can be applied.

On 20/03/2013 17:04, Thomas Monjalon wrote:
> Here are some patches which were not integrated by Intel in their 1.2.3 version.
>
> ---
>
> Adrien Mazarguil (3):
>    lib: fix non-C99 macros definitions in exported headers
>    pci: reference driver structure for each device
>    pci: allow drivers to be bound several times to the same PCI device
>
> Damien Millescamps (3):
>    app: fix config crash in testpmd
>    timer: option --vmware-tsc-map for VMware guest
>    igb_uio: fix driver dependency
>
> Didier Pallard (2):
>    mk: fix verbose display of install command
>    mk: add a makefile for shared libraries
>
> Ivan Boule (3):
>    app: fix volatile read for GCC >= 4.6
>    app: fix testpmd compliance with __rte_mbuf_sanity_check()
>    timer: check TSC reliability
>
> Nicolas Dichtel (1):
>    igb_uio: fix build with kernel >= 3.8
>
> Olivier Matz (1):
>    app: use (void)variable when unused
>
> Samuel Gauthier (1):
>    mk: use $CC to detect toolchain version
>
> Thierry Herbelot (1):
>    mk: fix typo in LDFLAGS for 32-bit
>
> Thomas Monjalon (3):
>    app: fix autotest summary in error cases
>    mem: fix access to huge page with high address
>    timer: get TSC frequency from /proc/cpuinfo
>
> Zijie Pan (4):
>    mk: allow corei7-avx flag with gcc 4.7
>    app: fix unused values
>    lib: fix unused values
>    lib: fix uninitialized variables
>
>   app/test-pmd/config.c                              |   21 ++--
>   app/test-pmd/testpmd.c                             |    1 +
>   app/test-pmd/txonly.c                              |    1 +
>   app/test/autotest.py                               |    7 +-
>   app/test/test.c                                    |    1 -
>   app/test/test_hash.c                               |    6 +-
>   app/test/test_lpm.c                                |    4 +-
>   app/test/test_memory.c                             |    4 +-
>   app/test/test_ring.c                               |    4 +-
>   config/defconfig_i686-default-linuxapp-gcc         |    5 +
>   config/defconfig_i686-default-linuxapp-icc         |    5 +
>   config/defconfig_x86_64-default-linuxapp-gcc       |    5 +
>   config/defconfig_x86_64-default-linuxapp-icc       |    5 +
>   lib/librte_cmdline/cmdline_cirbuf.h                |    5 +-
>   lib/librte_cmdline/cmdline_parse_ipaddr.c          |    1 -
>   lib/librte_eal/common/eal_common_pci.c             |   17 ++-
>   lib/librte_eal/common/include/rte_cycles.h         |   19 +++
>   lib/librte_eal/common/include/rte_debug.h          |    3 +-
>   lib/librte_eal/common/include/rte_log.h            |   15 +-
>   lib/librte_eal/common/include/rte_pci.h            |    5 +
>   lib/librte_eal/linuxapp/eal/eal.c                  |   23 +++
>   lib/librte_eal/linuxapp/eal/eal_hpet.c             |   84 +++++++++++-
>   lib/librte_eal/linuxapp/eal/eal_memory.c           |    3 +-
>   lib/librte_eal/linuxapp/eal/eal_pci.c              |   23 +++-
>   lib/librte_eal/linuxapp/eal/eal_thread.c           |    2 -
>   .../linuxapp/eal/include/eal_internal_cfg.h        |    1 +
>   lib/librte_eal/linuxapp/igb_uio/igb_uio.c          |    4 +
>   lib/librte_lpm/rte_lpm.c                           |    2 +-
>   lib/librte_pmd_igb/e1000_rxtx.c                    |    6 +-
>   lib/librte_pmd_igb/igb/e1000_vf.c                  |    3 +-
>   lib/librte_pmd_ixgbe/ixgbe_ethdev.c                |    4 +
>   lib/librte_pmd_ixgbe/ixgbe_rxtx.c                  |    2 +-
>   mk/arch/i686/rte.vars.mk                           |    2 +-
>   mk/internal/rte.install-post.mk                    |    2 +-
>   mk/{arch/i686/rte.vars.mk => rte.extshared.mk}     |   93 ++++++-------
>   mk/rte.shared.mk                                   |  141 ++++++++++++++++++++
>   mk/toolchain/gcc/rte.toolchain-compat.mk           |    6 +-
>   37 files changed, 417 insertions(+), 118 deletions(-)
>   copy mk/{arch/i686/rte.vars.mk => rte.extshared.mk} (55%)
>   create mode 100644 mk/rte.shared.mk
>


-- 
-------
This e-mail message, including any attachments, is for the sole use of 
the intended recipient(s) and contains information that is confidential 
and proprietary to 6WIND. All unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, 
please contact the sender by reply e-mail and destroy all copies of the 
original message.

Ce courriel ainsi que toutes les pièces jointes, est uniquement destiné 
à son ou ses destinataires. Il contient des informations confidentielles 
qui sont la propriété de 6WIND. Toute révélation, distribution ou copie 
des informations qu'il contient est strictement interdite. Si vous avez 
reçu ce message par erreur, veuillez immédiatement le signaler à 
l'émetteur et détruire toutes les données reçues.

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

* Re: [dpdk-dev] [PATCH 00/22] upgrade with 6WIND's enhancements
       [not found]     ` <5149EAD1.8070801-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2013-03-21  9:40       ` Thomas Monjalon
  0 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2013-03-21  9:40 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

20/03/2013 17:58, Vincent JARDIN :
> All can be applied.

Applied in branch 1.2.3 and tagged as v1.2.3r1:
	http://dpdk.org/browse/dpdk/tag/?id=v1.2.3r1

-- 
Thomas

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

end of thread, other threads:[~2013-03-21  9:40 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 16:04 [dpdk-dev] [PATCH 00/22] upgrade with 6WIND's enhancements Thomas Monjalon
     [not found] ` <cover.1363795499.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-03-20 16:04   ` [dpdk-dev] [PATCH 01/22] mk: use $CC to detect toolchain version Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 02/22] mk: fix typo in LDFLAGS for 32-bit Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 03/22] mk: fix verbose display of install command Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 04/22] mk: add a makefile for shared libraries Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 05/22] mk: allow corei7-avx flag with gcc 4.7 Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 06/22] app: fix volatile read for GCC >= 4.6 Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 07/22] app: fix unused values Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 08/22] app: use (void)variable when unused Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 09/22] app: fix testpmd compliance with __rte_mbuf_sanity_check() Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 10/22] app: fix config crash in testpmd Thomas Monjalon
2013-03-20 16:04   ` [dpdk-dev] [PATCH 11/22] app: fix autotest summary in error cases Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 12/22] lib: fix unused values Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 13/22] lib: fix uninitialized variables Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 14/22] lib: fix non-C99 macros definitions in exported headers Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 15/22] mem: fix access to huge page with high address Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 16/22] timer: check TSC reliability Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 17/22] timer: get TSC frequency from /proc/cpuinfo Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 18/22] timer: option --vmware-tsc-map for VMware guest Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 19/22] pci: reference driver structure for each device Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 20/22] pci: allow drivers to be bound several times to the same PCI device Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 21/22] igb_uio: fix driver dependency Thomas Monjalon
2013-03-20 16:05   ` [dpdk-dev] [PATCH 22/22] igb_uio: fix build with kernel >= 3.8 Thomas Monjalon
2013-03-20 16:58   ` [dpdk-dev] [PATCH 00/22] upgrade with 6WIND's enhancements Vincent JARDIN
     [not found]     ` <5149EAD1.8070801-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-03-21  9:40       ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.