get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 62521,
    "url": "http://patches.dpdk.org/api/patches/62521/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191106065414.4311-2-hemant.agrawal@nxp.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": "<20191106065414.4311-2-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191106065414.4311-2-hemant.agrawal@nxp.com",
    "date": "2019-11-06T06:54:13",
    "name": "[v6,2/3] ipsec: remove redundant replay_win_sz",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "02bc48c65c3d66735cdd3dc1e9bd6a1902adbef9",
    "submitter": {
        "id": 477,
        "url": "http://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20191106065414.4311-2-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 7279,
            "url": "http://patches.dpdk.org/api/series/7279/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7279",
            "date": "2019-11-06T06:54:12",
            "name": "[v6,1/3] security: add anti replay window size",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/7279/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/62521/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/62521/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1BC70A04A2;\n\tWed,  6 Nov 2019 07:57:32 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D0E111BFD1;\n\tWed,  6 Nov 2019 07:57:25 +0100 (CET)",
            "from inva021.nxp.com (inva021.nxp.com [92.121.34.21])\n by dpdk.org (Postfix) with ESMTP id 94E701BFB5\n for <dev@dpdk.org>; Wed,  6 Nov 2019 07:57:23 +0100 (CET)",
            "from inva021.nxp.com (localhost [127.0.0.1])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3C44E2001C8;\n Wed,  6 Nov 2019 07:57:23 +0100 (CET)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9A74C2002D1;\n Wed,  6 Nov 2019 07:57:21 +0100 (CET)",
            "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n [10.232.133.63])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 612AF402B7;\n Wed,  6 Nov 2019 14:57:19 +0800 (SGT)"
        ],
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "dev@dpdk.org",
        "Cc": "akhil.goyal@nxp.com",
        "Date": "Wed,  6 Nov 2019 12:24:13 +0530",
        "Message-Id": "<20191106065414.4311-2-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191106065414.4311-1-hemant.agrawal@nxp.com>",
        "References": "<20191031131502.12504-1-hemant.agrawal@nxp.com>\n <20191106065414.4311-1-hemant.agrawal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH v6 2/3] ipsec: remove redundant replay_win_sz",
        "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 <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": "The rte_security lib has introduced replay_win_sz,\nso it can be removed from the rte_ipsec lib.\n\nThe relaved tests,app are also update to reflect\nthe usages.\n\nNote that esn and anti-replay fileds were earlier used\nonly for ipsec library, they were enabling the libipsec\nby default. With this change esn and anti-replay setting\nwill not automatically enabled libipsec.\n\nSigned-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>\nAcked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n app/test/test_ipsec.c                  | 2 +-\n doc/guides/rel_notes/release_19_11.rst | 7 +++++--\n examples/ipsec-secgw/ipsec-secgw.c     | 5 -----\n examples/ipsec-secgw/ipsec.c           | 4 ++++\n examples/ipsec-secgw/sa.c              | 2 +-\n lib/librte_ipsec/Makefile              | 2 +-\n lib/librte_ipsec/meson.build           | 1 +\n lib/librte_ipsec/rte_ipsec_sa.h        | 6 ------\n lib/librte_ipsec/sa.c                  | 4 ++--\n 9 files changed, 15 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c\nindex 4007eff19..7dc83fee7 100644\n--- a/app/test/test_ipsec.c\n+++ b/app/test/test_ipsec.c\n@@ -689,11 +689,11 @@ fill_ipsec_param(uint32_t replay_win_sz, uint64_t flags)\n \n \tprm->userdata = 1;\n \tprm->flags = flags;\n-\tprm->replay_win_sz = replay_win_sz;\n \n \t/* setup ipsec xform */\n \tprm->ipsec_xform = ut_params->ipsec_xform;\n \tprm->ipsec_xform.salt = (uint32_t)rte_rand();\n+\tprm->ipsec_xform.replay_win_sz = replay_win_sz;\n \n \t/* setup tunnel related fields */\n \tprm->tun.hdr_len = sizeof(ipv4_outer);\ndiff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst\nindex dcae08002..0504a3443 100644\n--- a/doc/guides/rel_notes/release_19_11.rst\n+++ b/doc/guides/rel_notes/release_19_11.rst\n@@ -369,10 +369,13 @@ ABI Changes\n   align the Ethernet header on receive and all known encapsulations\n   preserve the alignment of the header.\n \n-* security: A new field ''replay_win_sz'' has been added to the structure\n+* security: The field ''replay_win_sz'' has been moved from ipsec library\n+  based ''rte_ipsec_sa_prm'' structure to security library based structure\n   ``rte_security_ipsec_xform``, which specify the Anti replay window size\n   to enable sequence replay attack handling.\n \n+* ipsec: The field ''replay_win_sz'' has been removed from the structure\n+  ''rte_ipsec_sa_prm'' as it has been added to the security library.\n \n Shared Library Versions\n -----------------------\n@@ -415,7 +418,7 @@ The libraries prepended with a plus sign were incremented in this version.\n      librte_gso.so.1\n      librte_hash.so.2\n      librte_ip_frag.so.1\n-     librte_ipsec.so.1\n+   + librte_ipsec.so.2\n      librte_jobstats.so.1\n      librte_kni.so.2\n      librte_kvargs.so.1\ndiff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c\nindex b12936470..3b5aaf683 100644\n--- a/examples/ipsec-secgw/ipsec-secgw.c\n+++ b/examples/ipsec-secgw/ipsec-secgw.c\n@@ -1424,9 +1424,6 @@ print_app_sa_prm(const struct app_sa_prm *prm)\n \tprintf(\"librte_ipsec usage: %s\\n\",\n \t\t(prm->enable == 0) ? \"disabled\" : \"enabled\");\n \n-\tif (prm->enable == 0)\n-\t\treturn;\n-\n \tprintf(\"replay window size: %u\\n\", prm->window_size);\n \tprintf(\"ESN: %s\\n\", (prm->enable_esn == 0) ? \"disabled\" : \"enabled\");\n \tprintf(\"SA flags: %#\" PRIx64 \"\\n\", prm->flags);\n@@ -1495,11 +1492,9 @@ parse_args(int32_t argc, char **argv)\n \t\t\tapp_sa_prm.enable = 1;\n \t\t\tbreak;\n \t\tcase 'w':\n-\t\t\tapp_sa_prm.enable = 1;\n \t\t\tapp_sa_prm.window_size = parse_decimal(optarg);\n \t\t\tbreak;\n \t\tcase 'e':\n-\t\t\tapp_sa_prm.enable = 1;\n \t\t\tapp_sa_prm.enable_esn = 1;\n \t\t\tbreak;\n \t\tcase 'a':\ndiff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c\nindex d7761e966..d4b57121a 100644\n--- a/examples/ipsec-secgw/ipsec.c\n+++ b/examples/ipsec-secgw/ipsec.c\n@@ -49,6 +49,8 @@ set_ipsec_conf(struct ipsec_sa *sa, struct rte_security_ipsec_xform *ipsec)\n \t\t/* TODO support for Transport */\n \t}\n \tipsec->esn_soft_limit = IPSEC_OFFLOAD_ESN_SOFTLIMIT;\n+\tipsec->replay_win_sz = app_sa_prm.window_size;\n+\tipsec->options.esn = app_sa_prm.enable_esn;\n }\n \n int\n@@ -92,6 +94,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa,\n \t\t\t\t.spi = sa->spi,\n \t\t\t\t.salt = sa->salt,\n \t\t\t\t.options = { 0 },\n+\t\t\t\t.replay_win_sz = 0,\n \t\t\t\t.direction = sa->direction,\n \t\t\t\t.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,\n \t\t\t\t.mode = (IS_TUNNEL(sa->flags)) ?\n@@ -151,6 +154,7 @@ create_inline_session(struct socket_ctx *skt_ctx, struct ipsec_sa *sa,\n \t\t\t.spi = sa->spi,\n \t\t\t.salt = sa->salt,\n \t\t\t.options = { 0 },\n+\t\t\t.replay_win_sz = 0,\n \t\t\t.direction = sa->direction,\n \t\t\t.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,\n \t\t\t.mode = (sa->flags == IP4_TUNNEL ||\ndiff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c\nindex a8dee342e..4605a3a6c 100644\n--- a/examples/ipsec-secgw/sa.c\n+++ b/examples/ipsec-secgw/sa.c\n@@ -1115,7 +1115,7 @@ fill_ipsec_app_sa_prm(struct rte_ipsec_sa_prm *prm,\n \n \tprm->flags = app_prm->flags;\n \tprm->ipsec_xform.options.esn = app_prm->enable_esn;\n-\tprm->replay_win_sz = app_prm->window_size;\n+\tprm->ipsec_xform.replay_win_sz = app_prm->window_size;\n }\n \n static int\ndiff --git a/lib/librte_ipsec/Makefile b/lib/librte_ipsec/Makefile\nindex 81fb99980..161ea9e3d 100644\n--- a/lib/librte_ipsec/Makefile\n+++ b/lib/librte_ipsec/Makefile\n@@ -14,7 +14,7 @@ LDLIBS += -lrte_cryptodev -lrte_security -lrte_hash\n \n EXPORT_MAP := rte_ipsec_version.map\n \n-LIBABIVER := 1\n+LIBABIVER := 2\n \n # all source are stored in SRCS-y\n SRCS-$(CONFIG_RTE_LIBRTE_IPSEC) += esp_inb.c\ndiff --git a/lib/librte_ipsec/meson.build b/lib/librte_ipsec/meson.build\nindex 70358526b..e8604dadd 100644\n--- a/lib/librte_ipsec/meson.build\n+++ b/lib/librte_ipsec/meson.build\n@@ -1,6 +1,7 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2018 Intel Corporation\n \n+version = 2\n allow_experimental_apis = true\n \n sources = files('esp_inb.c', 'esp_outb.c', 'sa.c', 'ses.c', 'ipsec_sad.c')\ndiff --git a/lib/librte_ipsec/rte_ipsec_sa.h b/lib/librte_ipsec/rte_ipsec_sa.h\nindex 47ce169d2..1cfde5874 100644\n--- a/lib/librte_ipsec/rte_ipsec_sa.h\n+++ b/lib/librte_ipsec/rte_ipsec_sa.h\n@@ -47,12 +47,6 @@ struct rte_ipsec_sa_prm {\n \t\t\tuint8_t proto;  /**< next header protocol */\n \t\t} trs; /**< transport mode related parameters */\n \t};\n-\n-\t/**\n-\t * window size to enable sequence replay attack handling.\n-\t * replay checking is disabled if the window size is 0.\n-\t */\n-\tuint32_t replay_win_sz;\n };\n \n /**\ndiff --git a/lib/librte_ipsec/sa.c b/lib/librte_ipsec/sa.c\nindex 23d394b46..6f1d92c3c 100644\n--- a/lib/librte_ipsec/sa.c\n+++ b/lib/librte_ipsec/sa.c\n@@ -439,7 +439,7 @@ rte_ipsec_sa_size(const struct rte_ipsec_sa_prm *prm)\n \t\treturn rc;\n \n \t/* determine required size */\n-\twsz = prm->replay_win_sz;\n+\twsz = prm->ipsec_xform.replay_win_sz;\n \treturn ipsec_sa_size(type, &wsz, &nb);\n }\n \n@@ -461,7 +461,7 @@ rte_ipsec_sa_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm,\n \t\treturn rc;\n \n \t/* determine required size */\n-\twsz = prm->replay_win_sz;\n+\twsz = prm->ipsec_xform.replay_win_sz;\n \tsz = ipsec_sa_size(type, &wsz, &nb);\n \tif (sz < 0)\n \t\treturn sz;\n",
    "prefixes": [
        "v6",
        "2/3"
    ]
}