DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 0/3] Add RTE_ prefix to CACHE_LINE related macros
Date: Thu, 27 Nov 2014 14:58:05 +0100	[thread overview]
Message-ID: <3199535.XIuFQf7Fcl@xps13> (raw)
In-Reply-To: <1416399968-348-1-git-send-email-sergio.gonzalez.monroy@intel.com>

> 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

Updated and applied in 1 commit.

Thanks
-- 
Thomas

      parent reply	other threads:[~2014-11-27 13:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 ` Thomas Monjalon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3199535.XIuFQf7Fcl@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=sergio.gonzalez.monroy@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).