From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-outbound-2.vmware.com (smtp-outbound-2.vmware.com [208.91.2.13]) by dpdk.org (Postfix) with ESMTP id 1BD295912 for ; Mon, 17 Nov 2014 19:57:26 +0100 (CET) Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 446DE284EF; Mon, 17 Nov 2014 11:07:37 -0800 (PST) Received: from EX13-CAS-007.vmware.com (EX13-CAS-007.vmware.com [10.113.191.57]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id 3CDD11942C; Mon, 17 Nov 2014 11:07:37 -0800 (PST) Received: from EX13-MBX-018.vmware.com (10.113.191.38) by EX13-MBX-006.vmware.com (10.113.191.26) with Microsoft SMTP Server (TLS) id 15.0.913.22; Mon, 17 Nov 2014 11:07:36 -0800 Received: from EX13-MBX-018.vmware.com ([fe80::7cdc:b1ba:f507:8b02]) by EX13-MBX-018.vmware.com ([fe80::7cdc:b1ba:f507:8b02%15]) with mapi id 15.00.0913.011; Mon, 17 Nov 2014 11:07:31 -0800 From: Jia Yu To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH] lib: include rte_memory.h for __rte_cache_aligned Thread-Index: AQHP+vRuvIzEIgY9qEKdfvWwwJv9vZxaJo0AgAsW/wA= Date: Mon, 17 Nov 2014 19:07:31 +0000 Message-ID: References: <1415381289-43291-1-git-send-email-jyu@vmware.com> <2488601.0HJ4lVigCM@xps13> In-Reply-To: <2488601.0HJ4lVigCM@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.113.160.246] Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] lib: include rte_memory.h for __rte_cache_aligned 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: Mon, 17 Nov 2014 18:57:26 -0000 Thanks for reviewing this change. No error message was found without this patch. This patch follows a good coding practice to include the header files when it=B9s needed, rather than through some other header files. In the past, we found some data structure was not cache line aligned due to missing the include, and caused memory corruption. Compiler did not give warning or error when __rte_cache_aligned attribute definition is missing. With DPDK latest, I checked the data structures that used __rte_cache_aligned attributed in these files, and they are properly aligned. So this patch is mainly for better coding style now. pahole -s libfile.[o, a] ip_frag_pkt 192 1 ip_frag_tbl_stat 64 0 malloc_elem 64 0 rte_mbuf 128 1 rte_table_lpm 1088 1 rte_table_hash 64 1 Thanks, Jia On 11/10/14, 1:46 AM, "Thomas Monjalon" wrote: >2014-11-07 09:28, Jia Yu: >> Include rte_memory.h for lib files that use __rte_cache_aligned >> attribute. > >Please could you explain what was the error? >As I suspect it's a fix, it would be clearer to start your title with >"fix". > >Thanks >--=20 >Thomas