Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/105371/?format=api
http://patches.dpdk.org/api/patches/105371/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211223233907.181033-1-stephen@networkplumber.org/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20211223233907.181033-1-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20211223233907.181033-1-stephen@networkplumber.org", "date": "2021-12-23T23:39:07", "name": "[RFC] eal: support systemd service convention for runtime directory", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "93379d85dbe0fc5dece97d3cacf40b09ffa10870", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211223233907.181033-1-stephen@networkplumber.org/mbox/", "series": [ { "id": 21021, "url": "http://patches.dpdk.org/api/series/21021/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21021", "date": "2021-12-23T23:39:07", "name": "[RFC] eal: support systemd service convention for runtime directory", "version": 1, "mbox": "http://patches.dpdk.org/series/21021/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/105371/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/105371/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 62B39A00C5;\n\tFri, 24 Dec 2021 00:39:13 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E5E044068C;\n\tFri, 24 Dec 2021 00:39:12 +0100 (CET)", "from mail-pg1-f173.google.com (mail-pg1-f173.google.com\n [209.85.215.173])\n by mails.dpdk.org (Postfix) with ESMTP id 2A7FC4067B\n for <dev@dpdk.org>; Fri, 24 Dec 2021 00:39:11 +0100 (CET)", "by mail-pg1-f173.google.com with SMTP id l10so6150997pgm.7\n for <dev@dpdk.org>; Thu, 23 Dec 2021 15:39:10 -0800 (PST)", "from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199])\n by smtp.gmail.com with ESMTPSA id\n v12sm5696590pgc.13.2021.12.23.15.39.08\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 23 Dec 2021 15:39:09 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20210112.gappssmtp.com; s=20210112;\n h=from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=f+8B0eO8zQOApRJBZFD+qQGrKpgRL926r86mkpPcm/s=;\n b=ydvoE0C6ijWKmdSxzwlnFGHuCyNo8FWW15zuFFzPD4lX4TG0zHQIB5F5AG4o3ShNzp\n oqVubpzjHxxbwPVnID5Zb02nUqH79mnJsFF9ZHD+yBDwhPbFZGJKidZM+b1yZLBXO2xa\n kuD2WiU5IF1aivBdybwBFcPrF786yPkUv7sKB4I9ivyDZTbf1qEL266u/2P95eBKpHC3\n +dSC80T1F1TJlG+eubJsfhjVoouqEHPwwcjys0wWuETt2o/npPcJHR53VhUOJe4E4iFJ\n 3S36ehIrc6UfWInupza/ChzpI8aI9MH9uMbFNxhhWSACSxVJyaSRm8K0FFPZ3wEg7I94\n ZvPA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=f+8B0eO8zQOApRJBZFD+qQGrKpgRL926r86mkpPcm/s=;\n b=8PvmPRTP3R/gk9+R1B9UmNGyLX6QpR9V7Y7wq6HKBveTb2sum3Ys25N+0MTO0Y0uTQ\n W0A2xJGwmQe4a88CDkeACSduEUAXi0AFwSulBKbquvWYf+7oImFm9iHQoDLlIB+HOGNs\n eAHOYH/YU2SY88iVh0tWhswnevtcWZ034vJDNnKVefDKgBKrk0muuCWUQctF03piv5zV\n YcV/V/LkKWcOn0q++pLMNdd7l3OCYdGmSWNQfgN95VQQzadLb0EgUAS61hoJalyC0OFz\n 4n3wYSdgYKrnCyM5gBC7g5jnANO9paPfWDIYSpj8S60lALXBxhQJUHcfKmLIMOU5fjZ7\n k0Gg==", "X-Gm-Message-State": "AOAM532mzs1Pj0TUSFyiajzT813+CBw4iNwSA28sktpw68gmIDqL48D8\n +h4xcYpCkDq+YuGQLmdVqvAXkBoRYZmQmQ==", "X-Google-Smtp-Source": "\n ABdhPJwBtTnaWTZVfZXmUcoLpeCEYfwFEZuzSt7ZhfyVGoqWZHhanKCNNe5gJ/fSSYo8fgXqhxce5A==", "X-Received": "by 2002:a63:5d61:: with SMTP id o33mr3898367pgm.341.1640302749818;\n Thu, 23 Dec 2021 15:39:09 -0800 (PST)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>", "Subject": "[RFC] eal: support systemd service convention for runtime directory", "Date": "Thu, 23 Dec 2021 15:39:07 -0800", "Message-Id": "<20211223233907.181033-1-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.30.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Systemd.exec supports configuring the runtime directory of a service\nvia RuntimeDirectory=. This creates the directory with the necessary\npermissions which actual service may not have if running in container.\n\nThe change to DPDK is to look for the environment RUNTIME_DIRECTORY\nfirst and use that in preference to the fallback alternatives.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/eal/linux/eal.c | 23 ++++++++++++-----------\n 1 file changed, 12 insertions(+), 11 deletions(-)", "diff": "diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex 60b49248388e..e729c713b393 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -86,25 +86,26 @@ struct lcore_config lcore_config[RTE_MAX_LCORE];\n /* used by rte_rdtsc() */\n int rte_cycles_vmware_tsc_map;\n \n-static const char *default_runtime_dir = \"/var/run\";\n-\n int\n eal_create_runtime_dir(void)\n {\n-\tconst char *directory = default_runtime_dir;\n-\tconst char *xdg_runtime_dir = getenv(\"XDG_RUNTIME_DIR\");\n-\tconst char *fallback = \"/tmp\";\n+\tconst char *directory;\n \tchar run_dir[PATH_MAX];\n \tchar tmp[PATH_MAX];\n \tint ret;\n \n-\tif (getuid() != 0) {\n-\t\t/* try XDG path first, fall back to /tmp */\n-\t\tif (xdg_runtime_dir != NULL)\n-\t\t\tdirectory = xdg_runtime_dir;\n-\t\telse\n-\t\t\tdirectory = fallback;\n+\t/* from RuntimeDirectory= see systemd.exec */\n+\tdirectory = getenv(\"RUNTIME_DIRECTORY\");\n+\tif (directory == NULL) {\n+\t\tif (getuid() == 0)\n+\t\t\tdirectory = \"/var/run\";\n+\t\telse {\n+\t\t\tdirectory = getenv(\"XDG_RUNTIME_DIR\");\n+\t\t\tif (directory == NULL)\n+\t\t\t\tdirectory = \"/tmp\";\n+\t\t}\n \t}\n+\n \t/* create DPDK subdirectory under runtime dir */\n \tret = snprintf(tmp, sizeof(tmp), \"%s/dpdk\", directory);\n \tif (ret < 0 || ret == sizeof(tmp)) {\n", "prefixes": [ "RFC" ] }{ "id": 105371, "url": "