get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 67931,
    "url": "http://patches.dpdk.org/api/patches/67931/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200408085313.4487-7-yong.liu@intel.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": "<20200408085313.4487-7-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200408085313.4487-7-yong.liu@intel.com",
    "date": "2020-04-08T08:53:12",
    "name": "[v3,6/7] net/virtio: add election for vectorized datapath",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1f06de36ade3e1136131be1aac9b5d5ed71e1fb6",
    "submitter": {
        "id": 17,
        "url": "http://patches.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200408085313.4487-7-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 9240,
            "url": "http://patches.dpdk.org/api/series/9240/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9240",
            "date": "2020-04-08T08:53:06",
            "name": "add packed ring vectorized datapath",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/9240/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/67931/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/67931/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 3A137A0597;\n\tWed,  8 Apr 2020 03:18:56 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 83B0D1C0AD;\n\tWed,  8 Apr 2020 03:18:15 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 0818F1C069\n for <dev@dpdk.org>; Wed,  8 Apr 2020 03:18:12 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Apr 2020 18:18:12 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58])\n by fmsmga004.fm.intel.com with ESMTP; 07 Apr 2020 18:18:10 -0700"
        ],
        "IronPort-SDR": [
            "\n Y+4m8s1+p0yi2bZ2eCTRS6xcNrruh+Chx/YF856vQTueTPgT5/u3JqH7ZH9bTFDmP3r9L483K+\n kJXD37O6SbSA==",
            "\n Zq3Uwj557KaSeozBjmPEqKfELojig/yKdQ+BzOou1mQF9eJglDWkKEgj9cEB1LUC0jR4a4h8WT\n cXQkoI3/O4ag=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,357,1580803200\"; d=\"scan'208\";a=\"275288465\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com",
        "Cc": "harry.van.haaren@intel.com, dev@dpdk.org, Marvin Liu <yong.liu@intel.com>",
        "Date": "Wed,  8 Apr 2020 16:53:12 +0800",
        "Message-Id": "<20200408085313.4487-7-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200408085313.4487-1-yong.liu@intel.com>",
        "References": "<20200313174230.74661-1-yong.liu@intel.com>\n <20200408085313.4487-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 6/7] net/virtio: add election for vectorized\n\tdatapath",
        "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": "Packed ring vectorized datapath will be selected when criterian matched.\n\n1. AVX512 is enabled in dpdk config and supported by compiler\n2. Host cpu has AVX512F flag\n3. Ring size is power of two\n4. virtio VERSION_1 and IN_ORDER features are negotiated\n5. LRO and mergeable are disabled in Rx datapath\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex f9d0ea70d..21570e5cf 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1518,9 +1518,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->packed_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->packed_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@@ -1534,7 +1537,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->packed_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@@ -2159,6 +2168,34 @@ virtio_dev_configure(struct rte_eth_dev *dev)\n \n \thw->use_simple_rx = 1;\n \n+\tif (vtpci_packed_queue(hw)) {\n+#if defined(RTE_ARCH_X86) && defined(CC_AVX512_SUPPORT)\n+\t\tunsigned int vq_size;\n+\t\tvq_size = VTPCI_OPS(hw)->get_queue_num(hw, 0);\n+\t\tif (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) ||\n+\t\t    !rte_is_power_of_2(vq_size) ||\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\thw->packed_vec_rx = 0;\n+\t\t\thw->packed_vec_tx = 0;\n+\t\t\tPMD_DRV_LOG(INFO, \"disabled packed ring vectorized \"\n+\t\t\t\t\t  \"path for requirements are not met\");\n+\t\t}\n+\n+\t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n+\t\t\thw->packed_vec_rx = 0;\n+\t\t\tPMD_DRV_LOG(ERR, \"disabled packed ring vectorized rx \"\n+\t\t\t\t\t \"path for mrg_rxbuf enabled\");\n+\t\t}\n+\n+\t\tif (rx_offloads & DEV_RX_OFFLOAD_TCP_LRO) {\n+\t\t\thw->packed_vec_rx = 0;\n+\t\t\tPMD_DRV_LOG(ERR, \"disabled packed ring vectorized rx \"\n+\t\t\t\t\t \"path for TCP_LRO enabled\");\n+\t\t}\n+#endif\n+\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",
    "prefixes": [
        "v3",
        "6/7"
    ]
}