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 19D86A04E0; Wed, 27 Nov 2019 09:48:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E04F358C3; Wed, 27 Nov 2019 09:48:33 +0100 (CET) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id DA4EA235 for ; Wed, 27 Nov 2019 09:48:32 +0100 (CET) Received: by mail-pg1-f195.google.com with SMTP id b10so10464937pgd.4 for ; Wed, 27 Nov 2019 00:48:32 -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=gyhSAk9NEs05yG2xYvT+zmVW0isTr1mTEZGHTYX94is=; b=rAta+hMev93wn1u++LKXFldE8Vu6Xm239DwR5lqaExoH5/7i3bMGts7GxoYDBoLcUh NaET2c3GsCcWuez5C2k3QcIspCUT7SU0vXZfOS5od8SZ2ouay3gzeQtBYh08rajDXgGa /XADS3FnXoeCvZxxkrn97Kd4KlOnM+JCLpvS3aIi61LDJLMyVzxqi7BF2FoiKt3CAAZE akQ0+r84tgLiU0V0qIZnFK8eG+Jk34AdIJ1RHJOquSS3cvb14UmAqMXf/yWuqLcGF+ix FDRNpDEIU9wU/OSNqixAgQmpUNJBf/V2WbzHelaQMHxZsHumDBBhF0QpWainVg2/sA8K +G1g== 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=gyhSAk9NEs05yG2xYvT+zmVW0isTr1mTEZGHTYX94is=; b=OOpofEqLOXL/HvAOKVIo4Y3Gn1s9SstCCIHuJn+YQid/cQR2FwDcJ+RvlW0pxAuKTl tAa7feyOYMx0Dc/zEb7MdzF32Y/s6pRN8IUXyGO+t7q6tajfHeetaQmShA/Tzt2I8FIE Q9UMG2oXvXgStS1qX/QjdZ7zsGHhp1qi2s1DgBun1QFTPMn4Stz0jYnSm29NgwAFW2m8 DozFeO5IMZG8l8e869eUt+D1elCcEs7a6LQX1KC65S7ymPAdg62/Z6P0IrowJ7SnjsaG Y+zhaMH1R5zEo+t9IrF1lkLGlWrJiKSymhtez6lxgG7Tq/dHvGos1TOhda0y5pIT/DHQ r8ZQ== X-Gm-Message-State: APjAAAUx6636Rypafd2foNSnY+5DnIApNJ4rmMfZ3cPY9VeJMat4t9Y7 iQJNGV7qybp9N9b9pAby6wc= X-Google-Smtp-Source: APXvYqyBqZ+1CtoQibh7qBgSOvxQyHJjgXhTX2Bj1H1dB/xuN4Hvsi0TrelKy9uSZ+qFv3hEWgsySw== X-Received: by 2002:a63:b22:: with SMTP id 34mr3621006pgl.90.1574844512124; Wed, 27 Nov 2019 00:48:32 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c8c2:de00:45ab:5a00:e90c:7c6b]) by smtp.gmail.com with ESMTPSA id t27sm15902108pfq.169.2019.11.27.00.48.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 00:48:31 -0800 (PST) From: Yasufumi Ogawa To: anatoly.burakov@intel.com, konstantin.ananyev@intel.com, david.marchand@redhat.com, dev@dpdk.org Cc: yasufumi.ogawa.gy@hco.ntt.co.jp, Yasufumi Ogawa Date: Wed, 27 Nov 2019 17:48:25 +0900 Message-Id: <20191127084826.3519-1-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191113214346.33749-1-yasufum.o@gmail.com> References: <20191113214346.33749-1-yasufum.o@gmail.com> Subject: [dpdk-dev] [PATCH v8 0/1] fbarray: fix duplicated fbarray file in secondary X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 v8: * change RTE_FBARRAY_NAME_LEN to the maximum size for secondary * fix warning of Signed-off-by --- Yasufumi Ogawa (1): fbarray: fix duplicated fbarray file in secondary lib/librte_eal/common/include/rte_fbarray.h | 7 ++++++- lib/librte_eal/linux/eal/eal_memalloc.c | 11 ++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) -- 2.17.1