From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 19BBC231C for ; Thu, 27 Nov 2014 14:58:29 +0100 (CET) Received: by mail-wi0-f176.google.com with SMTP id ex7so15870733wid.3 for ; Thu, 27 Nov 2014 05:58:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=tWJtlFCIKlSHbO5W47QjDl1f2itLUKOuwf99cRJgx3E=; b=GELbYLvBelOGfn8mTy+5C3hh2ty2mdjnfvHU7nd1Vlz4rKoKNd2d4MKK8LHLfvSEJQ pEzqM/+Zb+mZ3o0jq6QFzMkJSpkKOvKI7O99GEioqkkdyMg69L1ySEyrssusn42O8zPY 6RlXNoqyOGYbGaRKw3GHlJ9EBjZ/RNAE/ojsYY/umtzMjJ1m952aPB14Bmsan123QWOj rtJJPx3jcZ3NP2iPUaKWDfuSevRQb9syH7w0zerUo4HsCtiAMTNwPGeA4xaKaq5oMlxh k1yDY4b8BNRq3Gi8Q2u96mKjCB5DmhJJbBWzhrKBbkQOThSBZOZdmngohWbBurX2wXWD pO5Q== X-Gm-Message-State: ALoCoQm8lxPYZMo+wUDaAjGjpgupGHMJEa4tHerBjCLCyWNw9PA8twsC3uXeAeTDqXtgDhkV3XAB X-Received: by 10.194.9.1 with SMTP id v1mr59253797wja.124.1417096708895; Thu, 27 Nov 2014 05:58:28 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id d5sm10826695wjb.34.2014.11.27.05.58.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Nov 2014 05:58:28 -0800 (PST) From: Thomas Monjalon To: Sergio Gonzalez Monroy Date: Thu, 27 Nov 2014 14:58:05 +0100 Message-ID: <3199535.XIuFQf7Fcl@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <1416399968-348-1-git-send-email-sergio.gonzalez.monroy@intel.com> References: <1416399968-348-1-git-send-email-sergio.gonzalez.monroy@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [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: Thu, 27 Nov 2014 13:58:29 -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 Updated and applied in 1 commit. Thanks -- Thomas