get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 113576,
    "url": "https://patches.dpdk.org/api/patches/113576/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220630114527.2392332-1-radu.nicolau@intel.com/",
    "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": "<20220630114527.2392332-1-radu.nicolau@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220630114527.2392332-1-radu.nicolau@intel.com",
    "date": "2022-06-30T11:45:27",
    "name": "[v2] examples/ipsec-secgw: fix fallback session create",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "4c1e68e80ff34e2706ea49d7be21c7d8bb6b2588",
    "submitter": {
        "id": 743,
        "url": "https://patches.dpdk.org/api/people/743/?format=api",
        "name": "Radu Nicolau",
        "email": "radu.nicolau@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "https://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220630114527.2392332-1-radu.nicolau@intel.com/mbox/",
    "series": [
        {
            "id": 23844,
            "url": "https://patches.dpdk.org/api/series/23844/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=23844",
            "date": "2022-06-30T11:45:27",
            "name": "[v2] examples/ipsec-secgw: fix fallback session create",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/23844/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/113576/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/113576/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 41136A00C4;\n\tThu, 30 Jun 2022 13:45:42 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3028B40694;\n\tThu, 30 Jun 2022 13:45:42 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 2D11E400EF\n for <dev@dpdk.org>; Thu, 30 Jun 2022 13:45:40 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 30 Jun 2022 04:45:39 -0700",
            "from silpixa00400884.ir.intel.com ([10.243.22.82])\n by fmsmga005.fm.intel.com with ESMTP; 30 Jun 2022 04:45:37 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1656589540; x=1688125540;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=fE8TxZfFC/qFh5ErGtu3Ylug/Mryj9i2o8qyi4obhf8=;\n b=ZjNTmLGv8xh13BTArgVvBS/2xadRk7PJbC6KK8DiMrGTRmvatIhg95bH\n ErjaeNDaGPGX5Jy1GPCyY12+4acUO9qeLPpv/zbX5FR0XinVZ6iZqQpkf\n FemadyWZPbA0YuOuhpNB05Id2T374AewrKVrRll5ApD6f7d0Hy5gBOq5J\n p/1vPuIR54SF7MT80qd4T4mOSbxD4fpu/eqGUNJj2cfG1SyUaoQ7K+wb4\n +2vcrCcSXZFTcHG8Vh6KqOoXdMQqPX/Hhb7lxE/0YPZYEjqN4HquGqWQy\n qIBqDWMqAzWzcImIfqVMjEzsNXF9UOex1Fsgv2X3MvJDm2S3havL8E5TW A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10393\"; a=\"265359553\"",
            "E=Sophos;i=\"5.92,234,1650956400\"; d=\"scan'208\";a=\"265359553\"",
            "E=Sophos;i=\"5.92,234,1650956400\"; d=\"scan'208\";a=\"918017024\""
        ],
        "X-ExtLoop1": "1",
        "From": "Radu Nicolau <radu.nicolau@intel.com>",
        "To": "Radu Nicolau <radu.nicolau@intel.com>,\n\tAkhil Goyal <gakhil@marvell.com>",
        "Cc": "dev@dpdk.org, roy.fan.zhang@intel.com, vladimir.medvedkin@intel.com,\n vfialko@marvell.com",
        "Subject": "[PATCH v2] examples/ipsec-secgw: fix fallback session create",
        "Date": "Thu, 30 Jun 2022 12:45:27 +0100",
        "Message-Id": "<20220630114527.2392332-1-radu.nicolau@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220630100010.2364032-1-radu.nicolau@intel.com>",
        "References": "<20220630100010.2364032-1-radu.nicolau@intel.com>",
        "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": "Fix fallback session create for inline sessions.\n\nFixes: a8ade12123c3 (\"examples/ipsec-secgw: create lookaside sessions at init\")\nCc: vfialko@marvell.com\n\nSigned-off-by: Radu Nicolau <radu.nicolau@intel.com>\n---\nv2: create the session rather than just check if it's NULLL\n\n examples/ipsec-secgw/sa.c | 23 ++++++++++++++++-------\n 1 file changed, 16 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c\nindex 5d9cec97db..d081cd0e2c 100644\n--- a/examples/ipsec-secgw/sa.c\n+++ b/examples/ipsec-secgw/sa.c\n@@ -1533,7 +1533,8 @@ fill_ipsec_session(struct rte_ipsec_session *ss, struct rte_ipsec_sa *sa)\n  * Initialise related rte_ipsec_sa object.\n  */\n static int\n-ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)\n+ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size,\n+\t\tstruct socket_ctx *skt_ctx, struct ipsec_ctx *ips_ctx[])\n {\n \tint rc;\n \tstruct rte_ipsec_sa_prm prm;\n@@ -1572,8 +1573,15 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)\n \t\treturn rc;\n \n \t/* init inline fallback processing session */\n-\tif (lsa->fallback_sessions == 1)\n-\t\trc = fill_ipsec_session(ipsec_get_fallback_session(lsa), sa);\n+\tif (lsa->fallback_sessions == 1) {\n+\t\tstruct rte_ipsec_session *ipfs = ipsec_get_fallback_session(lsa);\n+\t\tif (ipfs->security.ses == NULL) {\n+\t\t\trc = create_lookaside_session(ips_ctx, skt_ctx, lsa, ipfs);\n+\t\t\tif (rc != 0)\n+\t\t\t\treturn rc;\n+\t\t}\n+\t\trc = fill_ipsec_session(ipfs, sa);\n+\t}\n \n \treturn rc;\n }\n@@ -1583,7 +1591,8 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)\n  * one per session.\n  */\n static int\n-ipsec_satbl_init(struct sa_ctx *ctx, uint32_t nb_ent, int32_t socket)\n+ipsec_satbl_init(struct sa_ctx *ctx, uint32_t nb_ent, int32_t socket,\n+\t\tstruct socket_ctx *skt_ctx, struct ipsec_ctx *ips_ctx[])\n {\n \tint32_t rc, sz;\n \tuint32_t i, idx;\n@@ -1621,7 +1630,7 @@ ipsec_satbl_init(struct sa_ctx *ctx, uint32_t nb_ent, int32_t socket)\n \t\tsa = (struct rte_ipsec_sa *)((uintptr_t)ctx->satbl + sz * i);\n \t\tlsa = ctx->sa + idx;\n \n-\t\trc = ipsec_sa_init(lsa, sa, sz);\n+\t\trc = ipsec_sa_init(lsa, sa, sz, skt_ctx, ips_ctx);\n \t}\n \n \treturn rc;\n@@ -1700,7 +1709,7 @@ sa_init(struct socket_ctx *ctx, int32_t socket_id,\n \n \t\tif (app_sa_prm.enable != 0) {\n \t\t\trc = ipsec_satbl_init(ctx->sa_in, nb_sa_in,\n-\t\t\t\tsocket_id);\n+\t\t\t\tsocket_id, ctx, ipsec_ctx);\n \t\t\tif (rc != 0)\n \t\t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\t\"failed to init inbound SAs\\n\");\n@@ -1722,7 +1731,7 @@ sa_init(struct socket_ctx *ctx, int32_t socket_id,\n \n \t\tif (app_sa_prm.enable != 0) {\n \t\t\trc = ipsec_satbl_init(ctx->sa_out, nb_sa_out,\n-\t\t\t\tsocket_id);\n+\t\t\t\tsocket_id, ctx, ipsec_ctx);\n \t\t\tif (rc != 0)\n \t\t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\t\"failed to init outbound SAs\\n\");\n",
    "prefixes": [
        "v2"
    ]
}