get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 19144,
    "url": "http://patches.dpdk.org/api/patches/19144/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1484154325-32204-1-git-send-email-olivier.matz@6wind.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": "<1484154325-32204-1-git-send-email-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1484154325-32204-1-git-send-email-olivier.matz@6wind.com",
    "date": "2017-01-11T17:05:25",
    "name": "[dpdk-dev] net/virtio: fix advertised Rx offload capabilities",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a9570ea91643c80e293302cb397d7205ff7441f1",
    "submitter": {
        "id": 8,
        "url": "http://patches.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": {
        "id": 355,
        "url": "http://patches.dpdk.org/api/users/355/?format=api",
        "username": "yliu",
        "first_name": "Yuanhan",
        "last_name": "Liu",
        "email": "yuanhan.liu@linux.intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1484154325-32204-1-git-send-email-olivier.matz@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/19144/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/19144/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 86437F91B;\n\tWed, 11 Jan 2017 18:05:34 +0100 (CET)",
            "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n\t[62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 99EF1F616;\n\tWed, 11 Jan 2017 18:05:33 +0100 (CET)",
            "from glumotte.dev.6wind.com (unknown [10.16.0.195])\n\tby proxy.6wind.com (Postfix) with ESMTP id 81F03268F7;\n\tWed, 11 Jan 2017 18:05:29 +0100 (CET)"
        ],
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org,\n\tyuanhan.liu@linux.intel.com",
        "Cc": "stable@dpdk.org",
        "Date": "Wed, 11 Jan 2017 18:05:25 +0100",
        "Message-Id": "<1484154325-32204-1-git-send-email-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.8.1",
        "Subject": "[dpdk-dev] [PATCH] net/virtio: fix advertised Rx offload\n\tcapabilities",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When the virtio PMD is used on top of a vhost that does not support\noffloads, Rx offload capabilities are still advertised by\nvirtio_dev_info_get(). But if an application tries to start the PMD with\nRx offloads enabled (rxmode.hw_ip_checksum = 1), the initialization of\nthe device will fail with -ENOTSUP and the following log:\n\n  rx ip checksum not available on this host\n\nThis patch fixes the Rx offload capabilities returned by\nvirtio_dev_info_get() to be consistent with features advertised by the\nhost.\n\nFixes: 96cb6711939e (\"net/virtio: support Rx checksum offload\")\nFixes: 86d59b21468a (\"net/virtio: support LRO\")\n\nCC: stable@dpdk.org\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n drivers/net/virtio/virtio_ethdev.c | 21 ++++++++++++++-------\n 1 file changed, 14 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 817fedf..0d7f587 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1629,7 +1629,7 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet\n static void\n virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n {\n-\tuint64_t tso_mask;\n+\tuint64_t tso_mask, host_features;\n \tstruct virtio_hw *hw = dev->data->dev_private;\n \n \tdev_info->pci_dev = hw->dev;\n@@ -1643,18 +1643,25 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \tdev_info->default_txconf = (struct rte_eth_txconf) {\n \t\t.txq_flags = ETH_TXQ_FLAGS_NOOFFLOADS\n \t};\n-\tdev_info->rx_offload_capa =\n-\t\tDEV_RX_OFFLOAD_TCP_CKSUM |\n-\t\tDEV_RX_OFFLOAD_UDP_CKSUM |\n-\t\tDEV_RX_OFFLOAD_TCP_LRO;\n-\tdev_info->tx_offload_capa = 0;\n \n+\thost_features = hw->vtpci_ops->get_features(hw);\n+\tdev_info->rx_offload_capa = 0;\n+\tif (host_features & (1ULL << VIRTIO_NET_F_GUEST_CSUM)) {\n+\t\tdev_info->rx_offload_capa |=\n+\t\t\tDEV_RX_OFFLOAD_TCP_CKSUM |\n+\t\t\tDEV_RX_OFFLOAD_UDP_CKSUM;\n+\t}\n+\ttso_mask = (1ULL << VIRTIO_NET_F_GUEST_TSO4) |\n+\t\t(1ULL << VIRTIO_NET_F_GUEST_TSO6);\n+\tif ((host_features & tso_mask) == tso_mask)\n+\t\tdev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TCP_LRO;\n+\n+\tdev_info->tx_offload_capa = 0;\n \tif (hw->guest_features & (1ULL << VIRTIO_NET_F_CSUM)) {\n \t\tdev_info->tx_offload_capa |=\n \t\t\tDEV_TX_OFFLOAD_UDP_CKSUM |\n \t\t\tDEV_TX_OFFLOAD_TCP_CKSUM;\n \t}\n-\n \ttso_mask = (1ULL << VIRTIO_NET_F_HOST_TSO4) |\n \t\t(1ULL << VIRTIO_NET_F_HOST_TSO6);\n \tif ((hw->guest_features & tso_mask) == tso_mask)\n",
    "prefixes": [
        "dpdk-dev"
    ]
}