get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 10580,
    "url": "https://patches.dpdk.org/api/patches/10580/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1455765467-3465-2-git-send-email-wenzhuo.lu@intel.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": "<1455765467-3465-2-git-send-email-wenzhuo.lu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1455765467-3465-2-git-send-email-wenzhuo.lu@intel.com",
    "date": "2016-02-18T03:17:43",
    "name": "[dpdk-dev,v3,1/5] lib/librte_ether: change function name of tunnel port config",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f356a76d70b73470027b7cb6fe972dea699d55d6",
    "submitter": {
        "id": 258,
        "url": "https://patches.dpdk.org/api/people/258/?format=api",
        "name": "Wenzhuo Lu",
        "email": "wenzhuo.lu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1455765467-3465-2-git-send-email-wenzhuo.lu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/10580/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/10580/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 AB3F1C33A;\n\tThu, 18 Feb 2016 04:18:03 +0100 (CET)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 9BDE0C1C6\n\tfor <dev@dpdk.org>; Thu, 18 Feb 2016 04:18:01 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga104.fm.intel.com with ESMTP; 17 Feb 2016 19:18:00 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 17 Feb 2016 19:17:59 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id u1I3HvX4032090;\n\tThu, 18 Feb 2016 11:17:57 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid u1I3Hshx003510; Thu, 18 Feb 2016 11:17:56 +0800",
            "(from wenzhuol@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u1I3HsdC003506; \n\tThu, 18 Feb 2016 11:17:54 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.22,463,1449561600\"; d=\"scan'208\";a=\"888304484\"",
        "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 18 Feb 2016 11:17:43 +0800",
        "Message-Id": "<1455765467-3465-2-git-send-email-wenzhuo.lu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1455765467-3465-1-git-send-email-wenzhuo.lu@intel.com>",
        "References": "<1452496044-17524-1-git-send-email-wenzhuo.lu@intel.com>\n\t<1455765467-3465-1-git-send-email-wenzhuo.lu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 1/5] lib/librte_ether: change function name of\n\ttunnel port config",
        "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": "The names of function for tunnel port configuration are not\naccurate. They're tunnel_add/del, better change them to\ntunnel_port_add/del.\nAs it may be an ABI change if change the names directly, the\nnew functions are added but not remove the old ones. The old\nones will be removed in the next release after an ABI change\nannouncement.\n\nSigned-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>\n---\n app/test-pmd/cmdline.c                 |  6 +++--\n examples/tep_termination/vxlan_setup.c |  2 +-\n lib/librte_ether/rte_ethdev.c          | 45 ++++++++++++++++++++++++++++++++++\n lib/librte_ether/rte_ethdev.h          | 18 ++++++++++++++\n 4 files changed, 68 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 73298c9..4e71e90 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -6780,9 +6780,11 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,\n \t\ttunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;\n \n \tif (!strcmp(res->what, \"add\"))\n-\t\tret = rte_eth_dev_udp_tunnel_add(res->port_id, &tunnel_udp);\n+\t\tret = rte_eth_dev_udp_tunnel_port_add(res->port_id,\n+\t\t\t\t\t\t      &tunnel_udp);\n \telse\n-\t\tret = rte_eth_dev_udp_tunnel_delete(res->port_id, &tunnel_udp);\n+\t\tret = rte_eth_dev_udp_tunnel_port_delete(res->port_id,\n+\t\t\t\t\t\t\t &tunnel_udp);\n \n \tif (ret < 0)\n \t\tprintf(\"udp tunneling add error: (%s)\\n\", strerror(-ret));\ndiff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c\nindex 51ad133..8836603 100644\n--- a/examples/tep_termination/vxlan_setup.c\n+++ b/examples/tep_termination/vxlan_setup.c\n@@ -191,7 +191,7 @@ vxlan_port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n \t/* Configure UDP port for UDP tunneling */\n \ttunnel_udp.udp_port = udp_port;\n \ttunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;\n-\tretval = rte_eth_dev_udp_tunnel_add(port, &tunnel_udp);\n+\tretval = rte_eth_dev_udp_tunnel_port_add(port, &tunnel_udp);\n \tif (retval < 0)\n \t\treturn retval;\n \trte_eth_macaddr_get(port, &ports_eth_addr[port]);\ndiff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex ed971b4..74428f4 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -1987,6 +1987,28 @@ rte_eth_dev_udp_tunnel_add(uint8_t port_id,\n }\n \n int\n+rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,\n+\t\t\t\tstruct rte_eth_udp_tunnel *udp_tunnel)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tif (udp_tunnel == NULL) {\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid udp_tunnel parameter\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (udp_tunnel->prot_type >= RTE_TUNNEL_TYPE_MAX) {\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid tunnel type\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tdev = &rte_eth_devices[port_id];\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->udp_tunnel_port_add, -ENOTSUP);\n+\treturn (*dev->dev_ops->udp_tunnel_port_add)(dev, udp_tunnel);\n+}\n+\n+int\n rte_eth_dev_udp_tunnel_delete(uint8_t port_id,\n \t\t\t      struct rte_eth_udp_tunnel *udp_tunnel)\n {\n@@ -2010,6 +2032,29 @@ rte_eth_dev_udp_tunnel_delete(uint8_t port_id,\n }\n \n int\n+rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,\n+\t\t\t\t   struct rte_eth_udp_tunnel *udp_tunnel)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (udp_tunnel == NULL) {\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid udp_tunnel parameter\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (udp_tunnel->prot_type >= RTE_TUNNEL_TYPE_MAX) {\n+\t\tRTE_PMD_DEBUG_TRACE(\"Invalid tunnel type\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->udp_tunnel_port_del, -ENOTSUP);\n+\treturn (*dev->dev_ops->udp_tunnel_port_del)(dev, udp_tunnel);\n+}\n+\n+int\n rte_eth_led_on(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex bada8ad..2e064f4 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -1261,6 +1261,14 @@ typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,\n \t\t\t\tstruct rte_dev_eeprom_info *info);\n /**< @internal Program eeprom data  */\n \n+typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t struct rte_eth_udp_tunnel *tunnel_udp);\n+/**< @internal Add tunneling UDP port */\n+\n+typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,\n+\t\t\t\t\t struct rte_eth_udp_tunnel *tunnel_udp);\n+/**< @internal Delete tunneling UDP port */\n+\n #ifdef RTE_NIC_BYPASS\n \n enum {\n@@ -1443,6 +1451,10 @@ struct eth_dev_ops {\n \teth_timesync_read_time timesync_read_time;\n \t/** Set the device clock time. */\n \teth_timesync_write_time timesync_write_time;\n+\t/** Add UDP tunnel port. */\n+\teth_udp_tunnel_port_add_t udp_tunnel_port_add;\n+\t/** Del UDP tunnel port. */\n+\teth_udp_tunnel_port_del_t udp_tunnel_port_del;\n };\n \n /**\n@@ -3408,6 +3420,9 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id,\n int\n rte_eth_dev_udp_tunnel_add(uint8_t port_id,\n \t\t\t   struct rte_eth_udp_tunnel *tunnel_udp);\n+int\n+rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,\n+\t\t\t\tstruct rte_eth_udp_tunnel *tunnel_udp);\n \n  /**\n  * Detete UDP tunneling port configuration of Ethernet device\n@@ -3425,6 +3440,9 @@ rte_eth_dev_udp_tunnel_add(uint8_t port_id,\n int\n rte_eth_dev_udp_tunnel_delete(uint8_t port_id,\n \t\t\t      struct rte_eth_udp_tunnel *tunnel_udp);\n+int\n+rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,\n+\t\t\t\t   struct rte_eth_udp_tunnel *tunnel_udp);\n \n /**\n  * Check whether the filter type is supported on an Ethernet device.\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "1/5"
    ]
}