get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94480,
    "url": "http://patches.dpdk.org/api/patches/94480/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210618130606.21646-1-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": "<20210618130606.21646-1-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210618130606.21646-1-ndabilpuram@marvell.com",
    "date": "2021-06-18T13:06:06",
    "name": "net/octeontx2: use runtime lso format indices",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6f4d2886a543eea7c6b27ce3e12a61b09dfe904e",
    "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/20210618130606.21646-1-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 17396,
            "url": "http://patches.dpdk.org/api/series/17396/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=17396",
            "date": "2021-06-18T13:06:06",
            "name": "net/octeontx2: use runtime lso format indices",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/17396/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/94480/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/94480/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 60856A0C46;\n\tFri, 18 Jun 2021 15:06:24 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D23C940150;\n\tFri, 18 Jun 2021 15:06:23 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 8444F40142;\n Fri, 18 Jun 2021 15:06:22 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 15ID0wZV008896; Fri, 18 Jun 2021 06:06:21 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 398tu0r8kx-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Fri, 18 Jun 2021 06:06:21 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Fri, 18 Jun 2021 06:06:19 -0700",
            "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.18 via Frontend\n Transport; Fri, 18 Jun 2021 06:06:19 -0700",
            "from hyd1588t430.marvell.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id D6FD35B6949;\n Fri, 18 Jun 2021 06:06:17 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : mime-version : content-type; s=pfpt0220;\n bh=29y40tyiXjQkxpku9Eh184aR4z7+p3DrQOde5jTJJdg=;\n b=j7bU7saFLuVr7Q3sp+tGI29FdGcFOBhWNBsxnNzIGT4woj7zCmBBRdROsqZM0dpGX7Mn\n zJyRP+nfq3havTnX3La5IHHACRdicxT4xCYxEhp+QrRAWLXdde2F5su1vsMRjqSuUwkw\n q8aqW9YxNDC41RanLh3gULDMSspOsmJ3kM8mPLA56KC9wlxM4ifSjCc5aSPRoIE2jZhb\n XUF7yL4R6v5doWnAdmkwfNOXvvxmVCelLKI0wbVLxOhTqGDPRcYrkqCaBMgBTvQbxuBh\n wsqOQ+nhKKfcKNoOM7yKg5Om86XBRM6M3S5iirnR6oCbvwbisAmcig71F2MOOupH1xd2 Eg==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>,\n <stable@dpdk.org>",
        "Date": "Fri, 18 Jun 2021 18:36:06 +0530",
        "Message-ID": "<20210618130606.21646-1-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "iX1ungpea0mENIN3AwVyEfzBylVceOTC",
        "X-Proofpoint-ORIG-GUID": "iX1ungpea0mENIN3AwVyEfzBylVceOTC",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790\n definitions=2021-06-18_07:2021-06-18,\n 2021-06-18 signatures=0",
        "Subject": "[dpdk-dev] [PATCH] net/octeontx2: use runtime lso format indices",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Currently lso formats setup initially are expected to be\ncompile time constants and start from 0.\n\nChange the logic in slow and fast path so that LSO format indexes\nare only determined runtime.\n\nFixes: 3b635472a998 (\"net/octeontx2: support TSO offload\")\nCc: stable@dpdk.org\n\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\n---\n drivers/event/octeontx2/otx2_worker.h |  2 +-\n drivers/net/octeontx2/otx2_ethdev.c   | 72 ++++++++++++++++++++---------------\n drivers/net/octeontx2/otx2_ethdev.h   | 13 ++++++-\n drivers/net/octeontx2/otx2_tx.c       |  8 +++-\n drivers/net/octeontx2/otx2_tx.h       | 12 +++---\n 5 files changed, 67 insertions(+), 40 deletions(-)",
    "diff": "diff --git a/drivers/event/octeontx2/otx2_worker.h b/drivers/event/octeontx2/otx2_worker.h\nindex fd149be..3e36dce 100644\n--- a/drivers/event/octeontx2/otx2_worker.h\n+++ b/drivers/event/octeontx2/otx2_worker.h\n@@ -264,7 +264,7 @@ otx2_ssogws_prepare_pkt(const struct otx2_eth_txq *txq, struct rte_mbuf *m,\n \t\t\tuint64_t *cmd, const uint32_t flags)\n {\n \totx2_lmt_mov(cmd, txq->cmd, otx2_nix_tx_ext_subs(flags));\n-\totx2_nix_xmit_prepare(m, cmd, flags);\n+\totx2_nix_xmit_prepare(m, cmd, flags, txq->lso_tun_fmt);\n }\n \n static __rte_always_inline uint16_t\ndiff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c\nindex 0834de0..0a420c1 100644\n--- a/drivers/net/octeontx2/otx2_ethdev.c\n+++ b/drivers/net/octeontx2/otx2_ethdev.c\n@@ -1326,6 +1326,7 @@ otx2_nix_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t sq,\n \ttxq->qconf.nb_desc = nb_desc;\n \tmemcpy(&txq->qconf.conf.tx, tx_conf, sizeof(struct rte_eth_txconf));\n \n+\ttxq->lso_tun_fmt = dev->lso_tun_fmt;\n \totx2_nix_form_default_desc(txq);\n \n \totx2_nix_dbg(\"sq=%d fc=%p offload=0x%\" PRIx64 \" sqb=0x%\" PRIx64 \"\"\n@@ -1676,7 +1677,7 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \tstruct otx2_mbox *mbox = dev->mbox;\n \tstruct nix_lso_format_cfg_rsp *rsp;\n \tstruct nix_lso_format_cfg *req;\n-\tuint8_t base;\n+\tuint8_t *fmt;\n \tint rc;\n \n \t/* Skip if TSO was not requested */\n@@ -1691,11 +1692,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \tif (rc)\n \t\treturn rc;\n \n-\tbase = rsp->lso_format_idx;\n-\tif (base != NIX_LSO_FORMAT_IDX_TSOV4)\n+\tif (rsp->lso_format_idx != NIX_LSO_FORMAT_IDX_TSOV4)\n \t\treturn -EFAULT;\n-\tdev->lso_base_idx = base;\n-\totx2_nix_dbg(\"tcpv4 lso fmt=%u\", base);\n+\totx2_nix_dbg(\"tcpv4 lso fmt=%u\", rsp->lso_format_idx);\n \n \n \t/*\n@@ -1707,9 +1706,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \tif (rc)\n \t\treturn rc;\n \n-\tif (rsp->lso_format_idx != base + 1)\n+\tif (rsp->lso_format_idx != NIX_LSO_FORMAT_IDX_TSOV6)\n \t\treturn -EFAULT;\n-\totx2_nix_dbg(\"tcpv6 lso fmt=%u\\n\", base + 1);\n+\totx2_nix_dbg(\"tcpv6 lso fmt=%u\\n\", rsp->lso_format_idx);\n \n \t/*\n \t * IPv4/UDP/TUN HDR/IPv4/TCP LSO\n@@ -1720,9 +1719,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \tif (rc)\n \t\treturn rc;\n \n-\tif (rsp->lso_format_idx != base + 2)\n-\t\treturn -EFAULT;\n-\totx2_nix_dbg(\"udp tun v4v4 fmt=%u\\n\", base + 2);\n+\tdev->lso_udp_tun_idx[NIX_LSO_TUN_V4V4] = rsp->lso_format_idx;\n+\totx2_nix_dbg(\"udp tun v4v4 fmt=%u\\n\", rsp->lso_format_idx);\n \n \t/*\n \t * IPv4/UDP/TUN HDR/IPv6/TCP LSO\n@@ -1733,9 +1731,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \tif (rc)\n \t\treturn rc;\n \n-\tif (rsp->lso_format_idx != base + 3)\n-\t\treturn -EFAULT;\n-\totx2_nix_dbg(\"udp tun v4v6 fmt=%u\\n\", base + 3);\n+\tdev->lso_udp_tun_idx[NIX_LSO_TUN_V4V6] = rsp->lso_format_idx;\n+\totx2_nix_dbg(\"udp tun v4v6 fmt=%u\\n\", rsp->lso_format_idx);\n \n \t/*\n \t * IPv6/UDP/TUN HDR/IPv4/TCP LSO\n@@ -1746,9 +1743,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \tif (rc)\n \t\treturn rc;\n \n-\tif (rsp->lso_format_idx != base + 4)\n-\t\treturn -EFAULT;\n-\totx2_nix_dbg(\"udp tun v6v4 fmt=%u\\n\", base + 4);\n+\tdev->lso_udp_tun_idx[NIX_LSO_TUN_V6V4] = rsp->lso_format_idx;\n+\totx2_nix_dbg(\"udp tun v6v4 fmt=%u\\n\", rsp->lso_format_idx);\n \n \t/*\n \t * IPv6/UDP/TUN HDR/IPv6/TCP LSO\n@@ -1758,9 +1754,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \trc = otx2_mbox_process_msg(mbox, (void *)&rsp);\n \tif (rc)\n \t\treturn rc;\n-\tif (rsp->lso_format_idx != base + 5)\n-\t\treturn -EFAULT;\n-\totx2_nix_dbg(\"udp tun v6v6 fmt=%u\\n\", base + 5);\n+\n+\tdev->lso_udp_tun_idx[NIX_LSO_TUN_V6V6] = rsp->lso_format_idx;\n+\totx2_nix_dbg(\"udp tun v6v6 fmt=%u\\n\", rsp->lso_format_idx);\n \n \t/*\n \t * IPv4/TUN HDR/IPv4/TCP LSO\n@@ -1771,9 +1767,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \tif (rc)\n \t\treturn rc;\n \n-\tif (rsp->lso_format_idx != base + 6)\n-\t\treturn -EFAULT;\n-\totx2_nix_dbg(\"tun v4v4 fmt=%u\\n\", base + 6);\n+\tdev->lso_tun_idx[NIX_LSO_TUN_V4V4] = rsp->lso_format_idx;\n+\totx2_nix_dbg(\"tun v4v4 fmt=%u\\n\", rsp->lso_format_idx);\n \n \t/*\n \t * IPv4/TUN HDR/IPv6/TCP LSO\n@@ -1784,9 +1779,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \tif (rc)\n \t\treturn rc;\n \n-\tif (rsp->lso_format_idx != base + 7)\n-\t\treturn -EFAULT;\n-\totx2_nix_dbg(\"tun v4v6 fmt=%u\\n\", base + 7);\n+\tdev->lso_tun_idx[NIX_LSO_TUN_V4V6] = rsp->lso_format_idx;\n+\totx2_nix_dbg(\"tun v4v6 fmt=%u\\n\", rsp->lso_format_idx);\n \n \t/*\n \t * IPv6/TUN HDR/IPv4/TCP LSO\n@@ -1797,9 +1791,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \tif (rc)\n \t\treturn rc;\n \n-\tif (rsp->lso_format_idx != base + 8)\n-\t\treturn -EFAULT;\n-\totx2_nix_dbg(\"tun v6v4 fmt=%u\\n\", base + 8);\n+\tdev->lso_tun_idx[NIX_LSO_TUN_V6V4] = rsp->lso_format_idx;\n+\totx2_nix_dbg(\"tun v6v4 fmt=%u\\n\", rsp->lso_format_idx);\n \n \t/*\n \t * IPv6/TUN HDR/IPv6/TCP LSO\n@@ -1809,9 +1802,26 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)\n \trc = otx2_mbox_process_msg(mbox, (void *)&rsp);\n \tif (rc)\n \t\treturn rc;\n-\tif (rsp->lso_format_idx != base + 9)\n-\t\treturn -EFAULT;\n-\totx2_nix_dbg(\"tun v6v6 fmt=%u\\n\", base + 9);\n+\n+\tdev->lso_tun_idx[NIX_LSO_TUN_V6V6] = rsp->lso_format_idx;\n+\totx2_nix_dbg(\"tun v6v6 fmt=%u\\n\", rsp->lso_format_idx);\n+\n+\t/* Save all tun formats into u64 for fast path.\n+\t * Lower 32bit has non-udp tunnel formats.\n+\t * Upper 32bit has udp tunnel formats.\n+\t */\n+\tfmt = dev->lso_tun_idx;\n+\tdev->lso_tun_fmt = ((uint64_t)fmt[NIX_LSO_TUN_V4V4] |\n+\t\t\t    (uint64_t)fmt[NIX_LSO_TUN_V4V6] << 8 |\n+\t\t\t    (uint64_t)fmt[NIX_LSO_TUN_V6V4] << 16 |\n+\t\t\t    (uint64_t)fmt[NIX_LSO_TUN_V6V6] << 24);\n+\n+\tfmt = dev->lso_udp_tun_idx;\n+\tdev->lso_tun_fmt |= ((uint64_t)fmt[NIX_LSO_TUN_V4V4] << 32 |\n+\t\t\t     (uint64_t)fmt[NIX_LSO_TUN_V4V6] << 40 |\n+\t\t\t     (uint64_t)fmt[NIX_LSO_TUN_V6V4] << 48 |\n+\t\t\t     (uint64_t)fmt[NIX_LSO_TUN_V6V6] << 56);\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h\nindex ac50da7..381e6b6 100644\n--- a/drivers/net/octeontx2/otx2_ethdev.h\n+++ b/drivers/net/octeontx2/otx2_ethdev.h\n@@ -182,6 +182,14 @@ enum nix_q_size_e {\n \tnix_q_size_max\n };\n \n+enum nix_lso_tun_type {\n+\tNIX_LSO_TUN_V4V4,\n+\tNIX_LSO_TUN_V4V6,\n+\tNIX_LSO_TUN_V6V4,\n+\tNIX_LSO_TUN_V6V6,\n+\tNIX_LSO_TUN_MAX,\n+};\n+\n struct otx2_qint {\n \tstruct rte_eth_dev *eth_dev;\n \tuint8_t qintx;\n@@ -276,7 +284,9 @@ struct otx2_eth_dev {\n \tuint8_t tx_chan_cnt;\n \tuint8_t lso_tsov4_idx;\n \tuint8_t lso_tsov6_idx;\n-\tuint8_t lso_base_idx;\n+\tuint8_t lso_udp_tun_idx[NIX_LSO_TUN_MAX];\n+\tuint8_t lso_tun_idx[NIX_LSO_TUN_MAX];\n+\tuint64_t lso_tun_fmt;\n \tuint8_t mac_addr[RTE_ETHER_ADDR_LEN];\n \tuint8_t mkex_pfl_name[MKEX_NAME_LEN];\n \tuint8_t max_mac_entries;\n@@ -359,6 +369,7 @@ struct otx2_eth_txq {\n \trte_iova_t fc_iova;\n \tuint16_t sqes_per_sqb_log2;\n \tint16_t nb_sqb_bufs_adj;\n+\tuint64_t lso_tun_fmt;\n \tRTE_MARKER slow_path_start;\n \tuint16_t nb_sqb_bufs;\n \tuint16_t sq;\ndiff --git a/drivers/net/octeontx2/otx2_tx.c b/drivers/net/octeontx2/otx2_tx.c\nindex 439c46f..ff299f0 100644\n--- a/drivers/net/octeontx2/otx2_tx.c\n+++ b/drivers/net/octeontx2/otx2_tx.c\n@@ -27,6 +27,7 @@ nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \tstruct otx2_eth_txq *txq = tx_queue; uint16_t i;\n \tconst rte_iova_t io_addr = txq->io_addr;\n \tvoid *lmt_addr = txq->lmt_addr;\n+\tuint64_t lso_tun_fmt;\n \n \tNIX_XMIT_FC_OR_RETURN(txq, pkts);\n \n@@ -34,6 +35,7 @@ nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \n \t/* Perform header writes before barrier for TSO */\n \tif (flags & NIX_TX_OFFLOAD_TSO_F) {\n+\t\tlso_tun_fmt = txq->lso_tun_fmt;\n \t\tfor (i = 0; i < pkts; i++)\n \t\t\totx2_nix_xmit_prepare_tso(tx_pkts[i], flags);\n \t}\n@@ -45,7 +47,7 @@ nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\trte_io_wmb();\n \n \tfor (i = 0; i < pkts; i++) {\n-\t\totx2_nix_xmit_prepare(tx_pkts[i], cmd, flags);\n+\t\totx2_nix_xmit_prepare(tx_pkts[i], cmd, flags, lso_tun_fmt);\n \t\t/* Passing no of segdw as 4: HDR + EXT + SG + SMEM */\n \t\totx2_nix_xmit_prepare_tstamp(cmd, &txq->cmd[0],\n \t\t\t\t\t     tx_pkts[i]->ol_flags, 4, flags);\n@@ -65,6 +67,7 @@ nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,\n \tstruct otx2_eth_txq *txq = tx_queue; uint64_t i;\n \tconst rte_iova_t io_addr = txq->io_addr;\n \tvoid *lmt_addr = txq->lmt_addr;\n+\tuint64_t lso_tun_fmt;\n \tuint16_t segdw;\n \n \tNIX_XMIT_FC_OR_RETURN(txq, pkts);\n@@ -73,6 +76,7 @@ nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,\n \n \t/* Perform header writes before barrier for TSO */\n \tif (flags & NIX_TX_OFFLOAD_TSO_F) {\n+\t\tlso_tun_fmt = txq->lso_tun_fmt;\n \t\tfor (i = 0; i < pkts; i++)\n \t\t\totx2_nix_xmit_prepare_tso(tx_pkts[i], flags);\n \t}\n@@ -84,7 +88,7 @@ nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\trte_io_wmb();\n \n \tfor (i = 0; i < pkts; i++) {\n-\t\totx2_nix_xmit_prepare(tx_pkts[i], cmd, flags);\n+\t\totx2_nix_xmit_prepare(tx_pkts[i], cmd, flags, lso_tun_fmt);\n \t\tsegdw = otx2_nix_prepare_mseg(tx_pkts[i], cmd, flags);\n \t\totx2_nix_xmit_prepare_tstamp(cmd, &txq->cmd[0],\n \t\t\t\t\t     tx_pkts[i]->ol_flags, segdw,\ndiff --git a/drivers/net/octeontx2/otx2_tx.h b/drivers/net/octeontx2/otx2_tx.h\nindex a97b160..486248d 100644\n--- a/drivers/net/octeontx2/otx2_tx.h\n+++ b/drivers/net/octeontx2/otx2_tx.h\n@@ -197,7 +197,8 @@ otx2_nix_xmit_prepare_tso(struct rte_mbuf *m, const uint64_t flags)\n }\n \n static __rte_always_inline void\n-otx2_nix_xmit_prepare(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)\n+otx2_nix_xmit_prepare(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags,\n+\t\t      const uint64_t lso_tun_fmt)\n {\n \tstruct nix_send_ext_s *send_hdr_ext;\n \tstruct nix_send_hdr_s *send_hdr;\n@@ -339,14 +340,15 @@ otx2_nix_xmit_prepare(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)\n \t\t    (ol_flags & PKT_TX_TUNNEL_MASK)) {\n \t\t\tconst uint8_t is_udp_tun = (NIX_UDP_TUN_BITMASK >>\n \t\t\t\t((ol_flags & PKT_TX_TUNNEL_MASK) >> 45)) & 0x1;\n+\t\t\tuint8_t shift = is_udp_tun ? 32 : 0;\n+\n+\t\t\tshift += (!!(ol_flags & PKT_TX_OUTER_IPV6) << 4);\n+\t\t\tshift += (!!(ol_flags & PKT_TX_IPV6) << 3);\n \n \t\t\tw1.il4type = NIX_SENDL4TYPE_TCP_CKSUM;\n \t\t\tw1.ol4type = is_udp_tun ? NIX_SENDL4TYPE_UDP_CKSUM : 0;\n \t\t\t/* Update format for UDP tunneled packet */\n-\t\t\tsend_hdr_ext->w0.lso_format += is_udp_tun ? 2 : 6;\n-\n-\t\t\tsend_hdr_ext->w0.lso_format +=\n-\t\t\t\t!!(ol_flags & PKT_TX_OUTER_IPV6) << 1;\n+\t\t\tsend_hdr_ext->w0.lso_format = (lso_tun_fmt >> shift);\n \t\t}\n \t}\n \n",
    "prefixes": []
}