get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 6622,
    "url": "https://patches.dpdk.org/api/patches/6622/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1438012477-729-3-git-send-email-bernard.iremonger@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": "<1438012477-729-3-git-send-email-bernard.iremonger@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1438012477-729-3-git-send-email-bernard.iremonger@intel.com",
    "date": "2015-07-27T15:54:35",
    "name": "[dpdk-dev,v7,2/4] test-pmd: modified testpmd for link_bonding",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "75238d15a2f3fdb4ef7280ab972004d2e360ca62",
    "submitter": {
        "id": 91,
        "url": "https://patches.dpdk.org/api/people/91/?format=api",
        "name": "Iremonger, Bernard",
        "email": "bernard.iremonger@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1438012477-729-3-git-send-email-bernard.iremonger@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/6622/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/6622/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 0B095C5BE;\n\tMon, 27 Jul 2015 17:54:54 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id B7CC3C598\n\tfor <dev@dpdk.org>; Mon, 27 Jul 2015 17:54:45 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP; 27 Jul 2015 08:54:44 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga001.jf.intel.com with ESMTP; 27 Jul 2015 08:54:43 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tt6RFsgeK018706; Mon, 27 Jul 2015 16:54:42 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id t6RFsg7S000788;\n\tMon, 27 Jul 2015 16:54:42 +0100",
            "(from bairemon@localhost)\n\tby sivswdev01.ir.intel.com with  id t6RFsgQv000784;\n\tMon, 27 Jul 2015 16:54:42 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.15,555,1432623600\"; d=\"scan'208\";a=\"736478751\"",
        "From": "Bernard Iremonger <bernard.iremonger@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 27 Jul 2015 16:54:35 +0100",
        "Message-Id": "<1438012477-729-3-git-send-email-bernard.iremonger@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1438012477-729-1-git-send-email-bernard.iremonger@intel.com>",
        "References": "<PATCH>\n\t<1438012477-729-1-git-send-email-bernard.iremonger@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v7 2/4] test-pmd: modified testpmd for\n\tlink_bonding",
        "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": "When the bonded port is started it also starts the slave port,\nbut the slave port status is not set. A slave_flag has been\nadded to struct rte_port to resolve this issue.\n\nSigned-off-by: Bernard Iremonger <bernard.iremonger@intel.com>\n---\n app/test-pmd/cmdline.c |  4 +++-\n app/test-pmd/testpmd.c | 22 ++++++++++++++++++++--\n app/test-pmd/testpmd.h |  7 +++++--\n 3 files changed, 28 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 8ab4687..5e24319 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -1,7 +1,7 @@\n /*-\n  *   BSD LICENSE\n  *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n  *   Copyright(c) 2014 6WIND S.A.\n  *   All rights reserved.\n  *\n@@ -4019,6 +4019,7 @@ static void cmd_add_bonding_slave_parsed(void *parsed_result,\n \t\treturn;\n \t}\n \tinit_port_config();\n+\tset_port_slave_flag(slave_port_id);\n }\n \n cmdline_parse_token_string_t cmd_addbonding_slave_add =\n@@ -4075,6 +4076,7 @@ static void cmd_remove_bonding_slave_parsed(void *parsed_result,\n \t\treturn;\n \t}\n \tinit_port_config();\n+\tclear_port_slave_flag(slave_port_id);\n }\n \n cmdline_parse_token_string_t cmd_removebonding_slave_remove =\ndiff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 4769533..4bcece6 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -1202,7 +1202,8 @@ all_ports_started(void)\n \tFOREACH_PORT(pi, ports) {\n \t\tport = &ports[pi];\n \t\t/* Check if there is a port which is not started */\n-\t\tif (port->port_status != RTE_PORT_STARTED)\n+\t\tif ((port->port_status != RTE_PORT_STARTED) &&\n+\t\t\t(port->slave_flag == 0))\n \t\t\treturn 0;\n \t}\n \n@@ -1218,7 +1219,8 @@ all_ports_stopped(void)\n \n \tFOREACH_PORT(pi, ports) {\n \t\tport = &ports[pi];\n-\t\tif (port->port_status != RTE_PORT_STOPPED)\n+\t\tif ((port->port_status != RTE_PORT_STOPPED) &&\n+\t\t\t(port->slave_flag == 0))\n \t\t\treturn 0;\n \t}\n \n@@ -1808,6 +1810,22 @@ init_port_config(void)\n \t}\n }\n \n+void set_port_slave_flag(portid_t slave_pid)\n+{\n+\tstruct rte_port *port;\n+\n+\tport = &ports[slave_pid];\n+\tport->slave_flag = 1;\n+}\n+\n+void clear_port_slave_flag(portid_t slave_pid)\n+{\n+\tstruct rte_port *port;\n+\n+\tport = &ports[slave_pid];\n+\tport->slave_flag = 0;\n+}\n+\n const uint16_t vlan_tags[] = {\n \t\t0,  1,  2,  3,  4,  5,  6,  7,\n \t\t8,  9, 10, 11,  12, 13, 14, 15,\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex e91e077..8b2219a 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -1,7 +1,7 @@\n /*-\n  *   BSD LICENSE\n  *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n  *   All rights reserved.\n  *\n  *   Redistribution and use in source and binary forms, with or without\n@@ -162,11 +162,12 @@ struct rte_port {\n \tuint8_t                 need_reconfig;  /**< need reconfiguring port or not */\n \tuint8_t                 need_reconfig_queues; /**< need reconfiguring queues or not */\n \tuint8_t                 rss_flag;   /**< enable rss or not */\n-\tuint8_t\t\t\tdcb_flag;   /**< enable dcb */\n+\tuint8_t\t\t\t        dcb_flag;   /**< enable dcb */\n \tstruct rte_eth_rxconf   rx_conf;    /**< rx configuration */\n \tstruct rte_eth_txconf   tx_conf;    /**< tx configuration */\n \tstruct ether_addr       *mc_addr_pool; /**< pool of multicast addrs */\n \tuint32_t                mc_addr_nb; /**< nb. of addr. in mc_addr_pool */\n+\tuint8_t                 slave_flag; /**< bonding slave port */\n };\n \n extern portid_t __rte_unused\n@@ -534,6 +535,8 @@ void stop_packet_forwarding(void);\n void dev_set_link_up(portid_t pid);\n void dev_set_link_down(portid_t pid);\n void init_port_config(void);\n+void set_port_slave_flag(portid_t slave_pid);\n+void clear_port_slave_flag(portid_t slave_pid);\n int init_port_dcb_config(portid_t pid,struct dcb_config *dcb_conf);\n int start_port(portid_t pid);\n void stop_port(portid_t pid);\n",
    "prefixes": [
        "dpdk-dev",
        "v7",
        "2/4"
    ]
}