get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 10115,
    "url": "http://patches.dpdk.org/api/patches/10115/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1453866647-16215-12-git-send-email-xiao.w.wang@intel.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": "<1453866647-16215-12-git-send-email-xiao.w.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1453866647-16215-12-git-send-email-xiao.w.wang@intel.com",
    "date": "2016-01-27T03:50:42",
    "name": "[dpdk-dev,v2,11/16] fm10k/base: allow removal of is_slot_appropriate function",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "9dbe8ddf3519eb8a58726326b5dfeb6d19d60b9c",
    "submitter": {
        "id": 281,
        "url": "http://patches.dpdk.org/api/people/281/?format=api",
        "name": "Xiao Wang",
        "email": "xiao.w.wang@intel.com"
    },
    "delegate": {
        "id": 10,
        "url": "http://patches.dpdk.org/api/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1453866647-16215-12-git-send-email-xiao.w.wang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/10115/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/10115/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 84C2A9581;\n\tWed, 27 Jan 2016 04:51:21 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 35F96957B\n\tfor <dev@dpdk.org>; Wed, 27 Jan 2016 04:51:18 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP; 26 Jan 2016 19:51:19 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 26 Jan 2016 19:51:17 -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 u0R3pFbD015608;\n\tWed, 27 Jan 2016 11:51:15 +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 u0R3pBBl016735; Wed, 27 Jan 2016 11:51:13 +0800",
            "(from xiaowan1@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u0R3pBtc016731; \n\tWed, 27 Jan 2016 11:51:11 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.22,353,1449561600\"; d=\"scan'208\";a=\"889966855\"",
        "From": "Wang Xiao W <xiao.w.wang@intel.com>",
        "To": "jing.d.chen@intel.com",
        "Date": "Wed, 27 Jan 2016 11:50:42 +0800",
        "Message-Id": "<1453866647-16215-12-git-send-email-xiao.w.wang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1453866647-16215-1-git-send-email-xiao.w.wang@intel.com>",
        "References": "<1453372561-11431-16-git-send-email-xiao.w.wang@intel.com>\n\t<1453866647-16215-1-git-send-email-xiao.w.wang@intel.com>",
        "Cc": "dev@dpdk.org",
        "Subject": "[dpdk-dev] [PATCH v2 11/16] fm10k/base: allow removal of\n\tis_slot_appropriate function",
        "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 Linux Kernel provides the OS a call \"pcie_get_minimum_link\" which\ncan crawl the PCIe tree and determine the actual minimum link speed of a\ndevice which is a more general check than provided by\nis_slot_appropriate. Thus, the upstream driver does not use or want the\nis_slot_appropriate function call. Add a NO_IS_SLOT_APPROPRIATE_CHECK\ndefinition which can be defined during strip process to remove the code.\nIf left undefined (the default) then the code will all be active and no\ndriver changes should be necessary.\n\nSigned-off-by: Wang Xiao W <xiao.w.wang@intel.com>\n---\n drivers/net/fm10k/base/fm10k_api.c  | 2 ++\n drivers/net/fm10k/base/fm10k_api.h  | 2 ++\n drivers/net/fm10k/base/fm10k_pf.c   | 4 ++++\n drivers/net/fm10k/base/fm10k_type.h | 2 ++\n drivers/net/fm10k/base/fm10k_vf.c   | 4 ++++\n 5 files changed, 14 insertions(+)",
    "diff": "diff --git a/drivers/net/fm10k/base/fm10k_api.c b/drivers/net/fm10k/base/fm10k_api.c\nindex eb5bdaa..c49d20d 100644\n--- a/drivers/net/fm10k/base/fm10k_api.c\n+++ b/drivers/net/fm10k/base/fm10k_api.c\n@@ -181,6 +181,7 @@ s32 fm10k_get_bus_info(struct fm10k_hw *hw)\n \t\t\t       FM10K_NOT_IMPLEMENTED);\n }\n \n+#ifndef NO_IS_SLOT_APPROPRIATE_CHECK\n /**\n  *  fm10k_is_slot_appropriate - Indicate appropriate slot for this SKU\n  *  @hw: pointer to hardware structure\n@@ -195,6 +196,7 @@ bool fm10k_is_slot_appropriate(struct fm10k_hw *hw)\n \treturn true;\n }\n \n+#endif\n /**\n  *  fm10k_update_vlan - Clear VLAN ID to VLAN filter table\n  *  @hw: pointer to hardware structure\ndiff --git a/drivers/net/fm10k/base/fm10k_api.h b/drivers/net/fm10k/base/fm10k_api.h\nindex 113aef5..2ab3149 100644\n--- a/drivers/net/fm10k/base/fm10k_api.h\n+++ b/drivers/net/fm10k/base/fm10k_api.h\n@@ -44,7 +44,9 @@ s32 fm10k_stop_hw(struct fm10k_hw *hw);\n s32 fm10k_start_hw(struct fm10k_hw *hw);\n s32 fm10k_init_shared_code(struct fm10k_hw *hw);\n s32 fm10k_get_bus_info(struct fm10k_hw *hw);\n+#ifndef NO_IS_SLOT_APPROPRIATE_CHECK\n bool fm10k_is_slot_appropriate(struct fm10k_hw *hw);\n+#endif\n s32 fm10k_update_vlan(struct fm10k_hw *hw, u32 vid, u8 idx, bool set);\n s32 fm10k_read_mac_addr(struct fm10k_hw *hw);\n void fm10k_update_hw_stats(struct fm10k_hw *hw, struct fm10k_hw_stats *stats);\ndiff --git a/drivers/net/fm10k/base/fm10k_pf.c b/drivers/net/fm10k/base/fm10k_pf.c\nindex a1469aa..f5cbda4 100644\n--- a/drivers/net/fm10k/base/fm10k_pf.c\n+++ b/drivers/net/fm10k/base/fm10k_pf.c\n@@ -216,6 +216,7 @@ STATIC s32 fm10k_init_hw_pf(struct fm10k_hw *hw)\n \treturn FM10K_SUCCESS;\n }\n \n+#ifndef NO_IS_SLOT_APPROPRIATE_CHECK\n /**\n  *  fm10k_is_slot_appropriate_pf - Indicate appropriate slot for this SKU\n  *  @hw: pointer to hardware structure\n@@ -231,6 +232,7 @@ STATIC bool fm10k_is_slot_appropriate_pf(struct fm10k_hw *hw)\n \t       (hw->bus.width == hw->bus_caps.width);\n }\n \n+#endif\n /**\n  *  fm10k_update_vlan_pf - Update status of VLAN ID in VLAN filter table\n  *  @hw: pointer to hardware structure\n@@ -2064,7 +2066,9 @@ s32 fm10k_init_ops_pf(struct fm10k_hw *hw)\n \tmac->ops.init_hw = &fm10k_init_hw_pf;\n \tmac->ops.start_hw = &fm10k_start_hw_generic;\n \tmac->ops.stop_hw = &fm10k_stop_hw_generic;\n+#ifndef NO_IS_SLOT_APPROPRIATE_CHECK\n \tmac->ops.is_slot_appropriate = &fm10k_is_slot_appropriate_pf;\n+#endif\n \tmac->ops.update_vlan = &fm10k_update_vlan_pf;\n \tmac->ops.read_mac_addr = &fm10k_read_mac_addr_pf;\n \tmac->ops.update_uc_addr = &fm10k_update_uc_addr_pf;\ndiff --git a/drivers/net/fm10k/base/fm10k_type.h b/drivers/net/fm10k/base/fm10k_type.h\nindex c9885a1..ba0a184 100644\n--- a/drivers/net/fm10k/base/fm10k_type.h\n+++ b/drivers/net/fm10k/base/fm10k_type.h\n@@ -679,7 +679,9 @@ struct fm10k_mac_ops {\n \ts32 (*stop_hw)(struct fm10k_hw *);\n \ts32 (*get_bus_info)(struct fm10k_hw *);\n \ts32 (*get_host_state)(struct fm10k_hw *, bool *);\n+#ifndef NO_IS_SLOT_APPROPRIATE_CHECK\n \tbool (*is_slot_appropriate)(struct fm10k_hw *);\n+#endif\n \ts32 (*update_vlan)(struct fm10k_hw *, u32, u8, bool);\n \ts32 (*read_mac_addr)(struct fm10k_hw *);\n \ts32 (*update_uc_addr)(struct fm10k_hw *, u16, const u8 *,\ndiff --git a/drivers/net/fm10k/base/fm10k_vf.c b/drivers/net/fm10k/base/fm10k_vf.c\nindex 43eb081..efbdbd1 100644\n--- a/drivers/net/fm10k/base/fm10k_vf.c\n+++ b/drivers/net/fm10k/base/fm10k_vf.c\n@@ -178,6 +178,7 @@ reset_max_queues:\n \treturn err;\n }\n \n+#ifndef NO_IS_SLOT_APPROPRIATE_CHECK\n /**\n  *  fm10k_is_slot_appropriate_vf - Indicate appropriate slot for this SKU\n  *  @hw: pointer to hardware structure\n@@ -194,6 +195,7 @@ STATIC bool fm10k_is_slot_appropriate_vf(struct fm10k_hw *hw)\n \treturn TRUE;\n }\n \n+#endif\n /* This structure defines the attibutes to be parsed below */\n const struct fm10k_tlv_attr fm10k_mac_vlan_msg_attr[] = {\n \tFM10K_TLV_ATTR_U32(FM10K_MAC_VLAN_MSG_VLAN),\n@@ -648,7 +650,9 @@ s32 fm10k_init_ops_vf(struct fm10k_hw *hw)\n \tmac->ops.init_hw = &fm10k_init_hw_vf;\n \tmac->ops.start_hw = &fm10k_start_hw_generic;\n \tmac->ops.stop_hw = &fm10k_stop_hw_vf;\n+#ifndef NO_IS_SLOT_APPROPRIATE_CHECK\n \tmac->ops.is_slot_appropriate = &fm10k_is_slot_appropriate_vf;\n+#endif\n \tmac->ops.update_vlan = &fm10k_update_vlan_vf;\n \tmac->ops.read_mac_addr = &fm10k_read_mac_addr_vf;\n \tmac->ops.update_uc_addr = &fm10k_update_uc_addr_vf;\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "11/16"
    ]
}