get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 42682,
    "url": "http://patches.dpdk.org/api/patches/42682/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180710003623.1463-9-pablo.de.lara.guarch@intel.com/",
    "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": "<20180710003623.1463-9-pablo.de.lara.guarch@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180710003623.1463-9-pablo.de.lara.guarch@intel.com",
    "date": "2018-07-10T00:36:15",
    "name": "[v6,08/16] cryptodev: define value for unlimited sessions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6b8b6b6e467746c46dca1c329659efee7920b844",
    "submitter": {
        "id": 9,
        "url": "http://patches.dpdk.org/api/people/9/?format=api",
        "name": "De Lara Guarch, Pablo",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "delegate": {
        "id": 22,
        "url": "http://patches.dpdk.org/api/users/22/?format=api",
        "username": "pdelarag",
        "first_name": "Pablo",
        "last_name": "de Lara Guarch",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180710003623.1463-9-pablo.de.lara.guarch@intel.com/mbox/",
    "series": [
        {
            "id": 486,
            "url": "http://patches.dpdk.org/api/series/486/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=486",
            "date": "2018-07-10T00:36:07",
            "name": "Cryptodev API changes",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/486/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42682/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/42682/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 09FDE1B446;\n\tTue, 10 Jul 2018 10:42:25 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 5C2B61B446\n\tfor <dev@dpdk.org>; Tue, 10 Jul 2018 10:42:23 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t10 Jul 2018 01:42:23 -0700",
            "from silpixa00399466.ir.intel.com (HELO\n\tsilpixa00399466.ger.corp.intel.com) ([10.237.223.220])\n\tby orsmga007.jf.intel.com with ESMTP; 10 Jul 2018 01:42:20 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,333,1526367600\"; d=\"scan'208\";a=\"55358815\"",
        "From": "Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "To": "declan.doherty@intel.com, akhil.goyal@nxp.com,\n\tshally.verma@caviumnetworks.com, ravi1.kumar@amd.com,\n\tjerin.jacob@caviumnetworks.com, roy.fan.zhang@intel.com,\n\tfiona.trahe@intel.com, tdu@semihalf.com, jianjay.zhou@huawei.com",
        "Cc": "dev@dpdk.org,\n\tPablo de Lara <pablo.de.lara.guarch@intel.com>",
        "Date": "Tue, 10 Jul 2018 01:36:15 +0100",
        "Message-Id": "<20180710003623.1463-9-pablo.de.lara.guarch@intel.com>",
        "X-Mailer": "git-send-email 2.14.4",
        "In-Reply-To": "<20180710003623.1463-1-pablo.de.lara.guarch@intel.com>",
        "References": "<20180608220234.10170-1-pablo.de.lara.guarch@intel.com>\n\t<20180710003623.1463-1-pablo.de.lara.guarch@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v6 08/16] cryptodev: define value for unlimited\n\tsessions",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Currently, the info structure contains the maximum number\nof sessions that a device can manage.\nThis field was useful when the session mempool was created inside\neach device, but now it is created at the application level.\n\nMost PMDs do not have a limitation on the sessions managed,\nbut a few do, therefore this field must remain in the structure.\nHowever, a new value, 0, can be used to indicate that\na device does not have an actual maximum of sessions.\n\nSigned-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>\nAcked-by: Akhil Goyal <akhil.goyal@nxp.com>\n---\n app/test-crypto-perf/main.c            | 2 +-\n doc/guides/rel_notes/release_18_08.rst | 2 ++\n examples/ipsec-secgw/ipsec-secgw.c     | 2 +-\n lib/librte_cryptodev/rte_cryptodev.h   | 5 ++++-\n test/test/test_cryptodev.c             | 6 ++++--\n 5 files changed, 12 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c\nindex 74e2165a4..2181d0193 100644\n--- a/app/test-crypto-perf/main.c\n+++ b/app/test-crypto-perf/main.c\n@@ -172,7 +172,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,\n \t\t * A single session is required per queue pair\n \t\t * in each device\n \t\t */\n-\t\tif (dev_max_nb_sess < opts->nb_qps) {\n+\t\tif (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {\n \t\t\tRTE_LOG(ERR, USER1,\n \t\t\t\t\"Device does not support at least \"\n \t\t\t\t\"%u sessions\\n\", opts->nb_qps);\ndiff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst\nindex b5de4dd93..84c2636a6 100644\n--- a/doc/guides/rel_notes/release_18_08.rst\n+++ b/doc/guides/rel_notes/release_18_08.rst\n@@ -62,6 +62,8 @@ API Changes\n \n * cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``\n   has been replaced with field ``struct rte_device *device``.\n+  Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device\n+  supports an unlimited number of sessions.\n \n * compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is\n   replaced with the following more explicit flags:\ndiff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c\nindex 2582dcb6e..dacf323c9 100644\n--- a/examples/ipsec-secgw/ipsec-secgw.c\n+++ b/examples/ipsec-secgw/ipsec-secgw.c\n@@ -1441,7 +1441,7 @@ cryptodevs_init(void)\n \t\tdev_conf.nb_queue_pairs = qp;\n \n \t\tuint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;\n-\t\tif (dev_max_sess < (CDEV_MP_NB_OBJS / 2))\n+\t\tif (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))\n \t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\"Device does not support at least %u \"\n \t\t\t\t\"sessions\", CDEV_MP_NB_OBJS / 2);\ndiff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h\nindex 114c9fd6e..7989eb876 100644\n--- a/lib/librte_cryptodev/rte_cryptodev.h\n+++ b/lib/librte_cryptodev/rte_cryptodev.h\n@@ -349,7 +349,10 @@ struct rte_cryptodev_info {\n \n \tstruct {\n \t\tunsigned max_nb_sessions;\n-\t\t/**< Maximum number of sessions supported by device. */\n+\t\t/**< Maximum number of sessions supported by device.\n+\t\t * If 0, the device does not have any limitation in\n+\t\t * number of sessions that can be used.\n+\t\t */\n \t} sym;\n };\n \ndiff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c\nindex 0887c05af..877dc1658 100644\n--- a/test/test/test_cryptodev.c\n+++ b/test/test/test_cryptodev.c\n@@ -436,7 +436,8 @@ testsuite_setup(void)\n \t * Create mempool with maximum number of sessions * 2,\n \t * to include the session headers\n \t */\n-\tif (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {\n+\tif (info.sym.max_nb_sessions != 0 &&\n+\t\t\tinfo.sym.max_nb_sessions < MAX_NB_SESSIONS) {\n \t\tRTE_LOG(ERR, USER1, \"Device does not support \"\n \t\t\t\t\"at least %u sessions\\n\",\n \t\t\t\tMAX_NB_SESSIONS);\n@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)\n \t\tunsigned int session_size =\n \t\t\trte_cryptodev_sym_get_private_session_size(i);\n \n-\t\tif (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {\n+\t\tif (info.sym.max_nb_sessions != 0 &&\n+\t\t\t\tinfo.sym.max_nb_sessions < MAX_NB_SESSIONS) {\n \t\t\tRTE_LOG(ERR, USER1,\n \t\t\t\t\t\"Device does not support \"\n \t\t\t\t\t\"at least %u sessions\\n\",\n",
    "prefixes": [
        "v6",
        "08/16"
    ]
}