diff mbox

[dpdk-dev] x32 ABI support, first iteration

Message ID 1415880091-7897-1-git-send-email-danielx.t.mrzyglod@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Daniel Mrzyglod Nov. 13, 2014, 12:01 p.m. UTC
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
 config/defconfig_x86_x32-native-linuxapp-gcc | 46 ++++++++++++++++++++
 mk/arch/x86_x32/rte.vars.mk                  | 63 ++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)
 create mode 100644 config/defconfig_x86_x32-native-linuxapp-gcc
 create mode 100644 mk/arch/x86_x32/rte.vars.mk

Comments

Daniel Mrzyglod Nov. 13, 2014, 12:20 p.m. UTC | #1
This patch provides support for x32 ABI.
x32 ABI provides benefits of x86-64 while using 32-bit pointers and avoiding overhead of 64-bit pointers.

Daniel Mrzyglod (1):
Konstantin Ananyev(1):
  x32 ABI support, first iteration

 config/defconfig_x86_x32-native-linuxapp-gcc | 46 ++++++++++++++++++++
 mk/arch/x86_x32/rte.vars.mk                  | 63 ++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)
 create mode 100644 config/defconfig_x86_x32-native-linuxapp-gcc
 create mode 100644 mk/arch/x86_x32/rte.vars.mk

--
2.1.0
Neil Horman Nov. 14, 2014, 12:45 a.m. UTC | #2
On Thu, Nov 13, 2014 at 12:01:31PM +0000, Daniel Mrzyglod wrote:
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> ---
>  config/defconfig_x86_x32-native-linuxapp-gcc | 46 ++++++++++++++++++++
>  mk/arch/x86_x32/rte.vars.mk                  | 63 ++++++++++++++++++++++++++++
>  2 files changed, 109 insertions(+)
>  create mode 100644 config/defconfig_x86_x32-native-linuxapp-gcc
>  create mode 100644 mk/arch/x86_x32/rte.vars.mk
> 
> diff --git a/config/defconfig_x86_x32-native-linuxapp-gcc b/config/defconfig_x86_x32-native-linuxapp-gcc
> new file mode 100644
> index 0000000..fb0afc4
> --- /dev/null
> +++ b/config/defconfig_x86_x32-native-linuxapp-gcc
> @@ -0,0 +1,46 @@
> +#   BSD LICENSE
> +#
> +#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> +#   All rights reserved.
> +#
> +#   Redistribution and use in source and binary forms, with or without
> +#   modification, are permitted provided that the following conditions
> +#   are met:
> +#
> +#     * Redistributions of source code must retain the above copyright
> +#       notice, this list of conditions and the following disclaimer.
> +#     * Redistributions in binary form must reproduce the above copyright
> +#       notice, this list of conditions and the following disclaimer in
> +#       the documentation and/or other materials provided with the
> +#       distribution.
> +#     * Neither the name of Intel Corporation nor the names of its
> +#       contributors may be used to endorse or promote products derived
> +#       from this software without specific prior written permission.
> +#
> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +#
> +
> +#include "common_linuxapp"
> +
> +CONFIG_RTE_MACHINE="native"
> +
> +CONFIG_RTE_ARCH="x86_x32"
> +CONFIG_RTE_ARCH_X86_X32=y
> +
> +CONFIG_RTE_TOOLCHAIN="gcc"
> +CONFIG_RTE_TOOLCHAIN_GCC=y
> +
> +#
> +# KNI is not supported on 32-bit
> +#
> +CONFIG_RTE_LIBRTE_KNI=n
> diff --git a/mk/arch/x86_x32/rte.vars.mk b/mk/arch/x86_x32/rte.vars.mk
> new file mode 100644
> index 0000000..9507af7
> --- /dev/null
> +++ b/mk/arch/x86_x32/rte.vars.mk
> @@ -0,0 +1,63 @@
> +#   BSD LICENSE
> +#
> +#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> +#   All rights reserved.
> +#
> +#   Redistribution and use in source and binary forms, with or without
> +#   modification, are permitted provided that the following conditions
> +#   are met:
> +#
> +#     * Redistributions of source code must retain the above copyright
> +#       notice, this list of conditions and the following disclaimer.
> +#     * Redistributions in binary form must reproduce the above copyright
> +#       notice, this list of conditions and the following disclaimer in
> +#       the documentation and/or other materials provided with the
> +#       distribution.
> +#     * Neither the name of Intel Corporation nor the names of its
> +#       contributors may be used to endorse or promote products derived
> +#       from this software without specific prior written permission.
> +#
> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +#
> +# arch:
> +#
> +#   - define ARCH variable (overriden by cmdline or by previous
> +#     optional define in machine .mk)
> +#   - define CROSS variable (overriden by cmdline or previous define
> +#     in machine .mk)
> +#   - define CPU_CFLAGS variable (overriden by cmdline or previous
> +#     define in machine .mk)
> +#   - define CPU_LDFLAGS variable (overriden by cmdline or previous
> +#     define in machine .mk)
> +#   - define CPU_ASFLAGS variable (overriden by cmdline or previous
> +#     define in machine .mk)
> +#   - may override any previously defined variable
> +#
> +# examples for CONFIG_RTE_ARCH: i686, x86_64, x86_64_32
> +#
> +
> +ARCH  ?= x86_64
> +ARCH_DIR := x86
> +CROSS ?=
> +
> +CPU_CFLAGS  ?= -mx32
> +CPU_LDFLAGS ?= -melf32_x86_64
> +#CPU_ASFLAGS ?= -felf64
> +# x32 is supported by Linux distribution with gcc4.8 and newer in some
> +# cases there is backported support in gcc4.6
> +ifneq ($(shell echo | $(CC) $(CPU_CFLAGS) -E - 2>/dev/null 1>/dev/null && echo 0), 0)
> +	$(error This version of GCC does not support x32 ABI)
> +endif
> +
> +export ARCH CROSS CPU_CFLAGS CPU_LDFLAGS CPU_ASFLAGS
> -- 
> 1.9.1
> 
> 
Seems reasonable.  I presume that a build with all options enabled builds and
executes?
Neil
Tang, HaifengX Feb. 9, 2015, 5:29 a.m. UTC | #3
Tested-by: Haifeng Tang <haifengx.tang@intel.com>
 
 - Tested Commit: bfca21f8a0defa7173895ba00e30f685b3209b81
 - OS&Kernel: Ubuntu 14.04 LTS 3.13.0-24-generic
 - GCC: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
 - CPUIntel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
 - NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb]
 - Default x86_x32-native-linuxapp-gcc configuration
 - Regression test result Total 74 cases, 74 passed, 0 failed 
pmd	checksum_checking	PASSED
	packet_checking	PASSED
		
ipfrag	ipfrag_fragment	PASSED
	ipfrag_nofragment	PASSED
	ipfrag_normalfwd	PASSED
		
cmdline cmdline_sample_commands	PASSED
		
hello_world	hello_world_all_cores	PASSED
	                hello_world_single_core PASSED
		
timer	timer_callbacks_verify	PASSED
		
fdir	fdir_filter_masks  PASSED
	fdir_flexbytes_filtering	PASSED
	fdir_matching	PASSED
	fdir_perfect_matching	PASSED
	fdir_signatures	PASSED
	fdir_space	PASSED
	fdir_vlanfiltering	PASSED
		
dynamic_config   dynamic_config_default_mode  PASSED
	                   dynamic_config_disable_promiscuous  PASSED
	                   dynamic_config_enable_promiscuous   PASSED
		
jumboframes	jumboframes_bigger_jumbo	PASSED
	                jumboframes_jumbo_jumbo	PASSED
	                jumboframes_jumbo_nojumbo  PASSED
	                jumboframes_normal_jumbo	PASSED
	               jumboframes_normal_nojumbo PASSED
		
scatter	      scatter_mbuf_1024	  PASSED
		
ieee1588	ieee1588_disable   PASSED
	                ieee1588_enable   PASSED		
l2fwd	port_testing	PASSED
		
checksum_offload	checksum_offload_372664	PASSED
	                                checksum_offload_372762	PASSED
	                                checksum_offload_disable	PASSED
	                                checksum_offload_enable	PASSED
		
link_flowctrl	flowctrl_off_pause_fwd_off	PASSED
	                flowctrl_off_pause_fwd_on	PASSED
	                flowctrl_on_pause_fwd_off	PASSED
	                flowctrl_on_pause_fwd_on	PASSED
		
whitelist	whitelist_add_remove_mac_address	PASSED
	                whitelist_invalid_addresses	PASSED
		
blacklist	bl_allbutoneportblacklisted	PASSED
	                bl_noblacklisted	PASSED
	                bl_oneportblacklisted	PASSED
		
shutdown_api	change_linkspeed	PASSED
	                change_numberrxdtxd	 PASSED
	                change_numberrxdtxdaftercycle  PASSED
	                change_thresholds	PASSED
	                enable_disablejumbo	PASSED
	                enable_disablerss	PASSED
	                link_stats	PASSED
	                reconfigure_ports	PASSED
	                reset_queues	PASSED
	                set_promiscuousmode	PASSED
	                stop_restart	PASSED
	                stress_test	PASSED
		
dual_vlan	vlan_filter_config	PASSED
	                vlan_filter_table	PASSED
	                vlan_insert_config	PASSED
	                vlan_random_test	PASSED
	                vlan_strip_config	PASSED
	                vlan_stripq_config	PASSED
	                vlan_synthetic_test	PASSED
	                vlan_tpid_config	PASSED
		
l2fwd_fork	floating	 PASSED
	                ports	 PASSED
	                respawn   PASSED
	                stress_respawn  PASSED
		
ipv4_reassembly	only_maxflows_packets_are_forwarded	PASSED
	                                packets_are_forwarded_after_ttl_timeout	PASSED
	                                send_1K_frames_split_in_4_and_1K_maxflows  PASSED
	                                send_2K_frames_split_in_4_and_1K_maxflows  PASSED
	                                send_4K_frames_split_in_7_and_4K_maxflows  PASSED
	                                send_delayed_fragment_packet_is_forwarded  PASSED
	                                send_jumbo_frames	PASSED
	                                send_jumbo_frames_with_wrong_arguments	 PASSED
	                                send_more_fragments_than_supported  PASSED
diff mbox

Patch

diff --git a/config/defconfig_x86_x32-native-linuxapp-gcc b/config/defconfig_x86_x32-native-linuxapp-gcc
new file mode 100644
index 0000000..fb0afc4
--- /dev/null
+++ b/config/defconfig_x86_x32-native-linuxapp-gcc
@@ -0,0 +1,46 @@ 
+#   BSD LICENSE
+#
+#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#include "common_linuxapp"
+
+CONFIG_RTE_MACHINE="native"
+
+CONFIG_RTE_ARCH="x86_x32"
+CONFIG_RTE_ARCH_X86_X32=y
+
+CONFIG_RTE_TOOLCHAIN="gcc"
+CONFIG_RTE_TOOLCHAIN_GCC=y
+
+#
+# KNI is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_KNI=n
diff --git a/mk/arch/x86_x32/rte.vars.mk b/mk/arch/x86_x32/rte.vars.mk
new file mode 100644
index 0000000..9507af7
--- /dev/null
+++ b/mk/arch/x86_x32/rte.vars.mk
@@ -0,0 +1,63 @@ 
+#   BSD LICENSE
+#
+#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#
+# arch:
+#
+#   - define ARCH variable (overriden by cmdline or by previous
+#     optional define in machine .mk)
+#   - define CROSS variable (overriden by cmdline or previous define
+#     in machine .mk)
+#   - define CPU_CFLAGS variable (overriden by cmdline or previous
+#     define in machine .mk)
+#   - define CPU_LDFLAGS variable (overriden by cmdline or previous
+#     define in machine .mk)
+#   - define CPU_ASFLAGS variable (overriden by cmdline or previous
+#     define in machine .mk)
+#   - may override any previously defined variable
+#
+# examples for CONFIG_RTE_ARCH: i686, x86_64, x86_64_32
+#
+
+ARCH  ?= x86_64
+ARCH_DIR := x86
+CROSS ?=
+
+CPU_CFLAGS  ?= -mx32
+CPU_LDFLAGS ?= -melf32_x86_64
+#CPU_ASFLAGS ?= -felf64
+# x32 is supported by Linux distribution with gcc4.8 and newer in some
+# cases there is backported support in gcc4.6
+ifneq ($(shell echo | $(CC) $(CPU_CFLAGS) -E - 2>/dev/null 1>/dev/null && echo 0), 0)
+	$(error This version of GCC does not support x32 ABI)
+endif
+
+export ARCH CROSS CPU_CFLAGS CPU_LDFLAGS CPU_ASFLAGS