Skip to content

fbarray: fix duplicated fbarray file in secondary

Yasufumi Ogawa dpdk-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest1 patch 6 repliesIn review
  2. v71 patch 10 repliesSuperseded
  3. v61 patch 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v51 patch5 repliesSuperseded

Changes in v8 from the cover letter

* change RTE_FBARRAY_NAME_LEN to the maximum size for secondary
* fix warning of Signed-off-by
---

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1fbarray: fix duplicated fbarray file in secondarylib/librte_eal/common/include/rte_fbarray.h lib/librte_eal/linux/eal/eal_memalloc.c+14 -46 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchAnatoly Burakov
1/1R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [dpdk-dev] [PATCH v8 0/1] fbarray: fix duplicated fbarray file in secondary

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(-)
Signature · 1 line
2.17.1