get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1216,
    "url": "https://patches.dpdk.org/api/patches/1216/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1415381738-43417-1-git-send-email-jyu@vmware.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": "<1415381738-43417-1-git-send-email-jyu@vmware.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1415381738-43417-1-git-send-email-jyu@vmware.com",
    "date": "2014-11-07T17:35:38",
    "name": "[dpdk-dev] Bond: set {rx|tx}_offload_capa flags",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a09863455aca14710b6459973cfe64f42dea8499",
    "submitter": {
        "id": 111,
        "url": "https://patches.dpdk.org/api/people/111/?format=api",
        "name": "Jia Yu",
        "email": "jyu@vmware.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1415381738-43417-1-git-send-email-jyu@vmware.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1216/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1216/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 2B42E7E9E;\n\tSat,  8 Nov 2014 02:34:38 +0100 (CET)",
            "from smtp-outbound-1.vmware.com (smtp-outbound-1.vmware.com\n\t[208.91.2.12]) by dpdk.org (Postfix) with ESMTP id A4DC7591A\n\tfor <dev@dpdk.org>; Sat,  8 Nov 2014 02:34:36 +0100 (CET)",
            "from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com\n\t[10.113.161.72])\n\tby smtp-outbound-1.vmware.com (Postfix) with ESMTP id 570B7285FE\n\tfor <dev@dpdk.org>; Fri,  7 Nov 2014 17:44:10 -0800 (PST)",
            "from prmh-edge-ivybridge-13.eng.vmware.com\n\t(prmh-edge-ivybridge-13.eng.vmware.com [10.24.235.96])\n\tby sc9-mailhost2.vmware.com (Postfix) with ESMTP id 527A0B162A;\n\tFri,  7 Nov 2014 17:44:10 -0800 (PST)"
        ],
        "From": "Jia Yu <jyu@vmware.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri,  7 Nov 2014 09:35:38 -0800",
        "Message-Id": "<1415381738-43417-1-git-send-email-jyu@vmware.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "Subject": "[dpdk-dev] [PATCH] Bond: set {rx|tx}_offload_capa flags",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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": "Before the fix, bond device's offload capabilities are unset. This fix\ntakes the minimum common set of slave devices' capabilities as bond\ndevice's capabilities. For simplicity, we ensure all slave devices\nto have a capability before bond device can claim this capability,\neven if some slave devices are unused (i.e. linked down, standby).\n\nSigned-off-by: Jia Yu <jyu@vmware.com>\n---\n lib/librte_pmd_bond/rte_eth_bond_api.c     | 16 ++++++++++++++++\n lib/librte_pmd_bond/rte_eth_bond_pmd.c     |  5 +++++\n lib/librte_pmd_bond/rte_eth_bond_private.h |  2 ++\n 3 files changed, 23 insertions(+)",
    "diff": "diff --git a/lib/librte_pmd_bond/rte_eth_bond_api.c b/lib/librte_pmd_bond/rte_eth_bond_api.c\nindex 75f5694..bff1ce1 100644\n--- a/lib/librte_pmd_bond/rte_eth_bond_api.c\n+++ b/lib/librte_pmd_bond/rte_eth_bond_api.c\n@@ -226,6 +226,8 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)\n \tinternals->link_props_set = 0;\n \tinternals->slave_count = 0;\n \tinternals->active_slave_count = 0;\n+\tinternals->rx_offload_capa = 0;\n+\tinternals->tx_offload_capa = 0;\n \n \tmemset(internals->active_slaves, 0, sizeof(internals->active_slaves));\n \tmemset(internals->slaves, 0, sizeof(internals->slaves));\n@@ -256,6 +258,7 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)\n \tstruct bond_dev_private *internals;\n \tstruct bond_dev_private *temp_internals;\n \tstruct rte_eth_link link_props;\n+\tstruct rte_eth_dev_info dev_info;\n \n \tint i, j;\n \n@@ -301,6 +304,9 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)\n \n \tslave_config_store(internals, slave_eth_dev);\n \n+\tmemset(&dev_info, 0, sizeof(dev_info));\n+\trte_eth_dev_info_get(slave_port_id, &dev_info);\n+\n \tif (internals->slave_count < 1) {\n \t\t/* if MAC is not user defined then use MAC of first slave add to bonded\n \t\t * device */\n@@ -312,6 +318,10 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)\n \n \t\t/* Make primary slave */\n \t\tinternals->primary_port = slave_port_id;\n+\n+\t\t/* Take the first dev's offload capabilities */\n+\t\tinternals->rx_offload_capa = dev_info.rx_offload_capa;\n+\t\tinternals->tx_offload_capa = dev_info.tx_offload_capa;\n \t} else {\n \t\t/* Check slave link properties are supported if props are set,\n \t\t * all slaves must be the same */\n@@ -327,6 +337,8 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)\n \t\t\tlink_properties_set(bonded_eth_dev,\n \t\t\t\t\t&(slave_eth_dev->data->dev_link));\n \t\t}\n+\t\tinternals->rx_offload_capa &= dev_info.rx_offload_capa;\n+\t\tinternals->tx_offload_capa &= dev_info.tx_offload_capa;\n \t}\n \n \tinternals->slave_count++;\n@@ -449,6 +461,10 @@ rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id)\n \t\t\t\t\tsizeof(*(rte_eth_devices[bonded_port_id].data->mac_addrs)));\n \t}\n \n+\tif (internals->slave_count == 0) {\n+\t\tinternals->rx_offload_capa = 0;\n+\t\tinternals->tx_offload_capa = 0;\n+        }\n \treturn 0;\n \n err_del:\ndiff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c\nindex 147028b..4653184 100644\n--- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n+++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n@@ -721,6 +721,8 @@ static int bond_ethdev_configure(struct rte_eth_dev *dev);\n static void\n bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n {\n+\tstruct bond_dev_private *internals = dev->data->dev_private;\n+\n \tdev_info->driver_name = driver_name;\n \tdev_info->max_mac_addrs = 1;\n \n@@ -731,6 +733,9 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \n \tdev_info->min_rx_bufsize = 0;\n \tdev_info->pci_dev = dev->pci_dev;\n+\n+\tdev_info->rx_offload_capa = internals->rx_offload_capa;\n+\tdev_info->tx_offload_capa = internals->tx_offload_capa;\n }\n \n static int\ndiff --git a/lib/librte_pmd_bond/rte_eth_bond_private.h b/lib/librte_pmd_bond/rte_eth_bond_private.h\nindex 1db6e4d..495726d 100644\n--- a/lib/librte_pmd_bond/rte_eth_bond_private.h\n+++ b/lib/librte_pmd_bond/rte_eth_bond_private.h\n@@ -121,6 +121,8 @@ struct bond_dev_private {\n \tuint8_t active_slaves[RTE_MAX_ETHPORTS];\t/**< Active slave list */\n \tuint8_t slaves[RTE_MAX_ETHPORTS];\t\t\t/**< Slave list */\n \n+\tuint32_t rx_offload_capa;            /** Bond device Rx offload capability */\n+\tuint32_t tx_offload_capa;            /** Bond device Tx offload capability */\n \t/** Persisted configuration of slaves */\n \tstruct slave_conf presisted_slaves_conf[RTE_MAX_ETHPORTS];\n \n",
    "prefixes": [
        "dpdk-dev"
    ]
}