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 F293FA00B8 for ; Mon, 28 Oct 2019 09:07:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C81B61BF06; Mon, 28 Oct 2019 09:07:55 +0100 (CET) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id AD8C91BEF6; Mon, 28 Oct 2019 09:07:51 +0100 (CET) Received: by mail-pf1-f193.google.com with SMTP id c184so6403955pfb.0; Mon, 28 Oct 2019 01:07:51 -0700 (PDT) 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=fqwnpUdf988IoluTJ6a+8NsqDrW9ltO7CZbDNGi8tH8=; b=gqr4eC6F6GJ6ON9ETCadUC01k2Y5P21zUlGjzORuhRo1VnNe8WiSibVd4oqwb2xc9E 0fezfJ972A2HyZUZK77pEvuBB2Cwxm1totAO6O+oe80WrTKKYYzG72ZzR1IbvL7aFKiN MXtk+ce7MTm7pmhSsfXo+HQPJplBYRGPz9XCH5PCmLY/PysQJlERTeBfzcccef7thjsh 7Vc2mjdyQY+g+cOO0fvJ1zbIXRVFyYsKZWvMX+9DFtKmsE1jDZaqV90KV97ndTGymdsS 118JmT0x6qWdzuATaB98xS6aKeebtodgATtM3HsWe7P3ovPTEeyAKKLM0o2VgwVIt1cK EuZA== 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=fqwnpUdf988IoluTJ6a+8NsqDrW9ltO7CZbDNGi8tH8=; b=QV0hSuNFuCprF/1uSi80DTA2Wg9AQc87redGtzIs3BWrKfgFUWNkY2pNflFWSTUs31 MZi0ixHyYa7tFQ3qP+gVUgBFRbGv2skiBXUG+0QOGWwgs3BsvkUZH+k0oEILaVXkrw+p dT6oF4OoBWjzsyVKAu/+oKdtBAHWEQ/g9JaoDPBk+P8EtI+N8FIh8GW99t35/iMHT4MZ CX7pX+793V+f6y7aGJmXu9y8EvstDtiYTQKUcTNhQhdCH5b8GM1YngLHFlofy1/+pG/s w5ueCmY5FmRk0q99fyFFuqvgu7w7iQfeFBjy5N0o4KmRztW6vh9HsYCZJVS7J0twtEtj nrmg== X-Gm-Message-State: APjAAAVcmQmLeq5+ycbbN5O/Uaw8zltw9iEE4sKgWC8Iw78mPXUEca8y NeQbVnSa1Z7U7S0wdfZlb4PBzEO5koU= X-Google-Smtp-Source: APXvYqwh141J61IGam2YkEb4WnMNQA1Mmroi6X+43pCxKfkoykCX3dvAAg70uLdLtKrV8N5yQQGW0Q== X-Received: by 2002:a17:90a:8009:: with SMTP id b9mr12715632pjn.41.1572250070831; Mon, 28 Oct 2019 01:07:50 -0700 (PDT) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id y24sm3786847pfr.116.2019.10.28.01.07.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Oct 2019 01:07:50 -0700 (PDT) From: yasufum.o@gmail.com To: anatoly.burakov@intel.com, david.marchand@redhat.com Cc: dev@dpdk.org, stable@dpdk.org, yasufum.o@gmail.com Date: Mon, 28 Oct 2019 17:07:44 +0900 Message-Id: <20191028080745.43425-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 v5 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 secondary is run as app container because each of containerized secondary has PID 1. To reserve unique name, use hostname instead of PID because hostname is assigned as a short form of 64 digits full container ID in docker. --- 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 --- Yasufumi Ogawa (1): fbarray: fix duplicated fbarray file in secondary lib/librte_eal/linux/eal/eal_memalloc.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) -- 2.17.1