DPDK patches and discussions
 help / color / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Yasufumi Ogawa <yasufum.o@gmail.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 1/1] fbarray: get fbarrays from containerized secondary
Date: Thu, 11 Jul 2019 10:43:33 +0100
Message-ID: <43297329-af7e-35e0-394c-d6513c1401e5@intel.com> (raw)
In-Reply-To: <4e4ad489-7b1e-9406-4871-4a3ae7f318ee@gmail.com>

On 11-Jul-19 10:37 AM, Yasufumi Ogawa wrote:
> On 2019/07/09 19:26, Burakov, Anatoly wrote:
>> On 09-Jul-19 11:24 AM, Burakov, Anatoly wrote:
>>> On 09-Jul-19 11:22 AM, Yasufumi Ogawa wrote:
>>>> Hi Anatoly,
>>>>
>>>> On 2019/07/05 17:53, Burakov, Anatoly wrote:
>>>>> On 16-Apr-19 4:43 AM, ogawa.yasufumi@lab.ntt.co.jp wrote:
>>>>>> From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>>>>>>
>>>>>> 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 if the value is 1.
>>>>>>
>>>>>> Cc: stable@dpdk.org
>>>>>>
>>>>>> Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>>>>>> ---
>>>>>
>>>>> I'm not too well versed in containers - is this hostname 1) always 
>>>>> set, and 2) always unique?
>>>> For docker, 1) hostname is always set. 2) The hostname is decided as 
>>>> short form of container ID, so it might not be unique even though 
>>>> very low possibility.
>>>>
>>>> I found that we can get whole container ID in `/proc/self/cgroup` as 
>>>> discussed [1]. I think using hostname is reasonable way without 
>>>> running many secondary processes. However, it might be better to use 
>>>> 64 digits full container ID instead of 12 digits short ID if ensure 
>>>> uniqueness strongly. What do yo think?
>>>>
>>>> [1] 
>>>> https://forums.docker.com/t/get-a-containers-full-id-from-inside-of-itself/37237 
>>>>
>>>
>>> I think it's better to err on the side of caution and guarantee 
>>> better uniqueness. This code will get into an LTS and will be used 
>>> for years to come :)
>>>
>>
>> ...however, i think a full 64-digit ID won't even fit into the fbarray 
>> filename, as i believe it's limited to something like 64 chars. 
>> Perhaps hostname would be enough after all... or we can increase 
>> fbarray name length - that would require ABI breakage but the ABI is 
>> already broken in this release, so it's OK i think.
> OK.

Just a note: you're targetting this fix towards stable too. For stable, 
you cannot break ABI, so we would have to do with the shorter hostname. 
It's only for 19.08 that you can change fbarray length and use the full 
64-char container ID for uniqueness.

> 
>  >> Wouldn't an error in fscanf() leak the file handle? I think you need 
> to fclose() before checking the result.
>  > I would like to fix it.
> I would like send v3 patch for fixing for fclose().

Please do :)

> 
> Thanks,
> Yasufumi
> 
> 


-- 
Thanks,
Anatoly

  reply index

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16  1:59 [dpdk-dev] [PATCH] " ogawa.yasufumi
2019-04-16  1:59 ` ogawa.yasufumi
2019-04-16  3:43 ` [dpdk-dev] [PATCH v2 0/1] Get " ogawa.yasufumi
2019-04-16  3:43   ` ogawa.yasufumi
2019-04-16  3:43   ` [dpdk-dev] [PATCH v2 1/1] fbarray: get " ogawa.yasufumi
2019-04-16  3:43     ` ogawa.yasufumi
2019-07-04 20:17     ` Thomas Monjalon
2019-07-05  8:53     ` Burakov, Anatoly
2019-07-09 10:22       ` Yasufumi Ogawa
2019-07-09 10:24         ` Burakov, Anatoly
2019-07-09 10:26           ` Burakov, Anatoly
2019-07-11  9:37             ` Yasufumi Ogawa
2019-07-11  9:43               ` Burakov, Anatoly [this message]
2019-07-11 10:31 ` [dpdk-dev] [PATCH v3 0/1] " yasufum.o
2019-07-11 10:31   ` [dpdk-dev] [PATCH v3 1/1] " yasufum.o
2019-07-11 10:53     ` Burakov, Anatoly
2019-07-11 11:57       ` Yasufumi Ogawa
2019-07-11 13:14         ` Burakov, Anatoly
2019-07-12  2:22           ` Yasufumi Ogawa
2019-07-22  1:06             ` Ogawa Yasufumi
2019-07-22  9:33               ` Burakov, Anatoly
2019-07-22  9:25             ` Burakov, Anatoly
2019-07-24  8:20   ` [dpdk-dev] [PATCH v4 0/1] " yasufum.o
2019-07-24  8:20     ` [dpdk-dev] [PATCH v4 1/1] " yasufum.o
2019-07-24  9:59       ` Burakov, Anatoly
2019-07-30  8:16         ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-07-30  9:18           ` Burakov, Anatoly
2019-07-31  5:48             ` Yasufumi Ogawa
2019-10-11  9:36       ` [dpdk-dev] " David Marchand
2019-10-25 15:36         ` David Marchand
2019-10-25 19:54           ` Yasufumi Ogawa
2019-10-26 16:15             ` David Marchand
2019-10-26 18:11               ` Yasufumi Ogawa
2019-10-28  8:07     ` [dpdk-dev] [PATCH v5 0/1] fbarray: fix duplicated fbarray file in secondary yasufum.o
2019-10-28  8:07       ` [dpdk-dev] [PATCH v5 1/1] " yasufum.o
2019-10-29 12:03         ` Ananyev, Konstantin
2019-10-30 13:42           ` Yasufumi Ogawa
2019-10-30 19:00             ` Ananyev, Konstantin
2019-10-31 10:03               ` Yasufumi Ogawa
2019-10-31 10:32                 ` Ananyev, Konstantin
2019-11-01  9:04     ` [dpdk-dev] [PATCH v6 0/1] " yasufum.o
2019-11-01  9:04       ` [dpdk-dev] [PATCH v6 1/1] " yasufum.o
2019-11-01 12:01         ` Ananyev, Konstantin
2019-11-04 10:20         ` Burakov, Anatoly
2019-11-05 10:13           ` David Marchand
2019-11-05 11:31             ` Burakov, Anatoly
2019-11-05 11:41               ` Ananyev, Konstantin
2019-11-06 10:37                 ` Burakov, Anatoly
2019-11-08  3:19                   ` Yasufumi Ogawa
2019-11-13 21:43     ` [dpdk-dev] [PATCH v7 0/1] " yasufum.o
2019-11-13 21:43       ` [dpdk-dev] [PATCH v7 1/1] " yasufum.o
2019-11-14 10:01         ` Burakov, Anatoly
2019-11-14 11:42           ` Yasufumi Ogawa
2019-11-14 12:27             ` David Marchand
2019-11-26 19:40               ` Yasufumi Ogawa
2019-11-27 10:26                 ` Burakov, Anatoly
2019-11-29  5:44                   ` Yasufumi Ogawa
2019-12-02 10:43                     ` Burakov, Anatoly
2019-12-05 20:13                       ` Yasufumi Ogawa
2019-11-14 12:55         ` David Marchand
2019-11-14 17:32         ` Ananyev, Konstantin
2019-11-27  8:48       ` [dpdk-dev] [PATCH v8 0/1] " Yasufumi Ogawa
2019-11-27  8:48         ` [dpdk-dev] [PATCH v8 1/1] " Yasufumi Ogawa
2019-12-06 10:44           ` Burakov, Anatoly
2019-12-06 13:18             ` Yasufumi Ogawa
2020-02-14  7:46             ` Yasufumi Ogawa
2020-02-14 15:08               ` David Marchand
2020-02-14 15:29                 ` Thomas Monjalon
2020-02-17 12:54                   ` Yasufumi Ogawa

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43297329-af7e-35e0-394c-d6513c1401e5@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=yasufum.o@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox