get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/138134/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 138134,
    "url": "https://patches.dpdk.org/api/patches/138134/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240308185401.150651-1-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "https://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": "<20240308185401.150651-1-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240308185401.150651-1-stephen@networkplumber.org",
    "date": "2024-03-08T18:54:01",
    "name": "[RFC] eal: increase the number of availble file descriptors for MP",
    "commit_ref": null,
    "pull_url": null,
    "state": "deferred",
    "archived": false,
    "hash": "f885bd1a0d3b9aaa099e4bd6c0396774b54cebcd",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240308185401.150651-1-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31445,
            "url": "https://patches.dpdk.org/api/series/31445/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31445",
            "date": "2024-03-08T18:54:01",
            "name": "[RFC] eal: increase the number of availble file descriptors for MP",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/31445/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/138134/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/138134/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 54B7A43C27;\n\tFri,  8 Mar 2024 19:54:14 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 230CB40291;\n\tFri,  8 Mar 2024 19:54:14 +0100 (CET)",
            "from mail-pl1-f171.google.com (mail-pl1-f171.google.com\n [209.85.214.171])\n by mails.dpdk.org (Postfix) with ESMTP id 186B140274\n for <dev@dpdk.org>; Fri,  8 Mar 2024 19:54:11 +0100 (CET)",
            "by mail-pl1-f171.google.com with SMTP id\n d9443c01a7336-1dc49b00bdbso8880955ad.3\n for <dev@dpdk.org>; Fri, 08 Mar 2024 10:54:11 -0800 (PST)",
            "from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])\n by smtp.gmail.com with ESMTPSA id\n jb5-20020a170903258500b001dcc29b985csm16649672plb.134.2024.03.08.10.54.10\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 08 Mar 2024 10:54:10 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709924051;\n x=1710528851; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=OY6aA25f7jYng9ic0KvwPD2F/MMEGQBFE/PrMqVH3cU=;\n b=UkbLeI1QuBIhflzQIePyZbE+xpUfl0jCmXzUiaUtp87XvVgTrSkf5tyvUQNIAjo+w0\n ZCloNhw1dIOnmi7yYBLMMUqjBJ/7uOA3PGHbfVBnKRpeRH8r9GUkEy9BWBULBFrybvi4\n +xMJDm7k3D4jffjClv6ss9oM2kZNWrsjyS+9KvJra1X+JjaVwRnYbPaLhrf1HKUlDmTI\n 9ETQPA2t498g6IdFUaVmrqaYNZN8jyRLD01KLb27LkYHNmwdsimKVFl1pvXBN9ITLy+E\n bn0iOnKMHueqLqgU0INs10JZ1RSKcm+ofpsKqdjxCVVaryPzNsz16mKo46HAEWdEO1M6\n 2P2w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1709924051; x=1710528851;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=OY6aA25f7jYng9ic0KvwPD2F/MMEGQBFE/PrMqVH3cU=;\n b=BO/2APultCl2MEbmsOw0m32ztcCVarnwEGhsmBdfqJlyltsixG/IOn3+NhGtA4SEzU\n wZEeVyiUbfdeBXmnqlNEdlaUd2gylD6u+MJOw8ag1mJr1lV0JDfNdcjjdjGlohmD7RYi\n L6NmNy01qBFrRC3t/zOtbRPnxvHlh8skjne11m0EXkvXHqpDnLisTjKX+qdXKXuGq1A+\n RKScEenBqWou2GDLW5GkZdecoXQ0joIIq6SbZ1wTmTDC+Xkb8Kcn/395wZMZZTc729ms\n zdrTd3MDwfrUjYMDgGk6T26pbuu2WJtJDz1pe9y+LDlEgY7Myybt9OX3GtOf6DmurZqD\n bNgQ==",
        "X-Gm-Message-State": "AOJu0YyllvcXRfLbXlC3EEcDI++CCFbn4XARjmcIIkgbf62wkMiR1qgE\n 0C+Xb1AD6ZjGcdNFukNvcy7mLDJaQbyPy1cgfugENU8F/+QtRb9GaGNYTGmOgvsUWepmRHG6lG+\n hP80=",
        "X-Google-Smtp-Source": "\n AGHT+IFgzUPNyerf+A69xSlb3q5Q+MGvl3dPR3OBMIVBPupFzM9xsfbrmTNUzPLJHGnS+dQXb3IacA==",
        "X-Received": "by 2002:a17:902:7847:b0:1dd:6174:c63e with SMTP id\n e7-20020a170902784700b001dd6174c63emr3525892pln.54.1709924050964;\n Fri, 08 Mar 2024 10:54:10 -0800 (PST)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Anatoly Burakov <anatoly.burakov@intel.com>",
        "Subject": "[RFC] eal: increase the number of availble file descriptors for MP",
        "Date": "Fri,  8 Mar 2024 10:54:01 -0800",
        "Message-ID": "<20240308185401.150651-1-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "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": "The current limit of file descriptors is too low, it should have\nbeen set to the maximum possible to send across an unix domain\nsocket.\n\nThis is an attempt to allow increasing it without breaking ABI.\nBut in the process it exposes what is broken about how symbol\nversions are checked in check-symbol-maps.sh. That script is\nbroken in that it won't allow adding a backwards compatiable\nversion hook like this.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/eal/common/eal_common_proc.c | 118 ++++++++++++++++++++++++++-----\n lib/eal/common/meson.build       |   2 +\n lib/eal/include/rte_eal.h        |  13 +++-\n lib/eal/version.map              |   9 +++\n 4 files changed, 125 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c\nindex d24093937c1d..c08113a8d9e0 100644\n--- a/lib/eal/common/eal_common_proc.c\n+++ b/lib/eal/common/eal_common_proc.c\n@@ -27,6 +27,7 @@\n #include <rte_lcore.h>\n #include <rte_log.h>\n #include <rte_thread.h>\n+#include <rte_function_versioning.h>\n \n #include \"eal_memcfg.h\"\n #include \"eal_private.h\"\n@@ -796,7 +797,7 @@ mp_send(struct rte_mp_msg *msg, const char *peer, int type)\n }\n \n static int\n-check_input(const struct rte_mp_msg *msg)\n+check_input(const struct rte_mp_msg *msg, int max_fd)\n {\n \tif (msg == NULL) {\n \t\tEAL_LOG(ERR, \"Msg cannot be NULL\");\n@@ -825,9 +826,8 @@ check_input(const struct rte_mp_msg *msg)\n \t\treturn -1;\n \t}\n \n-\tif (msg->num_fds > RTE_MP_MAX_FD_NUM) {\n-\t\tEAL_LOG(ERR, \"Cannot send more than %d FDs\",\n-\t\t\tRTE_MP_MAX_FD_NUM);\n+\tif (msg->num_fds > max_fd) {\n+\t\tEAL_LOG(ERR, \"Cannot send more than %d FDs\", max_fd);\n \t\trte_errno = E2BIG;\n \t\treturn -1;\n \t}\n@@ -835,13 +835,13 @@ check_input(const struct rte_mp_msg *msg)\n \treturn 0;\n }\n \n-int\n-rte_mp_sendmsg(struct rte_mp_msg *msg)\n+static int\n+mp_sendmsg(struct rte_mp_msg *msg, int max_fd)\n {\n \tconst struct internal_config *internal_conf =\n \t\teal_get_internal_configuration();\n \n-\tif (check_input(msg) != 0)\n+\tif (check_input(msg, max_fd) != 0)\n \t\treturn -1;\n \n \tif (internal_conf->no_shconf) {\n@@ -854,6 +854,24 @@ rte_mp_sendmsg(struct rte_mp_msg *msg)\n \treturn mp_send(msg, NULL, MP_MSG);\n }\n \n+int rte_mp_sendmsg_V23(struct rte_mp_old_msg *msg);\n+int rte_mp_sendmsg_V24(struct rte_mp_msg *msg);\n+\n+int\n+rte_mp_sendmsg_V23(struct rte_mp_old_msg *omsg)\n+{\n+\treturn mp_sendmsg((struct rte_mp_msg *)omsg, RTE_MP_MAX_OLD_FD_NUM);\n+}\n+VERSION_SYMBOL(rte_mp_sendmsg, _V23, 23);\n+\n+int\n+rte_mp_sendmsg_V24(struct rte_mp_msg *msg)\n+{\n+\treturn mp_sendmsg(msg, RTE_MP_MAX_FD_NUM);\n+}\n+BIND_DEFAULT_SYMBOL(rte_mp_sendmsg, _V24, 24);\n+MAP_STATIC_SYMBOL(int rte_mp_sendmsg(struct rte_mp_msg *msg), rte_mp_sendmsg_V24);\n+\n static int\n mp_request_async(const char *dst, struct rte_mp_msg *req,\n \t\tstruct async_request_param *param, const struct timespec *ts)\n@@ -988,9 +1006,9 @@ mp_request_sync(const char *dst, struct rte_mp_msg *req,\n \treturn 0;\n }\n \n-int\n-rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n-\t\tconst struct timespec *ts)\n+static int\n+__rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n+\t\t      const struct timespec *ts, int max_fd)\n {\n \tint dir_fd, ret = -1;\n \tDIR *mp_dir;\n@@ -1005,7 +1023,7 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n \treply->nb_received = 0;\n \treply->msgs = NULL;\n \n-\tif (check_input(req) != 0)\n+\tif (check_input(req, max_fd) != 0)\n \t\tgoto end;\n \n \tif (internal_conf->no_shconf) {\n@@ -1085,9 +1103,34 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n \treturn ret;\n }\n \n+int rte_mp_request_sync_V23(struct rte_mp_old_msg *req, struct rte_mp_reply *reply,\n+\t\t\t    const struct timespec *ts);\n+int rte_mp_request_sync_V24(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n+\t\t\t    const struct timespec *ts);\n+\n+\n+int\n+rte_mp_request_sync_V23(struct rte_mp_old_msg *req, struct rte_mp_reply *reply,\n+\t\t    const struct timespec *ts)\n+{\n+\treturn __rte_mp_request_sync((struct rte_mp_msg *)req, reply, ts, RTE_MP_MAX_OLD_FD_NUM);\n+}\n+VERSION_SYMBOL(rte_mp_request_sync, _V23, 23);\n+\n int\n-rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,\n-\t\trte_mp_async_reply_t clb)\n+rte_mp_request_sync_V24(struct rte_mp_msg *req, struct rte_mp_reply *reply,\n+\t\t\tconst struct timespec *ts)\n+{\n+\treturn __rte_mp_request_sync(req, reply, ts, RTE_MP_MAX_FD_NUM);\n+}\n+BIND_DEFAULT_SYMBOL(rte_mp_request_sync, _V24, 24);\n+MAP_STATIC_SYMBOL(int rte_mp_request_sync(struct rte_mp_msg *req, \\\n+\t\t\t\t\t  struct rte_mp_reply *reply, \\\n+\t\t\t\t\t  const struct timespec *ts), rte_mp_request_sync_V24);\n+\n+static int\n+__rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,\n+\t\t       rte_mp_async_reply_t clb, int max_fd)\n {\n \tstruct rte_mp_msg *copy;\n \tstruct pending_request *dummy;\n@@ -1104,7 +1147,7 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,\n \n \tEAL_LOG(DEBUG, \"request: %s\", req->name);\n \n-\tif (check_input(req) != 0)\n+\tif (check_input(req, max_fd) != 0)\n \t\treturn -1;\n \n \tif (internal_conf->no_shconf) {\n@@ -1237,14 +1280,38 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,\n \treturn -1;\n }\n \n+int rte_mp_request_async_V23(struct rte_mp_old_msg *req, const struct timespec *ts,\n+\t\t\t     rte_mp_async_reply_t clb);\n+int rte_mp_request_async_V24(struct rte_mp_msg *req, const struct timespec *ts,\n+\t\t\t     rte_mp_async_reply_t clb);\n+\n int\n-rte_mp_reply(struct rte_mp_msg *msg, const char *peer)\n+rte_mp_request_async_V23(struct rte_mp_old_msg *req, const struct timespec *ts,\n+\t\t\t rte_mp_async_reply_t clb)\n+{\n+\treturn __rte_mp_request_async((struct rte_mp_msg *)req, ts, clb, RTE_MP_MAX_OLD_FD_NUM);\n+}\n+VERSION_SYMBOL(rte_mp_request_async, _V23, 23);\n+\n+int\n+rte_mp_request_async_V24(struct rte_mp_msg *req, const struct timespec *ts,\n+\t\t\t rte_mp_async_reply_t clb)\n+{\n+\treturn __rte_mp_request_async(req, ts, clb, RTE_MP_MAX_FD_NUM);\n+}\n+BIND_DEFAULT_SYMBOL(rte_mp_request_async, _V24, 24);\n+MAP_STATIC_SYMBOL(int rte_mp_request_async(struct rte_mp_msg *req,\t\\\n+\t\t\t\t\t   const struct timespec *ts,\t\\\n+\t\t\t\t\t   rte_mp_async_reply_t clb), rte_mp_request_async_V24);\n+\n+static int\n+mp_reply(struct rte_mp_msg *msg, const char *peer, int max_fd)\n {\n \tEAL_LOG(DEBUG, \"reply: %s\", msg->name);\n \tconst struct internal_config *internal_conf =\n \t\teal_get_internal_configuration();\n \n-\tif (check_input(msg) != 0)\n+\tif (check_input(msg, max_fd) != 0)\n \t\treturn -1;\n \n \tif (peer == NULL) {\n@@ -1261,6 +1328,25 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)\n \treturn mp_send(msg, peer, MP_REP);\n }\n \n+int rte_mp_reply_V23(struct rte_mp_old_msg *msg, const char *peer);\n+int rte_mp_reply_V24(struct rte_mp_msg *msg, const char *peer);\n+\n+int\n+rte_mp_reply_V23(struct rte_mp_old_msg *msg, const char *peer)\n+{\n+\treturn mp_reply((struct rte_mp_msg *)msg, peer, RTE_MP_MAX_OLD_FD_NUM);\n+}\n+VERSION_SYMBOL(rte_mp_reply, _V23, 23);\n+\n+int\n+rte_mp_reply_V24(struct rte_mp_msg *msg, const char *peer)\n+{\n+\treturn mp_reply(msg, peer, RTE_MP_MAX_FD_NUM);\n+}\n+BIND_DEFAULT_SYMBOL(rte_mp_reply, _V24, 24);\n+MAP_STATIC_SYMBOL(int rte_mp_reply(struct rte_mp_msg *msg, const char *peer), rte_mp_reply_V24);\n+\n+\n /* Internally, the status of the mp feature is represented as a three-state:\n  * - \"unknown\" as long as no secondary process attached to a primary process\n  *   and there was no call to rte_mp_disable yet,\ndiff --git a/lib/eal/common/meson.build b/lib/eal/common/meson.build\nindex 22a626ba6fc7..3faf0c20e798 100644\n--- a/lib/eal/common/meson.build\n+++ b/lib/eal/common/meson.build\n@@ -3,6 +3,8 @@\n \n includes += include_directories('.')\n \n+use_function_versioning = true\n+\n cflags += [ '-DABI_VERSION=\"@0@\"'.format(abi_version) ]\n \n sources += files(\ndiff --git a/lib/eal/include/rte_eal.h b/lib/eal/include/rte_eal.h\nindex c2256f832e51..0d0761c50409 100644\n--- a/lib/eal/include/rte_eal.h\n+++ b/lib/eal/include/rte_eal.h\n@@ -155,9 +155,10 @@ int rte_eal_primary_proc_alive(const char *config_file_path);\n  */\n bool rte_mp_disable(void);\n \n-#define RTE_MP_MAX_FD_NUM\t8    /* The max amount of fds */\n+#define RTE_MP_MAX_FD_NUM\t253  /* The max number of fds (SCM_MAX_FD) */\n #define RTE_MP_MAX_NAME_LEN\t64   /* The max length of action name */\n #define RTE_MP_MAX_PARAM_LEN\t256  /* The max length of param */\n+\n struct rte_mp_msg {\n \tchar name[RTE_MP_MAX_NAME_LEN];\n \tint len_param;\n@@ -166,6 +167,16 @@ struct rte_mp_msg {\n \tint fds[RTE_MP_MAX_FD_NUM];\n };\n \n+/* Legacy API version */\n+#define RTE_MP_MAX_OLD_FD_NUM\t8    /* The legacy limit on fds */\n+struct rte_mp_old_msg {\n+\tchar name[RTE_MP_MAX_NAME_LEN];\n+\tint len_param;\n+\tint num_fds;\n+\tuint8_t param[RTE_MP_MAX_PARAM_LEN];\n+\tint fds[RTE_MP_MAX_OLD_FD_NUM];\n+};\n+\n struct rte_mp_reply {\n \tint nb_sent;\n \tint nb_received;\ndiff --git a/lib/eal/version.map b/lib/eal/version.map\nindex c06ceaad5097..264ff2d0818b 100644\n--- a/lib/eal/version.map\n+++ b/lib/eal/version.map\n@@ -344,6 +344,15 @@ DPDK_24 {\n \tlocal: *;\n };\n \n+DPDK_23 {\n+\tglobal:\n+\n+\trte_mp_reply;\n+\trte_mp_request_async;\n+\trte_mp_request_sync;\n+\trte_mp_sendmsg;\n+} DPDK_24;\n+\n EXPERIMENTAL {\n \tglobal:\n \n",
    "prefixes": [
        "RFC"
    ]
}