get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 98947,
    "url": "https://patches.dpdk.org/api/patches/98947/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210915163001.26859-4-ndabilpuram@marvell.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": "<20210915163001.26859-4-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210915163001.26859-4-ndabilpuram@marvell.com",
    "date": "2021-09-15T16:30:01",
    "name": "[v6,3/3] examples/ipsec-secgw: update event mode inline path",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "de29a3e4763d7c8948dc115259bd67df2911b449",
    "submitter": {
        "id": 1202,
        "url": "https://patches.dpdk.org/api/people/1202/?format=api",
        "name": "Nithin Dabilpuram",
        "email": "ndabilpuram@marvell.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/20210915163001.26859-4-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 18945,
            "url": "https://patches.dpdk.org/api/series/18945/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18945",
            "date": "2021-09-15T16:29:58",
            "name": "security: Improve inline fast path routines",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/18945/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/98947/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/98947/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 40035A0C41;\n\tWed, 15 Sep 2021 18:30:43 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 682DE411C3;\n\tWed, 15 Sep 2021 18:30:32 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 399E04014F\n for <dev@dpdk.org>; Wed, 15 Sep 2021 18:30:28 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id\n 18FAZI8u024632;\n Wed, 15 Sep 2021 09:30:27 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 3b3f6y19m3-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Wed, 15 Sep 2021 09:30:27 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Wed, 15 Sep 2021 09:30:25 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Wed, 15 Sep 2021 09:30:25 -0700",
            "from hyd1588t430.marvell.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id 5ADC25B6956;\n Wed, 15 Sep 2021 09:30:21 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-type; s=pfpt0220; bh=8epGlKyUq4LEHH39ZfYX+tBx2e3brGauomOVHCtL7bY=;\n b=kL5+dg3NcYv88lvlNkWhEB9Npe4qZge0Ot/m/vBlKFRHoHBrBeL7H8PXFEQdP6YEAXl+\n DCxf+hoZzI/OadioTJZlhOOaW5N98sSr9xtJr4EoxKQ3Q8U0UnUjlRttQSYI8sQHeX6F\n 40RSJNSPowR6CfOyLR15rIWdQyHkN9U9k4eR5fYtGZDyyWINQKcaJkSpCHup1J4eKmZ2\n y6HU8DqC7wUbqKXsRFlTuNk2BrNQbJzTtctHZ1U1boIAw3swBIEeeO2tHLcJj2dAoRoL\n 3Q6o5mmDjg8nGkTVrID/xaR5XcdXG0IIHc/gpbKMpqXx2m0HGueGv9x1j0qlnmA0h1JA AQ==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "<konstantin.ananyev@intel.com>, <jerinj@marvell.com>,\n <gakhil@marvell.com>,\n <roy.fan.zhang@intel.com>, <hemant.agrawal@nxp.com>, <matan@nvidia.com>",
        "CC": "<ndabilpuram@marvell.com>, <dev@dpdk.org>, <ferruh.yigit@intel.com>,\n <radu.nicolau@intel.com>, <olivier.matz@6wind.com>, <g.singh@nxp.com>,\n <declan.doherty@intel.com>, <jiawenwu@trustnetic.com>",
        "Date": "Wed, 15 Sep 2021 22:00:01 +0530",
        "Message-ID": "<20210915163001.26859-4-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20210915163001.26859-1-ndabilpuram@marvell.com>",
        "References": "<20210624102848.3878788-1-gakhil@marvell.com>\n <20210915163001.26859-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "gnAPZjkuq8AXXZ078NtbCSfOq-TTmukH",
        "X-Proofpoint-ORIG-GUID": "gnAPZjkuq8AXXZ078NtbCSfOq-TTmukH",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-09-15_04,2021-09-15_01,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH v6 3/3] examples/ipsec-secgw: update event mode\n inline path",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Update mbuf.l2_len with L2 header size for outbound\ninline processing.\n\nThis patch also fixes a bug in arg parsing.\n\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\nAcked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\nAcked-by: Akhil Goyal <gakhil@marvell.com>\n---\n examples/ipsec-secgw/ipsec-secgw.c  |  2 ++\n examples/ipsec-secgw/ipsec_worker.c | 41 ++++++++++++++++++++++++-------------\n 2 files changed, 29 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c\nindex f252d34..7ad94cb 100644\n--- a/examples/ipsec-secgw/ipsec-secgw.c\n+++ b/examples/ipsec-secgw/ipsec-secgw.c\n@@ -1495,6 +1495,8 @@ parse_portmask(const char *portmask)\n \tchar *end = NULL;\n \tunsigned long pm;\n \n+\terrno = 0;\n+\n \t/* parse hexadecimal string */\n \tpm = strtoul(portmask, &end, 16);\n \tif ((portmask[0] == '\\0') || (end == NULL) || (*end != '\\0'))\ndiff --git a/examples/ipsec-secgw/ipsec_worker.c b/examples/ipsec-secgw/ipsec_worker.c\nindex 647e22d..c545497 100644\n--- a/examples/ipsec-secgw/ipsec_worker.c\n+++ b/examples/ipsec-secgw/ipsec_worker.c\n@@ -12,6 +12,11 @@\n #include \"ipsec-secgw.h\"\n #include \"ipsec_worker.h\"\n \n+struct port_drv_mode_data {\n+\tstruct rte_security_session *sess;\n+\tstruct rte_security_ctx *ctx;\n+};\n+\n static inline enum pkt_type\n process_ipsec_get_pkt_type(struct rte_mbuf *pkt, uint8_t **nlp)\n {\n@@ -60,7 +65,8 @@ ipsec_event_pre_forward(struct rte_mbuf *m, unsigned int port_id)\n \n static inline void\n prepare_out_sessions_tbl(struct sa_ctx *sa_out,\n-\t\tstruct rte_security_session **sess_tbl, uint16_t size)\n+\t\t\t struct port_drv_mode_data *data,\n+\t\t\t uint16_t size)\n {\n \tstruct rte_ipsec_session *pri_sess;\n \tstruct ipsec_sa *sa;\n@@ -95,9 +101,10 @@ prepare_out_sessions_tbl(struct sa_ctx *sa_out,\n \t\t}\n \n \t\t/* Use only first inline session found for a given port */\n-\t\tif (sess_tbl[sa->portid])\n+\t\tif (data[sa->portid].sess)\n \t\t\tcontinue;\n-\t\tsess_tbl[sa->portid] = pri_sess->security.ses;\n+\t\tdata[sa->portid].sess = pri_sess->security.ses;\n+\t\tdata[sa->portid].ctx = pri_sess->security.ctx;\n \t}\n }\n \n@@ -356,9 +363,8 @@ process_ipsec_ev_outbound(struct ipsec_ctx *ctx, struct route_table *rt,\n \t\tgoto drop_pkt_and_exit;\n \t}\n \n-\tif (sess->security.ol_flags & RTE_SECURITY_TX_OLOAD_NEED_MDATA)\n-\t\t*(struct rte_security_session **)rte_security_dynfield(pkt) =\n-\t\t\t\tsess->security.ses;\n+\trte_security_set_pkt_metadata(sess->security.ctx,\n+\t\t\t\t      sess->security.ses, pkt, NULL);\n \n \t/* Mark the packet for Tx security offload */\n \tpkt->ol_flags |= PKT_TX_SEC_OFFLOAD;\n@@ -367,6 +373,9 @@ process_ipsec_ev_outbound(struct ipsec_ctx *ctx, struct route_table *rt,\n \tport_id = sa->portid;\n \n send_pkt:\n+\t/* Provide L2 len for Outbound processing */\n+\tpkt->l2_len = RTE_ETHER_HDR_LEN;\n+\n \t/* Update mac addresses */\n \tupdate_mac_addrs(pkt, port_id);\n \n@@ -398,7 +407,7 @@ static void\n ipsec_wrkr_non_burst_int_port_drv_mode(struct eh_event_link_info *links,\n \t\tuint8_t nb_links)\n {\n-\tstruct rte_security_session *sess_tbl[RTE_MAX_ETHPORTS] = { NULL };\n+\tstruct port_drv_mode_data data[RTE_MAX_ETHPORTS];\n \tunsigned int nb_rx = 0;\n \tstruct rte_mbuf *pkt;\n \tstruct rte_event ev;\n@@ -412,6 +421,8 @@ ipsec_wrkr_non_burst_int_port_drv_mode(struct eh_event_link_info *links,\n \t\treturn;\n \t}\n \n+\tmemset(&data, 0, sizeof(struct port_drv_mode_data));\n+\n \t/* Get core ID */\n \tlcore_id = rte_lcore_id();\n \n@@ -422,8 +433,8 @@ ipsec_wrkr_non_burst_int_port_drv_mode(struct eh_event_link_info *links,\n \t * Prepare security sessions table. In outbound driver mode\n \t * we always use first session configured for a given port\n \t */\n-\tprepare_out_sessions_tbl(socket_ctx[socket_id].sa_out, sess_tbl,\n-\t\t\tRTE_MAX_ETHPORTS);\n+\tprepare_out_sessions_tbl(socket_ctx[socket_id].sa_out, data,\n+\t\t\t\t RTE_MAX_ETHPORTS);\n \n \tRTE_LOG(INFO, IPSEC,\n \t\t\"Launching event mode worker (non-burst - Tx internal port - \"\n@@ -460,19 +471,21 @@ ipsec_wrkr_non_burst_int_port_drv_mode(struct eh_event_link_info *links,\n \n \t\tif (!is_unprotected_port(port_id)) {\n \n-\t\t\tif (unlikely(!sess_tbl[port_id])) {\n+\t\t\tif (unlikely(!data[port_id].sess)) {\n \t\t\t\trte_pktmbuf_free(pkt);\n \t\t\t\tcontinue;\n \t\t\t}\n \n \t\t\t/* Save security session */\n-\t\t\tif (rte_security_dynfield_is_registered())\n-\t\t\t\t*(struct rte_security_session **)\n-\t\t\t\t\trte_security_dynfield(pkt) =\n-\t\t\t\t\t\tsess_tbl[port_id];\n+\t\t\trte_security_set_pkt_metadata(data[port_id].ctx,\n+\t\t\t\t\t\t      data[port_id].sess, pkt,\n+\t\t\t\t\t\t      NULL);\n \n \t\t\t/* Mark the packet for Tx security offload */\n \t\t\tpkt->ol_flags |= PKT_TX_SEC_OFFLOAD;\n+\n+\t\t\t/* Provide L2 len for Outbound processing */\n+\t\t\tpkt->l2_len = RTE_ETHER_HDR_LEN;\n \t\t}\n \n \t\t/*\n",
    "prefixes": [
        "v6",
        "3/3"
    ]
}