From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id CE4207E18 for ; Wed, 19 Nov 2014 13:15:45 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 19 Nov 2014 04:26:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="418629402" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by FMSMGA003.fm.intel.com with ESMTP; 19 Nov 2014 04:16:46 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id sAJCQ86o008249 for ; Wed, 19 Nov 2014 12:26:08 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id sAJCQ8Rs000386 for ; Wed, 19 Nov 2014 12:26:08 GMT Received: (from smonroy@localhost) by sivswdev02.ir.intel.com with id sAJCQ8Bq000382 for dev@dpdk.org; Wed, 19 Nov 2014 12:26:08 GMT From: Sergio Gonzalez Monroy To: dev@dpdk.org Date: Wed, 19 Nov 2014 12:26:05 +0000 Message-Id: <1416399968-348-1-git-send-email-sergio.gonzalez.monroy@intel.com> X-Mailer: git-send-email 1.8.5.4 Subject: [dpdk-dev] [PATCH 0/3] Add RTE_ prefix to CACHE_LINE related macros X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 12:15:46 -0000 Currently DPDK sets CACHE_LINE_SIZE value to 64 by default if the macro is not already defined. FreeBSD defines a CACHE_LINE_SIZE macro in the header file: /usr/include/machine/param.h These macros set different values, 64 in DPDK vs 128 in FreeBSD, causing broken application behaviour if the system header file is included before rte_memory.h (where DPDK sets CACHE_LINE_SIZE). This is the case for some examples like ip_fragmentation. In such application, DPDK library code would assume 64 bytes cache line size and the application code would assume 128 cache line size. Given that mbufs now take two cache lines and that the structure is being aligned based on this value, the result is broken application functionality. The approach to fix this issue is to add RTE_ prefix to all CACHE_LINE_xxxx related macros to avoid conflicts. Sergio Gonzalez Monroy (3): Add RTE_ prefix to CACHE_LINE_SIZE macro Add RTE_ prefix to CACHE_LINE_MASK macro Add RTE_ prefix to CACHE_LINE_ROUNDUP macro app/test-acl/main.c | 2 +- app/test-pipeline/runtime.c | 2 +- app/test-pmd/testpmd.c | 14 +++--- app/test-pmd/testpmd.h | 4 +- app/test/test_distributor_perf.c | 2 +- app/test/test_ivshmem.c | 6 +-- app/test/test_malloc.c | 32 ++++++------- app/test/test_mbuf.c | 2 +- app/test/test_memzone.c | 58 +++++++++++------------ app/test/test_pmd_perf.c | 4 +- app/test/test_table.h | 2 +- doc/guides/sample_app_ug/kernel_nic_interface.rst | 2 +- examples/dpdk_qat/crypto.c | 2 +- examples/ip_pipeline/cmdline.c | 8 ++-- examples/ip_pipeline/init.c | 4 +- examples/ip_pipeline/pipeline_passthrough.c | 2 +- examples/ip_pipeline/pipeline_rx.c | 2 +- examples/ip_pipeline/pipeline_tx.c | 2 +- examples/ip_reassembly/main.c | 2 +- examples/kni/main.c | 2 +- examples/multi_process/l2fwd_fork/flib.c | 4 +- examples/multi_process/symmetric_mp/main.c | 2 +- examples/netmap_compat/lib/compat_netmap.c | 4 +- examples/qos_sched/main.c | 4 +- examples/vhost/main.c | 6 +-- examples/vhost_xen/vhost_monitor.c | 4 +- lib/librte_acl/acl_gen.c | 6 +-- lib/librte_acl/rte_acl.c | 2 +- lib/librte_acl/rte_acl_osdep_alone.h | 6 +-- lib/librte_distributor/rte_distributor.c | 4 +- lib/librte_eal/common/eal_common_memzone.c | 24 +++++----- lib/librte_eal/common/include/rte_memory.h | 12 ++--- lib/librte_ether/rte_ethdev.c | 10 ++-- lib/librte_hash/rte_hash.c | 10 ++-- lib/librte_ip_frag/rte_ip_frag_common.c | 2 +- lib/librte_lpm/rte_lpm.c | 4 +- lib/librte_lpm/rte_lpm6.c | 4 +- lib/librte_malloc/malloc_elem.c | 4 +- lib/librte_malloc/malloc_elem.h | 2 +- lib/librte_malloc/malloc_heap.c | 6 +-- lib/librte_malloc/rte_malloc.c | 2 +- lib/librte_mempool/rte_mempool.c | 24 +++++----- lib/librte_mempool/rte_mempool.h | 2 +- lib/librte_pipeline/rte_pipeline.c | 4 +- lib/librte_pmd_e1000/em_rxtx.c | 10 ++-- lib/librte_pmd_e1000/igb_rxtx.c | 8 ++-- lib/librte_pmd_i40e/i40e_rxtx.c | 8 ++-- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 8 ++-- lib/librte_pmd_virtio/virtio_ethdev.c | 10 ++-- lib/librte_pmd_virtio/virtio_rxtx.c | 2 +- lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c | 2 +- lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 8 ++-- lib/librte_pmd_xenvirt/rte_eth_xenvirt.c | 6 +-- lib/librte_port/rte_port_ethdev.c | 4 +- lib/librte_port/rte_port_frag.c | 2 +- lib/librte_port/rte_port_ras.c | 2 +- lib/librte_port/rte_port_ring.c | 4 +- lib/librte_port/rte_port_sched.c | 4 +- lib/librte_port/rte_port_source_sink.c | 2 +- lib/librte_ring/rte_ring.c | 12 ++--- lib/librte_sched/rte_bitmap.h | 8 ++-- lib/librte_sched/rte_sched.c | 16 +++---- lib/librte_table/rte_table_acl.c | 10 ++-- lib/librte_table/rte_table_array.c | 8 ++-- lib/librte_table/rte_table_hash_ext.c | 20 ++++---- lib/librte_table/rte_table_hash_key16.c | 36 +++++++------- lib/librte_table/rte_table_hash_key32.c | 44 ++++++++--------- lib/librte_table/rte_table_hash_key8.c | 28 +++++------ lib/librte_table/rte_table_hash_lru.c | 16 +++---- lib/librte_table/rte_table_lpm.c | 2 +- lib/librte_table/rte_table_lpm_ipv6.c | 2 +- 71 files changed, 294 insertions(+), 294 deletions(-) -- 2.1.0