DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] Add RTE_ prefix to CACHE_LINE related macros
@ 2014-11-19 12:26 Sergio Gonzalez Monroy
  2014-11-19 12:26 ` [dpdk-dev] [PATCH 1/3] Add RTE_ prefix to CACHE_LINE_SIZE macro Sergio Gonzalez Monroy
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-11-19 12:26 UTC (permalink / raw)
  To: dev

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

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

end of thread, other threads:[~2014-11-27 13:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19 12:26 [dpdk-dev] [PATCH 0/3] Add RTE_ prefix to CACHE_LINE related macros Sergio Gonzalez Monroy
2014-11-19 12:26 ` [dpdk-dev] [PATCH 1/3] Add RTE_ prefix to CACHE_LINE_SIZE macro Sergio Gonzalez Monroy
2014-11-19 12:26 ` [dpdk-dev] [PATCH 2/3] Add RTE_ prefix to CACHE_LINE_MASK macro Sergio Gonzalez Monroy
2014-11-19 12:26 ` [dpdk-dev] [PATCH 3/3] Add RTE_ prefix to CACHE_LINE_ROUNDUP macro Sergio Gonzalez Monroy
2014-11-27 13:58 ` [dpdk-dev] [PATCH 0/3] Add RTE_ prefix to CACHE_LINE related macros Thomas Monjalon

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