From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 76E22A04C4 for ; Wed, 13 Nov 2019 22:44:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A3E02B9E; Wed, 13 Nov 2019 22:44:00 +0100 (CET) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 217D02AB; Wed, 13 Nov 2019 22:43:57 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id s5so2535379pfh.9; Wed, 13 Nov 2019 13:43:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MrBS3u+P5PBFi2sC39HmhfSEPC8/fuAxhULPJPXbvVA=; b=oVWNnHXUW0EU0vyGbZrNHEkKkSX/NoIfMxO2mTt7buMt/sEAXgq8fYYZcHm1NELR6D 8zilKjLtFcIGg55guDpQtPz49fPT3w1gfLQodUcZvrztS5wkEvo5rdFm2RFDRGDAKToG 00lUOsu0CDQ5fTmhiYmC9L+UG6Fp1YF6PehPwlynU/L4VVkJlKJhZRSrVCKASzuxF66j OwnMYObvqNpzgNSa3FjoVCoOcwRgxkqwnXuwawuVFAaV1gHcXkddcUUlI/bMRvL7iEgl /yJZrQTsDEtT3j4Xd/hyh+3tXtOVL1y1umTnBs7Om2hhqspKg7al7ZfJX3grfFhZoJRW YS5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MrBS3u+P5PBFi2sC39HmhfSEPC8/fuAxhULPJPXbvVA=; b=QlktSycHEJjLNbuRekBh2IYTF703LS5CZ2mlIqKfCawf7ZMxmYHCrPI1yy7J6DY8Fh rx32WJOacOocK+rCJ9r7LfComDWQW1+x1tIm8THKklWhTtSg1CXkLF+CCqMM1POhxTSI vVXIg1+t5naTjKKPOBHGCRzNCScPgDKTMK/sR7pWkUgwHwWvs7m58aXzBDViQNKKWm+E +/jS36L8XbMi2XivuJBIvbV6eLOfswJkRSPfu3JXBr7nxX13JwPU5MnMCe18EtLH+y3O 33R4gNbE1b6QmVTGA3E7vAWDWJiPiioMvVIjCnKjq/q6KzH9A+mxiI3oa4f359WBO4Su xm0w== X-Gm-Message-State: APjAAAUJog51QG+4ret7JPNjoxr8fgLt1y+CNUigNo9q57HpYvk8ZA6i 6ugaVlG50HXQ4udRHYGLbak= X-Google-Smtp-Source: APXvYqy0vpb8ep/7LM5C3ekeI6fKSdmoyOrecyENRL8f0/98pjsVZa55Ajn4anXXcnKEeLoATHii7w== X-Received: by 2002:a17:90a:22a6:: with SMTP id s35mr7655554pjc.3.1573681435929; Wed, 13 Nov 2019 13:43:55 -0800 (PST) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id r68sm3789538pfr.78.2019.11.13.13.43.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Nov 2019 13:43:54 -0800 (PST) From: yasufum.o@gmail.com To: anatoly.burakov@intel.com, david.marchand@redhat.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, stable@dpdk.org, yasufum.o@gmail.com Date: Thu, 14 Nov 2019 06:43:45 +0900 Message-Id: <20191113214346.33749-1-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190724082031.45546-1-yasufum.o@gmail.com> References: <20190724082031.45546-1-yasufum.o@gmail.com> Subject: [dpdk-stable] [PATCH v7 0/1] fbarray: fix duplicated fbarray file in secondary 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Yasufumi Ogawa In secondary_msl_create_walk(), it creates a file for fbarrays with its PID for reserving unique name among secondary processes. However, it does not work if several secondaries run as app containers because each of containerized secondary has PID 1, and failed to reserve unique name other than first one. To reserve unique name in each of containers, use hostname in addition to PID. --- v2: * fix typo in commit message v3: * add fclose() after if getting hostname with fscan() is failed v4: * Increase the size of proc_id to 33 and add boundary in calling fscan() v5: * revise title to reflect the issue * use gethostname() instead of getting from `etc/hostname` * use HOST_NAME_MAX for size of string for hostname v6: * change to use hostname and pid to cover both of host and container cases * change RTE_FBARRAY_NAME_LEN to NAME_MAX to reserve enough size for filename v7: * discard changing RTE_FBARRAY_NAME_LEN to NAME_MAX to avoid breaking ABI * introduce int fbarray_sec_name_len instead of RTE_FBARRAY_NAME_LEN to define long filename only for secondary process * replace the order of postfixes of pid and hostname --- Yasufumi Ogawa (1): fbarray: fix duplicated fbarray file in secondary lib/librte_eal/linux/eal/eal_memalloc.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) -- 2.17.1