get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135625,
    "url": "http://patchwork.dpdk.org/api/patches/135625/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231228102611.921850-2-mingjinx.ye@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20231228102611.921850-2-mingjinx.ye@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231228102611.921850-2-mingjinx.ye@intel.com",
    "date": "2023-12-28T10:26:10",
    "name": "[v5,1/2] net/iavf: fix Tx path error in multi-process",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b1769ea543a5a2169cba37fa78837fce5e2167f0",
    "submitter": {
        "id": 2862,
        "url": "http://patchwork.dpdk.org/api/people/2862/?format=api",
        "name": "Mingjin Ye",
        "email": "mingjinx.ye@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patchwork.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231228102611.921850-2-mingjinx.ye@intel.com/mbox/",
    "series": [
        {
            "id": 30681,
            "url": "http://patchwork.dpdk.org/api/series/30681/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30681",
            "date": "2023-12-28T10:26:09",
            "name": "net/iavf: add diagnostics and fix error",
            "version": 5,
            "mbox": "http://patchwork.dpdk.org/series/30681/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/135625/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/135625/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 D29E1437B1;\n\tThu, 28 Dec 2023 11:42:25 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BFE0D402E5;\n\tThu, 28 Dec 2023 11:42:25 +0100 (CET)",
            "from mgamail.intel.com (mgamail.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 95D60402BA;\n Thu, 28 Dec 2023 11:42:23 +0100 (CET)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Dec 2023 02:42:22 -0800",
            "from unknown (HELO localhost.localdomain) ([10.239.252.253])\n by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Dec 2023 02:42:19 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1703760143; x=1735296143;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=mkObNZG2DHaOQ7EdiYjpC1/mSaE4jJem9om2Mj1FQTI=;\n b=L/fu2zis1Ia/mBXO//QH3iZ2ej7DM8XGrs78UJJFX6Lzc/j0Ds8Ah7qN\n xeY6/yxmS814vpfLeBlh0X4sHgakPAEKQ2Bq697Ja/LFzwLRk3VgeSIQl\n ASLpUPaXKLzHIH804ijw2LFIhf24/tVDMds3JkcuHlcklEBDkeiKrLf5H\n aNpz1qUWFjDV9zrQzr+ZhD6WN5zGEONNAg7XD67VAY0/SLvR293GPR2Ey\n X1UmHaiLbxT46h38XovAuD28lxilCYvnGNBBiFm190o0EKQjKi3e67A3o\n 61gWB/5KEJ92GZgOBpIFUSVF/r3Flxu/m00WorpYlSCUP7IXB/wWU4ukX g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10936\"; a=\"427707196\"",
            "E=Sophos;i=\"6.04,311,1695711600\"; d=\"scan'208\";a=\"427707196\"",
            "E=McAfee;i=\"6600,9927,10936\"; a=\"754707566\"",
            "E=Sophos;i=\"6.04,311,1695711600\"; d=\"scan'208\";a=\"754707566\""
        ],
        "X-ExtLoop1": "1",
        "From": "Mingjin Ye <mingjinx.ye@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qiming.yang@intel.com, Mingjin Ye <mingjinx.ye@intel.com>,\n stable@dpdk.org,\n Jingjing Wu <jingjing.wu@intel.com>, Beilei Xing <beilei.xing@intel.com>",
        "Subject": "[PATCH v5 1/2] net/iavf: fix Tx path error in multi-process",
        "Date": "Thu, 28 Dec 2023 10:26:10 +0000",
        "Message-Id": "<20231228102611.921850-2-mingjinx.ye@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20231228102611.921850-1-mingjinx.ye@intel.com>",
        "References": "<20231227101655.799560-1-mingjinx.ye@intel.com>\n <20231228102611.921850-1-mingjinx.ye@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "In a multi-process environment, a secondary process operates on shared\nmemory and changes the PMD transmit function pointer of the primary\nprocess, causing the primary process to send pkts without being able\nto find the function address, resulting in a crash.\n\nFixes: 5b3124a0a6ef (\"net/iavf: support no polling when link down\")\nCc: stable@dpdk.org\n\nSigned-off-by: Mingjin Ye <mingjinx.ye@intel.com>\n---\n drivers/net/iavf/iavf.h      | 12 +++++++++++-\n drivers/net/iavf/iavf_rxtx.c | 34 +++++++++++++++++++++++++++++++---\n drivers/net/iavf/iavf_rxtx.h |  3 +++\n 3 files changed, 45 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h\nindex 10868f2c30..4cd5bea167 100644\n--- a/drivers/net/iavf/iavf.h\n+++ b/drivers/net/iavf/iavf.h\n@@ -313,6 +313,16 @@ struct iavf_devargs {\n \n struct iavf_security_ctx;\n \n+enum iavf_tx_pkt_burst_type {\n+\tIAVF_PKT_BURST_DEFAULT\t\t= 0,\n+\tIAVF_PKT_BURST_VEC\t\t= 1,\n+\tIAVF_PKT_BURST_VEC_AVX2\t\t= 2,\n+\tIAVF_PKT_BURST_VEC_AVX2_OFFLOAD\t= 3,\n+\tIAVF_PKT_BURST_VEC_AVX512\t= 4,\n+\tIAVF_PKT_BURST_VEC_AVX512_OFFLOAD\t= 5,\n+\tIAVF_PKT_BURST_VEC_AVX512_CTX_OFFLOAD\t= 6,\n+};\n+\n /* Structure to store private data for each VF instance. */\n struct iavf_adapter {\n \tstruct iavf_hw hw;\n@@ -329,7 +339,7 @@ struct iavf_adapter {\n \tbool closed;\n \tbool no_poll;\n \teth_rx_burst_t rx_pkt_burst;\n-\teth_tx_burst_t tx_pkt_burst;\n+\tenum iavf_tx_pkt_burst_type tx_burst_type;\n \tuint16_t fdir_ref_cnt;\n \tstruct iavf_devargs devargs;\n };\ndiff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c\nindex f19aa14646..0d95447054 100644\n--- a/drivers/net/iavf/iavf_rxtx.c\n+++ b/drivers/net/iavf/iavf_rxtx.c\n@@ -425,6 +425,23 @@ struct iavf_txq_ops iavf_txq_release_mbufs_ops[] = {\n \n };\n \n+static const\n+struct iavf_tx_burst_ops iavf_tx_pkt_burst_ops[] = {\n+\t[IAVF_PKT_BURST_DEFAULT].tx_pkt_burst = iavf_xmit_pkts,\n+#ifdef RTE_ARCH_X86\n+\t[IAVF_PKT_BURST_VEC].tx_pkt_burst = iavf_xmit_pkts_vec,\n+\t[IAVF_PKT_BURST_VEC_AVX2].tx_pkt_burst = iavf_xmit_pkts_vec_avx2,\n+\t[IAVF_PKT_BURST_VEC_AVX2_OFFLOAD].tx_pkt_burst = iavf_xmit_pkts_vec_avx2_offload,\n+#ifdef CC_AVX512_SUPPORT\n+\t[IAVF_PKT_BURST_VEC_AVX512].tx_pkt_burst = iavf_xmit_pkts_vec_avx512,\n+\t[IAVF_PKT_BURST_VEC_AVX512_OFFLOAD].tx_pkt_burst =\n+\t\tiavf_xmit_pkts_vec_avx512_offload,\n+\t[IAVF_PKT_BURST_VEC_AVX512_CTX_OFFLOAD].tx_pkt_burst =\n+\t\tiavf_xmit_pkts_vec_avx512_ctx_offload,\n+#endif\n+#endif\n+};\n+\n static inline void\n iavf_rxd_to_pkt_fields_by_comms_ovs(__rte_unused struct iavf_rx_queue *rxq,\n \t\t\t\t    struct rte_mbuf *mb,\n@@ -3724,10 +3741,13 @@ iavf_xmit_pkts_no_poll(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\t\tuint16_t nb_pkts)\n {\n \tstruct iavf_tx_queue *txq = tx_queue;\n+\tenum iavf_tx_pkt_burst_type tx_burst_type =\n+\t\ttxq->vsi->adapter->tx_burst_type;\n+\n \tif (!txq->vsi || txq->vsi->adapter->no_poll)\n \t\treturn 0;\n \n-\treturn txq->vsi->adapter->tx_pkt_burst(tx_queue,\n+\treturn iavf_tx_pkt_burst_ops[tx_burst_type].tx_pkt_burst(tx_queue,\n \t\t\t\t\t\t\t\ttx_pkts, nb_pkts);\n }\n \n@@ -3975,6 +3995,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)\n {\n \tstruct iavf_adapter *adapter =\n \t\tIAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n+\tenum iavf_tx_pkt_burst_type tx_burst_type;\n \tint no_poll_on_link_down = adapter->devargs.no_poll_on_link_down;\n #ifdef RTE_ARCH_X86\n \tstruct iavf_tx_queue *txq;\n@@ -4011,10 +4032,12 @@ iavf_set_tx_function(struct rte_eth_dev *dev)\n \t\t\tPMD_DRV_LOG(DEBUG, \"Using Vector Tx (port %d).\",\n \t\t\t\t    dev->data->port_id);\n \t\t\tdev->tx_pkt_burst = iavf_xmit_pkts_vec;\n+\t\t\ttx_burst_type = IAVF_PKT_BURST_VEC;\n \t\t}\n \t\tif (use_avx2) {\n \t\t\tif (check_ret == IAVF_VECTOR_PATH) {\n \t\t\t\tdev->tx_pkt_burst = iavf_xmit_pkts_vec_avx2;\n+\t\t\t\ttx_burst_type = IAVF_PKT_BURST_VEC_AVX2;\n \t\t\t\tPMD_DRV_LOG(DEBUG, \"Using AVX2 Vector Tx (port %d).\",\n \t\t\t\t\t    dev->data->port_id);\n \t\t\t} else if (check_ret == IAVF_VECTOR_CTX_OFFLOAD_PATH) {\n@@ -4023,6 +4046,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)\n \t\t\t\tgoto normal;\n \t\t\t} else {\n \t\t\t\tdev->tx_pkt_burst = iavf_xmit_pkts_vec_avx2_offload;\n+\t\t\t\ttx_burst_type = IAVF_PKT_BURST_VEC_AVX2_OFFLOAD;\n \t\t\t\tdev->tx_pkt_prepare = iavf_prep_pkts;\n \t\t\t\tPMD_DRV_LOG(DEBUG, \"Using AVX2 OFFLOAD Vector Tx (port %d).\",\n \t\t\t\t\t    dev->data->port_id);\n@@ -4032,15 +4056,18 @@ iavf_set_tx_function(struct rte_eth_dev *dev)\n \t\tif (use_avx512) {\n \t\t\tif (check_ret == IAVF_VECTOR_PATH) {\n \t\t\t\tdev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512;\n+\t\t\t\ttx_burst_type = IAVF_PKT_BURST_VEC_AVX512;\n \t\t\t\tPMD_DRV_LOG(DEBUG, \"Using AVX512 Vector Tx (port %d).\",\n \t\t\t\t\t    dev->data->port_id);\n \t\t\t} else if (check_ret == IAVF_VECTOR_OFFLOAD_PATH) {\n \t\t\t\tdev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_offload;\n+\t\t\t\ttx_burst_type = IAVF_PKT_BURST_VEC_AVX512_OFFLOAD;\n \t\t\t\tdev->tx_pkt_prepare = iavf_prep_pkts;\n \t\t\t\tPMD_DRV_LOG(DEBUG, \"Using AVX512 OFFLOAD Vector Tx (port %d).\",\n \t\t\t\t\t    dev->data->port_id);\n \t\t\t} else {\n \t\t\t\tdev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_ctx_offload;\n+\t\t\t\ttx_burst_type = IAVF_PKT_BURST_VEC_AVX512_CTX_OFFLOAD;\n \t\t\t\tdev->tx_pkt_prepare = iavf_prep_pkts;\n \t\t\t\tPMD_DRV_LOG(DEBUG, \"Using AVX512 CONTEXT OFFLOAD Vector Tx (port %d).\",\n \t\t\t\t\t    dev->data->port_id);\n@@ -4063,7 +4090,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)\n \t\t}\n \n \t\tif (no_poll_on_link_down) {\n-\t\t\tadapter->tx_pkt_burst = dev->tx_pkt_burst;\n+\t\t\tadapter->tx_burst_type = tx_burst_type;\n \t\t\tdev->tx_pkt_burst = iavf_xmit_pkts_no_poll;\n \t\t}\n \t\treturn;\n@@ -4074,10 +4101,11 @@ iavf_set_tx_function(struct rte_eth_dev *dev)\n \tPMD_DRV_LOG(DEBUG, \"Using Basic Tx callback (port=%d).\",\n \t\t    dev->data->port_id);\n \tdev->tx_pkt_burst = iavf_xmit_pkts;\n+\ttx_burst_type = IAVF_PKT_BURST_DEFAULT;\n \tdev->tx_pkt_prepare = iavf_prep_pkts;\n \n \tif (no_poll_on_link_down) {\n-\t\tadapter->tx_pkt_burst = dev->tx_pkt_burst;\n+\t\tadapter->tx_burst_type = tx_burst_type;\n \t\tdev->tx_pkt_burst = iavf_xmit_pkts_no_poll;\n \t}\n }\ndiff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h\nindex f432f9d956..fadc931b51 100644\n--- a/drivers/net/iavf/iavf_rxtx.h\n+++ b/drivers/net/iavf/iavf_rxtx.h\n@@ -203,6 +203,9 @@ struct iavf_txq_ops {\n \tvoid (*release_mbufs)(struct iavf_tx_queue *txq);\n };\n \n+struct iavf_tx_burst_ops {\n+\teth_tx_burst_t tx_pkt_burst;\n+};\n \n struct iavf_rx_queue_stats {\n \tuint64_t reserved;\n",
    "prefixes": [
        "v5",
        "1/2"
    ]
}