get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 124759,
    "url": "http://patches.dpdk.org/api/patches/124759/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230303081013.589868-2-ndabilpuram@marvell.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": "<20230303081013.589868-2-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230303081013.589868-2-ndabilpuram@marvell.com",
    "date": "2023-03-03T08:10:00",
    "name": "[02/15] net/cnxk: fix data len for first seg with multi seg pkt",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0a46e3ed6c27e00f6911eb16f3a16a7b2ae7c8ba",
    "submitter": {
        "id": 1202,
        "url": "http://patches.dpdk.org/api/people/1202/?format=api",
        "name": "Nithin Dabilpuram",
        "email": "ndabilpuram@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230303081013.589868-2-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 27237,
            "url": "http://patches.dpdk.org/api/series/27237/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27237",
            "date": "2023-03-03T08:09:59",
            "name": "[01/15] net/cnxk: resolve sefgault caused during transmit completion",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/27237/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/124759/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/124759/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 4335341DC3;\n\tFri,  3 Mar 2023 09:11:01 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5EF0F427F2;\n\tFri,  3 Mar 2023 09:10:58 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 005D14161A\n for <dev@dpdk.org>; Fri,  3 Mar 2023 09:10:56 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3234WuWS024918 for <dev@dpdk.org>; Fri, 3 Mar 2023 00:10:56 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3p1wr9xbh6-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Fri, 03 Mar 2023 00:10:55 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42;\n Fri, 3 Mar 2023 00:10:53 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend\n Transport; Fri, 3 Mar 2023 00:10:53 -0800",
            "from hyd1588t430.caveonetworks.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id 42A2E3F70BE;\n Fri,  3 Mar 2023 00:10:50 -0800 (PST)"
        ],
        "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=7HtxD11lsbJuh2rWos/ibxwkgIeAzQjybI+un747e/g=;\n b=Kbwiq8xuy8GdfGOdCnAQySrMF78wKLob/3qCcBkVkUQSKrxSjWZWWjORJKccYMpYJQ/P\n 7oMEBzpkoQtmvUIH3b/qy8b9ztKx6RtEyHz7h6kfXdEqDY628DEQ6kgjrQG4bMv+DUVA\n ah+qn2A1xYWZVjr+6Nn8V8Y2fT+YauEeCuBrDWmtY6wAF3QSQU0xMfd/ievZTdCrofed\n gvc6lcvK/UR5h0KjOIGfHmqhl+lzHYUcqfeW7Iguf5S2dMWlU2oPB8l/J5BGmw4Ti/YW\n j9A++AMzQUard2Nut+14uy1Xbwx9OjbfsHldhebunmNP9HhDHj5WOB43OmjNcJzksodT Tg==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "Nithin Dabilpuram <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>",
        "CC": "<jerinj@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH 02/15] net/cnxk: fix data len for first seg with multi seg pkt",
        "Date": "Fri, 3 Mar 2023 13:40:00 +0530",
        "Message-ID": "<20230303081013.589868-2-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230303081013.589868-1-ndabilpuram@marvell.com>",
        "References": "<20230303081013.589868-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "UMkI86bVYyTWtW8j_wkR_9IM9O1HruKD",
        "X-Proofpoint-GUID": "UMkI86bVYyTWtW8j_wkR_9IM9O1HruKD",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22\n definitions=2023-03-03_01,2023-03-02_02,2023-02-09_01",
        "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": "When coming from vector routine, the first seg length is\nset to same as pkt len assuming it is a single segment pkt.\nRead just the same in cn10k_nix_prepare_mseg() that is called\nin case of mbuf-fast-free offload disabled.\nIn CN9K, clear other data len fields to avoid using stale data.\n\nFixes: 8520bce63379 (\"net/cnxk: rework no-fast-free offload\")\nFixes: ae2c2cb60635 (\"net/cnxk: avoid command copy from Tx queue\")\n\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\n---\n drivers/net/cnxk/cn10k_tx.h | 24 +++++++++++++++++++-----\n drivers/net/cnxk/cn9k_tx.h  |  1 +\n 2 files changed, 20 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h\nindex d0f7bc22a4..a72a803e10 100644\n--- a/drivers/net/cnxk/cn10k_tx.h\n+++ b/drivers/net/cnxk/cn10k_tx.h\n@@ -1012,9 +1012,13 @@ cn10k_nix_prepare_mseg(struct cn10k_eth_txq *txq,\n \t\tol_flags = m->ol_flags;\n \n \t/* Start from second segment, first segment is already there */\n+\tdlen = m->data_len;\n \tis_sg2 = 0;\n \tl_sg.u = sg->u;\n-\tlen -= l_sg.u & 0xFFFF;\n+\t/* Clear l_sg.u first seg length that might be stale from vector path */\n+\tl_sg.u &= ~0xFFFFUL;\n+\tl_sg.u |= dlen;\n+\tlen -= dlen;\n \tnb_segs = m->nb_segs - 1;\n \tm_next = m->next;\n \tslist = &cmd[3 + off + 1];\n@@ -1940,7 +1944,7 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws,\n \tuint64x2_t xtmp128, ytmp128;\n \tuint64x2_t xmask01, xmask23;\n \tuintptr_t c_laddr = laddr;\n-\tuint8_t lnum, shift, loff;\n+\tuint8_t lnum, shift, loff = 0;\n \trte_iova_t c_io_addr;\n \tuint64_t sa_base;\n \tunion wdata {\n@@ -2059,10 +2063,20 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws,\n \t\t\t\t\t    !!(flags & NIX_TX_OFFLOAD_TSTAMP_F);\n \t\t\t}\n \n-\t\t\t/* Check if there are enough LMTLINES for this loop */\n-\t\t\tif (lnum + 4 > 32) {\n+\t\t\t/* Check if there are enough LMTLINES for this loop.\n+\t\t\t * Consider previous line to be partial.\n+\t\t\t */\n+\t\t\tif (lnum + 4 >= 32) {\n \t\t\t\tuint8_t ldwords_con = 0, lneeded = 0;\n-\t\t\t\tfor (j = 0; j < NIX_DESCS_PER_LOOP; j++) {\n+\n+\t\t\t\tif ((loff >> 4) + segdw[0] > 8) {\n+\t\t\t\t\tlneeded += 1;\n+\t\t\t\t\tldwords_con = segdw[0];\n+\t\t\t\t} else {\n+\t\t\t\t\tldwords_con = (loff >> 4) + segdw[0];\n+\t\t\t\t}\n+\n+\t\t\t\tfor (j = 1; j < NIX_DESCS_PER_LOOP; j++) {\n \t\t\t\t\tldwords_con += segdw[j];\n \t\t\t\t\tif (ldwords_con > 8) {\n \t\t\t\t\t\tlneeded += 1;\ndiff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h\nindex 52661a624c..e956c1ad2a 100644\n--- a/drivers/net/cnxk/cn9k_tx.h\n+++ b/drivers/net/cnxk/cn9k_tx.h\n@@ -461,6 +461,7 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq,\n \t/* Start from second segment, first segment is already there */\n \ti = 1;\n \tsg_u = sg->u;\n+\tsg_u &= 0xFC0000000000FFFF;\n \tnb_segs = m->nb_segs - 1;\n \tm_next = m->next;\n \tslist = &cmd[3 + off + 1];\n",
    "prefixes": [
        "02/15"
    ]
}