get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66648,
    "url": "http://patches.dpdk.org/api/patches/66648/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200313174230.74661-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": "<20200313174230.74661-7-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200313174230.74661-7-yong.liu@intel.com",
    "date": "2020-03-13T17:42:29",
    "name": "[v1,6/7] net/virtio: add election for vectorized datapath",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "18cc200ed2f91a41dcc8d21d80409676687c9e65",
    "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/20200313174230.74661-7-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 8904,
            "url": "http://patches.dpdk.org/api/series/8904/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8904",
            "date": "2020-03-13T17:42:23",
            "name": "vectorize virtio packed ring datapath",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8904/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66648/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/66648/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 6AB95A0567;\n\tFri, 13 Mar 2020 11:08:19 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A302B1C0B5;\n\tFri, 13 Mar 2020 11:07:36 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id 092A41C06C\n for <dev@dpdk.org>; Fri, 13 Mar 2020 11:07:34 +0100 (CET)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 13 Mar 2020 03:07:34 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58])\n by orsmga006.jf.intel.com with ESMTP; 13 Mar 2020 03:07:33 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.70,548,1574150400\"; d=\"scan'208\";a=\"246653922\"",
        "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": "Sat, 14 Mar 2020 01:42:29 +0800",
        "Message-Id": "<20200313174230.74661-7-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200313174230.74661-1-yong.liu@intel.com>",
        "References": "<20200313174230.74661-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v1 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 can be selected when requirements are\nfulfilled.\n\n1. AVX512 is allowed by config file and compiler\n2. VERSION_1 and in_order features are negotiated\n3. ring size is power of two\n4. LRO and mergeable feature 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..d27306d50 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,26 @@ 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 = 1;\n+\t\t\thw->packed_vec_tx = 1;\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+\n+\t\tif (rx_offloads & DEV_RX_OFFLOAD_TCP_LRO)\n+\t\t\thw->packed_vec_rx = 0;\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;\ndiff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h\nindex 7433d2f08..8103b7a18 100644\n--- a/drivers/net/virtio/virtio_pci.h\n+++ b/drivers/net/virtio/virtio_pci.h\n@@ -251,6 +251,8 @@ struct virtio_hw {\n \tuint8_t\t    use_msix;\n \tuint8_t     modern;\n \tuint8_t     use_simple_rx;\n+\tuint8_t     packed_vec_rx;\n+\tuint8_t     packed_vec_tx;\n \tuint8_t     use_inorder_rx;\n \tuint8_t     use_inorder_tx;\n \tuint8_t     weak_barriers;\n",
    "prefixes": [
        "v1",
        "6/7"
    ]
}