get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 21292,
    "url": "http://patches.dpdk.org/api/patches/21292/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/562c8406484ecc8c4ca661b27ba7b4fdde2711ec.1488542158.git.pascal.mazon@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": "<562c8406484ecc8c4ca661b27ba7b4fdde2711ec.1488542158.git.pascal.mazon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/562c8406484ecc8c4ca661b27ba7b4fdde2711ec.1488542158.git.pascal.mazon@6wind.com",
    "date": "2017-03-03T12:27:39",
    "name": "[dpdk-dev,2/4] net/tap: reflect tap flags on the remote",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "63b9aa31e1cee4e1f02523d1bd7521d17e9ea81b",
    "submitter": {
        "id": 657,
        "url": "http://patches.dpdk.org/api/people/657/?format=api",
        "name": "Pascal Mazon",
        "email": "pascal.mazon@6wind.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/562c8406484ecc8c4ca661b27ba7b4fdde2711ec.1488542158.git.pascal.mazon@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/21292/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/21292/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 3818FD586;\n\tFri,  3 Mar 2017 13:29:00 +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 BF9FF591E\n\tfor <dev@dpdk.org>; Fri,  3 Mar 2017 13:28:34 +0100 (CET)",
            "from 6wind.com (unknown [10.16.0.184])\n\tby proxy.6wind.com (Postfix) with SMTP id F1DE024D73;\n\tFri,  3 Mar 2017 13:28:28 +0100 (CET)",
            "by 6wind.com (sSMTP sendmail emulation);\n\tFri, 03 Mar 2017 13:28:27 +0100"
        ],
        "From": "Pascal Mazon <pascal.mazon@6wind.com>",
        "To": "keith.wiles@intel.com",
        "Cc": "dev@dpdk.org,\n\tPascal Mazon <pascal.mazon@6wind.com>",
        "Date": "Fri,  3 Mar 2017 13:27:39 +0100",
        "Message-Id": "<562c8406484ecc8c4ca661b27ba7b4fdde2711ec.1488542158.git.pascal.mazon@6wind.com>",
        "X-Mailer": "git-send-email 2.8.0.rc0",
        "In-Reply-To": "<cover.1488542158.git.pascal.mazon@6wind.com>",
        "References": "<cover.1488542158.git.pascal.mazon@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH 2/4] net/tap: reflect tap flags on the remote",
        "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": "Synchronize PROMISC and ALLMULTI flags to the remote netdevice if\npossible.\n\nLeave the IFF_UP flag as it is, however.\n\nSigned-off-by: Pascal Mazon <pascal.mazon@6wind.com>\nAcked-by: Olga Shern <olgas@mellanox.com>\n---\n drivers/net/tap/rte_eth_tap.c | 36 +++++++++++++++++++++++-------------\n drivers/net/tap/tap.h         |  1 +\n 2 files changed, 24 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\nindex 327fefd0d3a1..c77f206b4f60 100644\n--- a/drivers/net/tap/rte_eth_tap.c\n+++ b/drivers/net/tap/rte_eth_tap.c\n@@ -249,7 +249,7 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n }\n \n static int\n-tap_link_set_flags(struct pmd_internals *pmd, short flags, int add)\n+tap_netdev_set_flags(const char *iface, short flags, int add)\n {\n \tstruct ifreq ifr;\n \tint err, s;\n@@ -266,11 +266,11 @@ tap_link_set_flags(struct pmd_internals *pmd, short flags, int add)\n \t\treturn -1;\n \t}\n \tmemset(&ifr, 0, sizeof(ifr));\n-\tsnprintf(ifr.ifr_name, IFNAMSIZ, \"%s\", pmd->name);\n+\tsnprintf(ifr.ifr_name, IFNAMSIZ, \"%s\", iface);\n \terr = ioctl(s, SIOCGIFFLAGS, &ifr);\n \tif (err < 0) {\n \t\tRTE_LOG(WARNING, PMD, \"Unable to get %s device flags: %s\\n\",\n-\t\t\tpmd->name, strerror(errno));\n+\t\t\tiface, strerror(errno));\n \t\tclose(s);\n \t\treturn -1;\n \t}\n@@ -288,6 +288,7 @@ tap_link_set_flags(struct pmd_internals *pmd, short flags, int add)\n \tclose(s);\n \n \treturn 0;\n+\n }\n \n static int\n@@ -296,7 +297,7 @@ tap_link_set_down(struct rte_eth_dev *dev)\n \tstruct pmd_internals *pmd = dev->data->dev_private;\n \n \tdev->data->dev_link.link_status = ETH_LINK_DOWN;\n-\treturn tap_link_set_flags(pmd, IFF_UP | IFF_NOARP, 0);\n+\treturn tap_netdev_set_flags(pmd->name, IFF_UP | IFF_NOARP, 0);\n }\n \n static int\n@@ -305,7 +306,7 @@ tap_link_set_up(struct rte_eth_dev *dev)\n \tstruct pmd_internals *pmd = dev->data->dev_private;\n \n \tdev->data->dev_link.link_status = ETH_LINK_UP;\n-\treturn tap_link_set_flags(pmd, IFF_UP | IFF_NOARP, 1);\n+\treturn tap_netdev_set_flags(pmd->name, IFF_UP | IFF_NOARP, 1);\n }\n \n static int\n@@ -476,9 +477,11 @@ tap_promisc_enable(struct rte_eth_dev *dev)\n \tstruct pmd_internals *pmd = dev->data->dev_private;\n \n \tdev->data->promiscuous = 1;\n-\ttap_link_set_flags(pmd, IFF_PROMISC, 1);\n-\tif (pmd->remote_if_index)\n+\ttap_netdev_set_flags(pmd->name, IFF_PROMISC, 1);\n+\tif (pmd->remote_if_index) {\n \t\ttap_flow_implicit_create(pmd, TAP_REMOTE_PROMISC);\n+\t\ttap_netdev_set_flags(pmd->remote_iface, IFF_PROMISC, 1);\n+\t}\n }\n \n static void\n@@ -487,9 +490,11 @@ tap_promisc_disable(struct rte_eth_dev *dev)\n \tstruct pmd_internals *pmd = dev->data->dev_private;\n \n \tdev->data->promiscuous = 0;\n-\ttap_link_set_flags(pmd, IFF_PROMISC, 0);\n-\tif (pmd->remote_if_index)\n+\ttap_netdev_set_flags(pmd->name, IFF_PROMISC, 0);\n+\tif (pmd->remote_if_index) {\n \t\ttap_flow_implicit_destroy(dev, TAP_REMOTE_PROMISC);\n+\t\ttap_netdev_set_flags(pmd->remote_iface, IFF_PROMISC, 0);\n+\t}\n }\n \n static void\n@@ -498,9 +503,11 @@ tap_allmulti_enable(struct rte_eth_dev *dev)\n \tstruct pmd_internals *pmd = dev->data->dev_private;\n \n \tdev->data->all_multicast = 1;\n-\ttap_link_set_flags(pmd, IFF_ALLMULTI, 1);\n-\tif (pmd->remote_if_index)\n+\ttap_netdev_set_flags(pmd->name, IFF_ALLMULTI, 1);\n+\tif (pmd->remote_if_index) {\n \t\ttap_flow_implicit_create(pmd, TAP_REMOTE_ALLMULTI);\n+\t\ttap_netdev_set_flags(pmd->remote_iface, IFF_ALLMULTI, 1);\n+\t}\n }\n \n static void\n@@ -509,9 +516,11 @@ tap_allmulti_disable(struct rte_eth_dev *dev)\n \tstruct pmd_internals *pmd = dev->data->dev_private;\n \n \tdev->data->all_multicast = 0;\n-\ttap_link_set_flags(pmd, IFF_ALLMULTI, 0);\n-\tif (pmd->remote_if_index)\n+\ttap_netdev_set_flags(pmd->name, IFF_ALLMULTI, 0);\n+\tif (pmd->remote_if_index) {\n \t\ttap_flow_implicit_destroy(dev, TAP_REMOTE_ALLMULTI);\n+\t\ttap_netdev_set_flags(pmd->remote_iface, IFF_ALLMULTI, 0);\n+\t}\n }\n \n static void\n@@ -924,6 +933,7 @@ eth_dev_tap_create(const char *name, char *tap_name, char *remote_iface)\n \t */\n \tpmd->nlsk_fd = nl_init();\n \tif (strlen(remote_iface)) {\n+\t\tstrncpy(pmd->remote_iface, remote_iface, RTE_ETH_NAME_MAX_LEN);\n \t\tpmd->remote_if_index = if_nametoindex(remote_iface);\n \t\tif (!pmd->remote_if_index)\n \t\t\tRTE_LOG(ERR, PMD, \"Could not find %s ifindex: \"\ndiff --git a/drivers/net/tap/tap.h b/drivers/net/tap/tap.h\nindex a5f83d4feea3..2afd0f9a4a58 100644\n--- a/drivers/net/tap/tap.h\n+++ b/drivers/net/tap/tap.h\n@@ -64,6 +64,7 @@ struct tx_queue {\n \n struct pmd_internals {\n \tchar name[RTE_ETH_NAME_MAX_LEN]; /* Internal Tap device name */\n+\tchar remote_iface[RTE_ETH_NAME_MAX_LEN]; /* Remote netdevice name */\n \tint nlsk_fd; /* Netlink socket fd */\n \tuint16_t nb_queues; /* Number of queues supported */\n \tstruct ether_addr eth_addr; /* Mac address of the device port */\n",
    "prefixes": [
        "dpdk-dev",
        "2/4"
    ]
}