get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43214,
    "url": "http://patches.dpdk.org/api/patches/43214/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180719083959.41480-4-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": "<20180719083959.41480-4-pablo.de.lara.guarch@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180719083959.41480-4-pablo.de.lara.guarch@intel.com",
    "date": "2018-07-19T08:39:57",
    "name": "[v2,3/5] examples/l2fwd-crypto: separate IV check from xform setting",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "83a2ab49b8c723845a54e8ad2ec4f4acf288492e",
    "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/20180719083959.41480-4-pablo.de.lara.guarch@intel.com/mbox/",
    "series": [
        {
            "id": 677,
            "url": "http://patches.dpdk.org/api/series/677/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=677",
            "date": "2018-07-19T08:39:54",
            "name": "L2fwd-crypto fixes",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/677/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43214/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43214/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 1F6FD5F29;\n\tThu, 19 Jul 2018 18:47:09 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 4A7F0160\n\tfor <dev@dpdk.org>; Thu, 19 Jul 2018 18:47:00 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Jul 2018 09:46:58 -0700",
            "from silpixa00399466.ir.intel.com (HELO\n\tsilpixa00399466.ger.corp.intel.com) ([10.237.223.220])\n\tby fmsmga006.fm.intel.com with ESMTP; 19 Jul 2018 09:46:12 -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,375,1526367600\"; d=\"scan'208\";a=\"247109925\"",
        "From": "Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "To": "declan.doherty@intel.com,\n\tfiona.trahe@intel.com",
        "Cc": "dev@dpdk.org,\n\tPablo de Lara <pablo.de.lara.guarch@intel.com>",
        "Date": "Thu, 19 Jul 2018 09:39:57 +0100",
        "Message-Id": "<20180719083959.41480-4-pablo.de.lara.guarch@intel.com>",
        "X-Mailer": "git-send-email 2.14.4",
        "In-Reply-To": "<20180719083959.41480-1-pablo.de.lara.guarch@intel.com>",
        "References": "<20180717103815.26841-1-pablo.de.lara.guarch@intel.com>\n\t<20180719083959.41480-1-pablo.de.lara.guarch@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 3/5] examples/l2fwd-crypto: separate IV check\n\tfrom xform setting",
        "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": "IV_param_check() function was checking if the IV size provided\nwas supported by device and setting the IV size in the xform\nstructure.\n\nInstead of this, the function should only do the parameter check\nand outside the IV size on the xform is set.\n\nSigned-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>\n---\n examples/l2fwd-crypto/main.c | 63 +++++++++++++++++++++++++++++++++-----------\n 1 file changed, 48 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c\nindex e334b9bd0..15f6b856f 100644\n--- a/examples/l2fwd-crypto/main.c\n+++ b/examples/l2fwd-crypto/main.c\n@@ -1931,21 +1931,19 @@ check_supported_size(uint16_t length, uint16_t min, uint16_t max,\n static int\n check_iv_param(const struct rte_crypto_param_range *iv_range_size,\n \t\tunsigned int iv_param, int iv_random_size,\n-\t\tuint16_t *iv_length)\n+\t\tuint16_t iv_length)\n {\n \t/*\n \t * Check if length of provided IV is supported\n \t * by the algorithm chosen.\n \t */\n \tif (iv_param) {\n-\t\tif (check_supported_size(*iv_length,\n+\t\tif (check_supported_size(iv_length,\n \t\t\t\tiv_range_size->min,\n \t\t\t\tiv_range_size->max,\n \t\t\t\tiv_range_size->increment)\n-\t\t\t\t\t!= 0) {\n-\t\t\tprintf(\"Unsupported IV length\\n\");\n+\t\t\t\t\t!= 0)\n \t\t\treturn -1;\n-\t\t}\n \t/*\n \t * Check if length of IV to be randomly generated\n \t * is supported by the algorithm chosen.\n@@ -1955,14 +1953,9 @@ check_iv_param(const struct rte_crypto_param_range *iv_range_size,\n \t\t\t\tiv_range_size->min,\n \t\t\t\tiv_range_size->max,\n \t\t\t\tiv_range_size->increment)\n-\t\t\t\t\t!= 0) {\n-\t\t\tprintf(\"Unsupported IV length\\n\");\n+\t\t\t\t\t!= 0)\n \t\t\treturn -1;\n-\t\t}\n-\t\t*iv_length = iv_random_size;\n-\t/* No size provided, use minimum size. */\n-\t} else\n-\t\t*iv_length = iv_range_size->min;\n+\t}\n \n \treturn 0;\n }\n@@ -2069,8 +2062,21 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,\n \t\t\tif (check_iv_param(&cap->sym.aead.iv_size,\n \t\t\t\t\toptions->aead_iv_param,\n \t\t\t\t\toptions->aead_iv_random_size,\n-\t\t\t\t\t&options->aead_iv.length) < 0)\n+\t\t\t\t\toptions->aead_iv.length) < 0) {\n+\t\t\t\tprintf(\"Unsupported IV length\\n\");\n \t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\t/* Set IV if not provided from command line */\n+\t\t\tif (options->aead_iv_param == 0) {\n+\t\t\t\tif (options->aead_iv_random_size != -1)\n+\t\t\t\t\toptions->aead_iv.length =\n+\t\t\t\t\t\toptions->aead_iv_random_size;\n+\t\t\t\t/* No size provided, use minimum size. */\n+\t\t\t\telse\n+\t\t\t\t\toptions->aead_iv.length =\n+\t\t\t\t\t\tcap->sym.aead.iv_size.min;\n+\t\t\t}\n \n \t\t\t/*\n \t\t\t * Check if length of provided AEAD key is supported\n@@ -2178,8 +2184,21 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,\n \t\t\tif (check_iv_param(&cap->sym.cipher.iv_size,\n \t\t\t\t\toptions->cipher_iv_param,\n \t\t\t\t\toptions->cipher_iv_random_size,\n-\t\t\t\t\t&options->cipher_iv.length) < 0)\n+\t\t\t\t\toptions->cipher_iv.length) < 0) {\n+\t\t\t\tprintf(\"Unsupported IV length\\n\");\n \t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\t/* Set IV if not provided from command line */\n+\t\t\tif (options->cipher_iv_param == 0) {\n+\t\t\t\tif (options->cipher_iv_random_size != -1)\n+\t\t\t\t\toptions->cipher_iv.length =\n+\t\t\t\t\t\toptions->cipher_iv_random_size;\n+\t\t\t\t/* No size provided, use minimum size. */\n+\t\t\t\telse\n+\t\t\t\t\toptions->cipher_iv.length =\n+\t\t\t\t\t\tcap->sym.cipher.iv_size.min;\n+\t\t\t}\n \n \t\t\t/*\n \t\t\t * Check if length of provided cipher key is supported\n@@ -2235,8 +2254,22 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,\n \t\t\tif (check_iv_param(&cap->sym.auth.iv_size,\n \t\t\t\t\toptions->auth_iv_param,\n \t\t\t\t\toptions->auth_iv_random_size,\n-\t\t\t\t\t&options->auth_iv.length) < 0)\n+\t\t\t\t\toptions->auth_iv.length) < 0) {\n+\t\t\t\tprintf(\"Unsupported IV length\\n\");\n \t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\t/* Set IV if not provided from command line */\n+\t\t\tif (options->auth_iv_param == 0) {\n+\t\t\t\tif (options->auth_iv_random_size != -1)\n+\t\t\t\t\toptions->auth_iv.length =\n+\t\t\t\t\t\toptions->auth_iv_random_size;\n+\t\t\t\t/* No size provided, use minimum size. */\n+\t\t\t\telse\n+\t\t\t\t\toptions->auth_iv.length =\n+\t\t\t\t\t\tcap->sym.auth.iv_size.min;\n+\t\t\t}\n+\n \t\t\t/*\n \t\t\t * Check if length of provided auth key is supported\n \t\t\t * by the algorithm chosen.\n",
    "prefixes": [
        "v2",
        "3/5"
    ]
}