get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 69439,
    "url": "https://patches.dpdk.org/api/patches/69439/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200428083255.110046-9-yong.liu@intel.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": "<20200428083255.110046-9-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200428083255.110046-9-yong.liu@intel.com",
    "date": "2020-04-28T08:32:54",
    "name": "[v11,8/9] net/virtio: add election for vectorized path",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "90af74840bc6aad942de7e38016735401b9fb64a",
    "submitter": {
        "id": 17,
        "url": "https://patches.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "https://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200428083255.110046-9-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 9697,
            "url": "https://patches.dpdk.org/api/series/9697/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9697",
            "date": "2020-04-28T08:32:46",
            "name": "add packed ring vectorized path",
            "version": 11,
            "mbox": "https://patches.dpdk.org/series/9697/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/69439/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/69439/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 BD9AEA00BE;\n\tTue, 28 Apr 2020 10:34:28 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0050E1D5C8;\n\tTue, 28 Apr 2020 10:33:20 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id 503E71D164\n for <dev@dpdk.org>; Tue, 28 Apr 2020 10:33:15 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2020 01:33:14 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56])\n by fmsmga005.fm.intel.com with ESMTP; 28 Apr 2020 01:33:13 -0700"
        ],
        "IronPort-SDR": [
            "\n YHhA430MANYKjiR/XdmeSye+DJKQbUPe6YRY9DWbzicp27WPM9YmKFdLBcqAn41EE6uL0fGgQb\n ym7Z1wOJXUZg==",
            "\n 8oWpB5st6amn05U64KxM7LyMji5VygILxfszcYos/JWD/zL2VqrWX725UkDMpJpMO2Qf4l3qNH\n 4pmPovy9PMpQ=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,327,1583222400\"; d=\"scan'208\";a=\"458709421\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com",
        "Cc": "dev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>",
        "Date": "Tue, 28 Apr 2020 16:32:54 +0800",
        "Message-Id": "<20200428083255.110046-9-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200428083255.110046-1-yong.liu@intel.com>",
        "References": "<20200313174230.74661-1-yong.liu@intel.com>\n <20200428083255.110046-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v11 8/9] net/virtio: add election for vectorized\n\tpath",
        "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": "Rewrite vectorized path selection logic. Default setting comes from\nvectorized devarg, then checks each criteria.\n\nPacked ring vectorized path need:\n    AVX512F and required extensions are supported by compiler and host\n    VERSION_1 and IN_ORDER features are negotiated\n    mergeable feature is not negotiated\n    LRO offloading is disabled\n\nSplit ring vectorized rx path need:\n    mergeable and IN_ORDER features are not negotiated\n    LRO, chksum and vlan strip offloadings are disabled\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 0a69a4db1..088d0e45e 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1523,9 +1523,12 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev)\n \tif (vtpci_packed_queue(hw)) {\n \t\tPMD_INIT_LOG(INFO,\n \t\t\t\"virtio: using packed ring %s Tx path on port %u\",\n-\t\t\thw->use_inorder_tx ? \"inorder\" : \"standard\",\n+\t\t\thw->use_vec_tx ? \"vectorized\" : \"standard\",\n \t\t\teth_dev->data->port_id);\n-\t\teth_dev->tx_pkt_burst = virtio_xmit_pkts_packed;\n+\t\tif (hw->use_vec_tx)\n+\t\t\teth_dev->tx_pkt_burst = virtio_xmit_pkts_packed_vec;\n+\t\telse\n+\t\t\teth_dev->tx_pkt_burst = virtio_xmit_pkts_packed;\n \t} else {\n \t\tif (hw->use_inorder_tx) {\n \t\t\tPMD_INIT_LOG(INFO, \"virtio: using inorder Tx path on port %u\",\n@@ -1539,7 +1542,13 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev)\n \t}\n \n \tif (vtpci_packed_queue(hw)) {\n-\t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n+\t\tif (hw->use_vec_rx) {\n+\t\t\tPMD_INIT_LOG(INFO,\n+\t\t\t\t\"virtio: using packed ring vectorized Rx path on port %u\",\n+\t\t\t\teth_dev->data->port_id);\n+\t\t\teth_dev->rx_pkt_burst =\n+\t\t\t\t&virtio_recv_pkts_packed_vec;\n+\t\t} else if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n \t\t\tPMD_INIT_LOG(INFO,\n \t\t\t\t\"virtio: using packed ring mergeable buffer Rx path on port %u\",\n \t\t\t\teth_dev->data->port_id);\n@@ -1952,8 +1961,17 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)\n \t\tgoto err_virtio_init;\n \n \tif (vectorized) {\n-\t\tif (!vtpci_packed_queue(hw))\n+\t\tif (!vtpci_packed_queue(hw)) {\n+\t\t\thw->use_vec_rx = 1;\n+\t\t} else {\n+#if !defined(CC_AVX512_SUPPORT)\n+\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\"building environment do not support packed ring vectorized\");\n+#else\n \t\t\thw->use_vec_rx = 1;\n+\t\t\thw->use_vec_tx = 1;\n+#endif\n+\t\t}\n \t}\n \n \thw->opened = true;\n@@ -2288,31 +2306,61 @@ virtio_dev_configure(struct rte_eth_dev *dev)\n \t\t\treturn -EBUSY;\n \t\t}\n \n-\tif (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER)) {\n-\t\thw->use_inorder_tx = 1;\n-\t\thw->use_inorder_rx = 1;\n-\t\thw->use_vec_rx = 0;\n-\t}\n-\n \tif (vtpci_packed_queue(hw)) {\n-\t\thw->use_vec_rx = 0;\n-\t\thw->use_inorder_rx = 0;\n-\t}\n+\t\tif ((hw->use_vec_rx || hw->use_vec_tx) &&\n+\t\t    (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) ||\n+\t\t     !vtpci_with_feature(hw, VIRTIO_F_IN_ORDER) ||\n+\t\t     !vtpci_with_feature(hw, VIRTIO_F_VERSION_1))) {\n+\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\"disabled packed ring vectorized path for requirements not met\");\n+\t\t\thw->use_vec_rx = 0;\n+\t\t\thw->use_vec_tx = 0;\n+\t\t}\n \n+\t\tif (hw->use_vec_rx) {\n+\t\t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled packed ring vectorized rx for mrg_rxbuf enabled\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n+\n+\t\t\tif (rx_offloads & DEV_RX_OFFLOAD_TCP_LRO) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled packed ring vectorized rx for TCP_LRO enabled\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n+\t\t}\n+\t} else {\n+\t\tif (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER)) {\n+\t\t\thw->use_inorder_tx = 1;\n+\t\t\thw->use_inorder_rx = 1;\n+\t\t\thw->use_vec_rx = 0;\n+\t\t}\n+\n+\t\tif (hw->use_vec_rx) {\n #if defined RTE_ARCH_ARM64 || defined RTE_ARCH_ARM\n-\tif (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON)) {\n-\t\thw->use_vec_rx = 0;\n-\t}\n+\t\t\tif (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON)) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled split ring vectorized path for requirement not met\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n #endif\n-\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n-\t\thw->use_vec_rx = 0;\n-\t}\n+\t\t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled split ring vectorized rx for mrg_rxbuf enabled\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n \n-\tif (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |\n-\t\t\t   DEV_RX_OFFLOAD_TCP_CKSUM |\n-\t\t\t   DEV_RX_OFFLOAD_TCP_LRO |\n-\t\t\t   DEV_RX_OFFLOAD_VLAN_STRIP))\n-\t\thw->use_vec_rx = 0;\n+\t\t\tif (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |\n+\t\t\t\t\t   DEV_RX_OFFLOAD_TCP_CKSUM |\n+\t\t\t\t\t   DEV_RX_OFFLOAD_TCP_LRO |\n+\t\t\t\t\t   DEV_RX_OFFLOAD_VLAN_STRIP)) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled split ring vectorized rx for offloading enabled\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n+\t\t}\n+\t}\n \n \treturn 0;\n }\n",
    "prefixes": [
        "v11",
        "8/9"
    ]
}