get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 102744,
    "url": "http://patches.dpdk.org/api/patches/102744/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211025144725.115828-6-miao.li@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": "<20211025144725.115828-6-miao.li@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211025144725.115828-6-miao.li@intel.com",
    "date": "2021-10-25T14:47:25",
    "name": "[v8,5/5] examples/l3fwd-power: support virtio/vhost",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8e2cf469ae4901e052984a1201a90041a6ad4bef",
    "submitter": {
        "id": 2220,
        "url": "http://patches.dpdk.org/api/people/2220/?format=api",
        "name": "Li, Miao",
        "email": "miao.li@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/20211025144725.115828-6-miao.li@intel.com/mbox/",
    "series": [
        {
            "id": 19944,
            "url": "http://patches.dpdk.org/api/series/19944/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19944",
            "date": "2021-10-25T14:47:20",
            "name": "Support power monitor in virtio/vhost PMD",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/19944/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/102744/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/102744/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 64682A0C47;\n\tMon, 25 Oct 2021 08:44:04 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6BFF641152;\n\tMon, 25 Oct 2021 08:43:54 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id F0D3041121\n for <dev@dpdk.org>; Mon, 25 Oct 2021 08:43:51 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Oct 2021 23:43:51 -0700",
            "from limiao-icelake.sh.intel.com ([10.67.115.126])\n by orsmga006.jf.intel.com with ESMTP; 24 Oct 2021 23:43:50 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10147\"; a=\"216747141\"",
            "E=Sophos;i=\"5.87,179,1631602800\"; d=\"scan'208\";a=\"216747141\"",
            "E=Sophos;i=\"5.87,179,1631602800\"; d=\"scan'208\";a=\"446095685\""
        ],
        "X-ExtLoop1": "1",
        "From": "Miao Li <miao.li@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "chenbo.xia@intel.com, maxime.coquelin@redhat.com, miao.li@intel.com,\n David Hunt <david.hunt@intel.com>",
        "Date": "Mon, 25 Oct 2021 14:47:25 +0000",
        "Message-Id": "<20211025144725.115828-6-miao.li@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20211025144725.115828-1-miao.li@intel.com>",
        "References": "<20211018141638.5916-1-miao.li@intel.com>\n <20211025144725.115828-1-miao.li@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v8 5/5] examples/l3fwd-power: support virtio/vhost",
        "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": "In l3fwd-power, there is default port configuration which requires\nRSS and IPV4/UDP/TCP checksum. Once device does not support these,\nthe l3fwd-power will exit and report an error.\nThis patch updates the port configuration based on device capabilities\nafter getting the device information to support devices like virtio\nand vhost.\n\nSigned-off-by: Miao Li <miao.li@intel.com>\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>\nAcked-by: David Hunt <david.hunt@intel.com>\n---\n examples/l3fwd-power/main.c | 15 ++++++++++++++-\n 1 file changed, 14 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c\nindex 21c79567b1..d3adcad1a7 100644\n--- a/examples/l3fwd-power/main.c\n+++ b/examples/l3fwd-power/main.c\n@@ -505,7 +505,15 @@ is_valid_ipv4_pkt(struct rte_ipv4_hdr *pkt, uint32_t link_len)\n \t\treturn -1;\n \n \t/* 2. The IP checksum must be correct. */\n-\t/* this is checked in H/W */\n+\t/* if this is not checked in H/W, check it. */\n+\tif ((port_conf.rxmode.offloads & DEV_RX_OFFLOAD_IPV4_CKSUM) == 0) {\n+\t\tuint16_t actual_cksum, expected_cksum;\n+\t\tactual_cksum = pkt->hdr_checksum;\n+\t\tpkt->hdr_checksum = 0;\n+\t\texpected_cksum = rte_ipv4_cksum(pkt);\n+\t\tif (actual_cksum != expected_cksum)\n+\t\t\treturn -2;\n+\t}\n \n \t/*\n \t * 3. The IP version number must be 4. If the version number is not 4\n@@ -2652,6 +2660,11 @@ main(int argc, char **argv)\n \t\t\t\tlocal_port_conf.rx_adv_conf.rss_conf.rss_hf);\n \t\t}\n \n+\t\tif (local_port_conf.rx_adv_conf.rss_conf.rss_hf == 0)\n+\t\t\tlocal_port_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;\n+\t\tlocal_port_conf.rxmode.offloads &= dev_info.rx_offload_capa;\n+\t\tport_conf.rxmode.offloads = local_port_conf.rxmode.offloads;\n+\n \t\tret = rte_eth_dev_configure(portid, nb_rx_queue,\n \t\t\t\t\t(uint16_t)n_tx_queue, &local_port_conf);\n \t\tif (ret < 0)\n",
    "prefixes": [
        "v8",
        "5/5"
    ]
}