get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 84688,
    "url": "https://patches.dpdk.org/api/patches/84688/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201202101212.4717-16-lironh@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": "<20201202101212.4717-16-lironh@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201202101212.4717-16-lironh@marvell.com",
    "date": "2020-12-02T10:11:49",
    "name": "[v1,15/38] net/mvpp2: only use ol_flags for checksum generation offload",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1424864311ee00b3be5b65f0a2e52cf549136482",
    "submitter": {
        "id": 996,
        "url": "https://patches.dpdk.org/api/people/996/?format=api",
        "name": "Liron Himi",
        "email": "lironh@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201202101212.4717-16-lironh@marvell.com/mbox/",
    "series": [
        {
            "id": 14168,
            "url": "https://patches.dpdk.org/api/series/14168/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14168",
            "date": "2020-12-02T10:11:34",
            "name": "net/mvpp2: misc updates",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/14168/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/84688/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/84688/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 51AA0A04DB;\n\tWed,  2 Dec 2020 11:17:32 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E4446CA9D;\n\tWed,  2 Dec 2020 11:12:51 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1C567CA8B\n for <dev@dpdk.org>; Wed,  2 Dec 2020 11:12:49 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 0B2A56Kb001864 for <dev@dpdk.org>; Wed, 2 Dec 2020 02:12:48 -0800",
            "from sc-exch03.marvell.com ([199.233.58.183])\n by mx0a-0016f401.pphosted.com with ESMTP id 3568jf828t-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 02 Dec 2020 02:12:48 -0800",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Wed, 2 Dec 2020 02:12:47 -0800",
            "from pt-lxl0023.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Wed, 2 Dec 2020 02:12:46 -0800"
        ],
        "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-transfer-encoding : content-type; s=pfpt0220;\n bh=anEhY/TrdZQ3ljZKn7DOAqGBj2jxUNtEMVC6nMah274=;\n b=Vwgmfg2F2QFuGkImBW/cg6zumX1GDIk6MyBAknlwRlaFyjoMqv4HZ1lh5jTo3+GngZZi\n NN1cgl1LIgL6AkhjVl9DNJU9D06Y+sEu4CmMYSVkAEi19SeMl+pOg1qBmpl99hrj/f1q\n CKTtxzLFdgNBk9J/h/ktb5qZIQ0RALZZ6FZ5Q9BMX++nJdcq6EPl+XH6qjMEQ9O22Kza\n IJlx6aZv1h+DRIQfNpzsOHJGFwyhppCYthloBBz8Oj18wTlCHhX2uSfVt4gmQq4AuJ3b\n oPM8TRhdPcbBjzNH/9fdJejIlSfTv7/4n47FHsE0QYclvuT/SGpn/QnlT7waA8AA3PpI Xg==",
        "From": "<lironh@marvell.com>",
        "To": "<jerinj@marvell.com>",
        "CC": "<dev@dpdk.org>, Liron Himi <lironh@marvell.com>",
        "Date": "Wed, 2 Dec 2020 12:11:49 +0200",
        "Message-ID": "<20201202101212.4717-16-lironh@marvell.com>",
        "X-Mailer": "git-send-email 2.28.0",
        "In-Reply-To": "<20201202101212.4717-1-lironh@marvell.com>",
        "References": "<20201202101212.4717-1-lironh@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737\n definitions=2020-12-02_04:2020-11-30,\n 2020-12-02 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v1 15/38] net/mvpp2: only use ol_flags for\n\tchecksum generation offload",
        "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": "From: Liron Himi <lironh@marvell.com>\n\naccording to the dpdk spec, only 'ol_flags'\nshould be used for tx checksum generation\n\nSigned-off-by: Liron Himi <lironh@marvell.com>\nReviewed-by: Liron Himi <lironh@marvell.com>\n---\n drivers/net/mvpp2/mrvl_ethdev.c | 60 ++++++++++++++-------------------\n 1 file changed, 26 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c\nindex a87336a4c..a03d39aee 100644\n--- a/drivers/net/mvpp2/mrvl_ethdev.c\n+++ b/drivers/net/mvpp2/mrvl_ethdev.c\n@@ -63,11 +63,16 @@\n \t\t\t  DEV_RX_OFFLOAD_CHECKSUM)\n \n /** Port Tx offloads capabilities */\n-#define MRVL_TX_OFFLOADS (DEV_TX_OFFLOAD_IPV4_CKSUM | \\\n-\t\t\t  DEV_TX_OFFLOAD_UDP_CKSUM | \\\n-\t\t\t  DEV_TX_OFFLOAD_TCP_CKSUM | \\\n+#define MRVL_TX_OFFLOAD_CHECKSUM (DEV_TX_OFFLOAD_IPV4_CKSUM | \\\n+\t\t\t\t  DEV_TX_OFFLOAD_UDP_CKSUM  | \\\n+\t\t\t\t  DEV_TX_OFFLOAD_TCP_CKSUM)\n+#define MRVL_TX_OFFLOADS (MRVL_TX_OFFLOAD_CHECKSUM | \\\n \t\t\t  DEV_TX_OFFLOAD_MULTI_SEGS)\n \n+#define MRVL_TX_PKT_OFFLOADS (PKT_TX_IP_CKSUM | \\\n+\t\t\t      PKT_TX_TCP_CKSUM | \\\n+\t\t\t      PKT_TX_UDP_CKSUM)\n+\n static const char * const valid_args[] = {\n \tMRVL_IFACE_NAME_ARG,\n \tMRVL_CFG_ARG,\n@@ -2596,8 +2601,6 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n  *\n  * @param ol_flags\n  *   Offload flags.\n- * @param packet_type\n- *   Packet type bitfield.\n  * @param l3_type\n  *   Pointer to the pp2_ouq_l3_type structure.\n  * @param l4_type\n@@ -2606,12 +2609,9 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n  *   Will be set to 1 in case l3 checksum is computed.\n  * @param l4_cksum\n  *   Will be set to 1 in case l4 checksum is computed.\n- *\n- * @return\n- *   0 on success, negative error value otherwise.\n  */\n-static inline int\n-mrvl_prepare_proto_info(uint64_t ol_flags, uint32_t packet_type,\n+static inline void\n+mrvl_prepare_proto_info(uint64_t ol_flags,\n \t\t\tenum pp2_outq_l3_type *l3_type,\n \t\t\tenum pp2_outq_l4_type *l4_type,\n \t\t\tint *gen_l3_cksum,\n@@ -2621,26 +2621,22 @@ mrvl_prepare_proto_info(uint64_t ol_flags, uint32_t packet_type,\n \t * Based on ol_flags prepare information\n \t * for pp2_ppio_outq_desc_set_proto_info() which setups descriptor\n \t * for offloading.\n+\t * in most of the checksum cases ipv4 must be set, so this is the\n+\t * default value\n \t */\n-\tif (ol_flags & PKT_TX_IPV4) {\n-\t\t*l3_type = PP2_OUTQ_L3_TYPE_IPV4;\n-\t\t*gen_l3_cksum = ol_flags & PKT_TX_IP_CKSUM ? 1 : 0;\n-\t} else if (ol_flags & PKT_TX_IPV6) {\n+\t*l3_type = PP2_OUTQ_L3_TYPE_IPV4;\n+\t*gen_l3_cksum = ol_flags & PKT_TX_IP_CKSUM ? 1 : 0;\n+\n+\tif (ol_flags & PKT_TX_IPV6) {\n \t\t*l3_type = PP2_OUTQ_L3_TYPE_IPV6;\n \t\t/* no checksum for ipv6 header */\n \t\t*gen_l3_cksum = 0;\n-\t} else {\n-\t\t/* if something different then stop processing */\n-\t\treturn -1;\n \t}\n \n-\tol_flags &= PKT_TX_L4_MASK;\n-\tif ((packet_type & RTE_PTYPE_L4_TCP) &&\n-\t    ol_flags == PKT_TX_TCP_CKSUM) {\n+\tif ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM) {\n \t\t*l4_type = PP2_OUTQ_L4_TYPE_TCP;\n \t\t*gen_l4_cksum = 1;\n-\t} else if ((packet_type & RTE_PTYPE_L4_UDP) &&\n-\t\t   ol_flags == PKT_TX_UDP_CKSUM) {\n+\t} else if ((ol_flags & PKT_TX_L4_MASK) ==  PKT_TX_UDP_CKSUM) {\n \t\t*l4_type = PP2_OUTQ_L4_TYPE_UDP;\n \t\t*gen_l4_cksum = 1;\n \t} else {\n@@ -2648,8 +2644,6 @@ mrvl_prepare_proto_info(uint64_t ol_flags, uint32_t packet_type,\n \t\t/* no checksum for other type */\n \t\t*gen_l4_cksum = 0;\n \t}\n-\n-\treturn 0;\n }\n \n /**\n@@ -2750,7 +2744,7 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \tstruct pp2_hif *hif;\n \tstruct pp2_ppio_desc descs[nb_pkts];\n \tunsigned int core_id = rte_lcore_id();\n-\tint i, ret, bytes_sent = 0;\n+\tint i, bytes_sent = 0;\n \tuint16_t num, sq_free_size;\n \tuint64_t addr;\n \n@@ -2794,11 +2788,10 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \t\t * in case unsupported ol_flags were passed\n \t\t * do not update descriptor offload information\n \t\t */\n-\t\tret = mrvl_prepare_proto_info(mbuf->ol_flags, mbuf->packet_type,\n-\t\t\t\t\t      &l3_type, &l4_type, &gen_l3_cksum,\n-\t\t\t\t\t      &gen_l4_cksum);\n-\t\tif (unlikely(ret))\n+\t\tif (!(mbuf->ol_flags & MRVL_TX_PKT_OFFLOADS))\n \t\t\tcontinue;\n+\t\tmrvl_prepare_proto_info(mbuf->ol_flags, &l3_type, &l4_type,\n+\t\t\t\t\t&gen_l3_cksum, &gen_l4_cksum);\n \n \t\tpp2_ppio_outq_desc_set_proto_info(&descs[i], l3_type, l4_type,\n \t\t\t\t\t\t  mbuf->l2_len,\n@@ -2848,7 +2841,7 @@ mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,\n \tstruct pp2_ppio_sg_pkts pkts;\n \tuint8_t frags[nb_pkts];\n \tunsigned int core_id = rte_lcore_id();\n-\tint i, j, ret, bytes_sent = 0;\n+\tint i, j, bytes_sent = 0;\n \tint tail, tail_first;\n \tuint16_t num, sq_free_size;\n \tuint16_t nb_segs, total_descs = 0;\n@@ -2935,11 +2928,10 @@ mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,\n \t\t/* In case unsupported ol_flags were passed\n \t\t * do not update descriptor offload information\n \t\t */\n-\t\tret = mrvl_prepare_proto_info(mbuf->ol_flags, mbuf->packet_type,\n-\t\t\t\t\t      &l3_type, &l4_type, &gen_l3_cksum,\n-\t\t\t\t\t      &gen_l4_cksum);\n-\t\tif (unlikely(ret))\n+\t\tif (!(mbuf->ol_flags & MRVL_TX_PKT_OFFLOADS))\n \t\t\tcontinue;\n+\t\tmrvl_prepare_proto_info(mbuf->ol_flags, &l3_type, &l4_type,\n+\t\t\t\t\t&gen_l3_cksum, &gen_l4_cksum);\n \n \t\tpp2_ppio_outq_desc_set_proto_info(&descs[tail_first], l3_type,\n \t\t\t\t\t\t  l4_type, mbuf->l2_len,\n",
    "prefixes": [
        "v1",
        "15/38"
    ]
}