From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 174F61B645 for ; Thu, 21 Jun 2018 07:27:47 +0200 (CEST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5L5NjSa118553 for ; Thu, 21 Jun 2018 01:27:47 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jr0r91mq7-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 21 Jun 2018 01:27:47 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 21 Jun 2018 06:27:45 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 21 Jun 2018 06:27:44 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5L5RhGl23134256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 21 Jun 2018 05:27:43 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EFB244204B; Thu, 21 Jun 2018 06:17:41 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A827442041; Thu, 21 Jun 2018 06:17:40 +0100 (BST) Received: from chozha.in.ibm.com (unknown [9.124.35.60]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Jun 2018 06:17:40 +0100 (BST) From: Gowrishankar To: Sergio Gonzalez Monroy , Bruce Richardson , Konstantin Ananyev Cc: stable@dpdk.org, Chao Zhu , Gowrishankar Muthukrishnan Date: Thu, 21 Jun 2018 10:57:36 +0530 X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 x-cbid: 18062105-0008-0000-0000-0000024A1361 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062105-0009-0000-0000-000021B067F2 Message-Id: <983aedd7fe86e9e085524b355688e9cb3ec64195.1527076172.git.gowrishankar.m@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-21_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806210059 Subject: [dpdk-stable] [PATCH 1/3] eal: access hugepage_file in reverse order for powerpc X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 05:27:48 -0000 From: Gowrishankar Muthukrishnan In powerpc, secondary process has to read hugepage_files in its reverse order of indexing, so that correct VA addr is read from hp for hugepage mapping. Fixes: 284ae3e9ff ("eal/ppc: fix mmap for memory initialization") Cc: stable@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- lib/librte_eal/linuxapp/eal/eal_memory.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 16a181c..2dcb3b5 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -1455,7 +1455,11 @@ void numa_error(char *where) /* find the hugepages for this segment and map them * we don't need to worry about order, as the server sorted the * entries before it did the second mmap of them */ +#ifdef RTE_ARCH_PPC_64 + for (i = num_hp-1; i < num_hp && offset < mcfg->memseg[s].len; i--){ +#else for (i = 0; i < num_hp && offset < mcfg->memseg[s].len; i++){ +#endif if (hp[i].memseg_id == (int)s){ fd = open(hp[i].filepath, O_RDWR); if (fd < 0) { -- 1.9.1