get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134522,
    "url": "http://patchwork.dpdk.org/api/patches/134522/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231122071143.57795-1-speng975@aliyun.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20231122071143.57795-1-speng975@aliyun.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231122071143.57795-1-speng975@aliyun.com",
    "date": "2023-11-22T07:11:43",
    "name": "examples/ipsec-secgw: fix cmp_sa_key bug",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e7327f13efbf0c03b62c57b366f7b1d5a9c55c63",
    "submitter": {
        "id": 3229,
        "url": "http://patchwork.dpdk.org/api/people/3229/?format=api",
        "name": "supeng",
        "email": "speng975@aliyun.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231122071143.57795-1-speng975@aliyun.com/mbox/",
    "series": [
        {
            "id": 30353,
            "url": "http://patchwork.dpdk.org/api/series/30353/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30353",
            "date": "2023-11-22T07:11:43",
            "name": "examples/ipsec-secgw: fix cmp_sa_key bug",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/30353/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/134522/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/134522/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 6B63E43399;\n\tWed, 22 Nov 2023 09:18:15 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DD5A14028C;\n\tWed, 22 Nov 2023 09:18:00 +0100 (CET)",
            "from out30-83.freemail.mail.aliyun.com\n (out30-83.freemail.mail.aliyun.com [115.124.30.83])\n by mails.dpdk.org (Postfix) with ESMTP id B9BDE4028C\n for <dev@dpdk.org>; Wed, 22 Nov 2023 08:12:13 +0100 (CET)",
            "from speng-Vostro-3670..(mailfrom:speng975@aliyun.com\n fp:SMTPD_---0Vwv626D_1700637125) by smtp.aliyun-inc.com;\n Wed, 22 Nov 2023 15:12:10 +0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=aliyun.com; s=s1024;\n t=1700637132; h=From:To:Subject:Date:Message-Id:MIME-Version;\n bh=cxF+yZKxZoiCWQQHpWZsafuaTlUvgzhPMaMLQMKvTOY=;\n b=wcKCpGlJq4e+UuOY+LT+HpkE9EpRptZc0A8AXD/k2tpfrVyWOF+/v8Ic00/s2I3Km1FS7U28StWnMFFb2XDx5XD/ruZqnmPhDPN3JG43dUlLaD7Kx/d/w7++NGASFQsqYr/pI41SNJFxKNCq4Kln2+o0FNyfSmQpaxGqF42oUGw=",
        "X-Alimail-AntiSpam": "AC=CONTINUE; BC=0.07740735|-1; CH=green;\n DM=|CONTINUE|false|;\n DS=CONTINUE|ham_system_inform|0.00766378-0.000357211-0.991979;\n FP=16534270645479644902|5|1|5|0|-1|-1|-1; HT=ay29a033018046060;\n MF=speng975@aliyun.com; NM=1; PH=DS; RN=3; RT=3; SR=0;\n TI=SMTPD_---0Vwv626D_1700637125;",
        "From": "supeng <speng975@aliyun.com>",
        "To": "dev@dpdk.org",
        "Cc": "radu.nicolau@intel.com,\n\tsupeng <supeng@cmss.chinamobile.com>",
        "Subject": "[PATCH] examples/ipsec-secgw: fix cmp_sa_key bug",
        "Date": "Wed, 22 Nov 2023 15:11:43 +0800",
        "Message-Id": "<20231122071143.57795-1-speng975@aliyun.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Wed, 22 Nov 2023 09:17:56 +0100",
        "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": "From: supeng <supeng@cmss.chinamobile.com>\n\nInbound direction, sad_lookup function will call cmp_sa_key to compare packet outer ip info with local sa.  Local sa src ip should equal packet dst ip,  Local sa dst ip should  equal src ip.\n---\n examples/ipsec-secgw/sad.h | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/examples/ipsec-secgw/sad.h b/examples/ipsec-secgw/sad.h\nindex 3224b6252c..e1fa8a26f6 100644\n--- a/examples/ipsec-secgw/sad.h\n+++ b/examples/ipsec-secgw/sad.h\n@@ -33,12 +33,12 @@ cmp_sa_key(struct ipsec_sa *sa, int is_v4, struct rte_ipv4_hdr *ipv4,\n \tif ((sa_type == TRANSPORT) ||\n \t\t\t/* IPv4 check */\n \t\t\t(is_v4 && (sa_type == IP4_TUNNEL) &&\n-\t\t\t(sa->src.ip.ip4 == ipv4->src_addr) &&\n-\t\t\t(sa->dst.ip.ip4 == ipv4->dst_addr)) ||\n+\t\t\t(sa->src.ip.ip4 == ipv4->dst_addr) &&\n+\t\t\t(sa->dst.ip.ip4 == ipv4->src_addr)) ||\n \t\t\t/* IPv6 check */\n \t\t\t(!is_v4 && (sa_type == IP6_TUNNEL) &&\n-\t\t\t(!memcmp(sa->src.ip.ip6.ip6, ipv6->src_addr, 16)) &&\n-\t\t\t(!memcmp(sa->dst.ip.ip6.ip6, ipv6->dst_addr, 16))))\n+\t\t\t(!memcmp(sa->src.ip.ip6.ip6, ipv6->dst_addr, 16)) &&\n+\t\t\t(!memcmp(sa->dst.ip.ip6.ip6, ipv6->src_addr, 16))))\n \t\treturn 1;\n \n \treturn 0;\n",
    "prefixes": []
}