get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54305,
    "url": "http://patches.dpdk.org/api/patches/54305/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-30-leyi.rong@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": "<20190604054248.68510-30-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190604054248.68510-30-leyi.rong@intel.com",
    "date": "2019-06-04T05:42:28",
    "name": "[29/49] net/ice/base: cleanup update link info",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b097f1b6aaf1f3a6bbca801b8369fcd9147c8a4f",
    "submitter": {
        "id": 1204,
        "url": "http://patches.dpdk.org/api/people/1204/?format=api",
        "name": "Leyi Rong",
        "email": "leyi.rong@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-30-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 4879,
            "url": "http://patches.dpdk.org/api/series/4879/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4879",
            "date": "2019-06-04T05:41:59",
            "name": "shared code update",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4879/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54305/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54305/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 261051BBE6;\n\tTue,  4 Jun 2019 07:45:11 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id E8C061BB0C\n\tfor <dev@dpdk.org>; Tue,  4 Jun 2019 07:44:25 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Jun 2019 22:44:25 -0700",
            "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby fmsmga008.fm.intel.com with ESMTP; 03 Jun 2019 22:44:24 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "To": "qi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tBruce Allan <bruce.w.allan@intel.com>,\n\tChinh T Cao <chinh.t.cao@intel.com>, \n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Tue,  4 Jun 2019 13:42:28 +0800",
        "Message-Id": "<20190604054248.68510-30-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "References": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 29/49] net/ice/base: cleanup update link info",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "1. Do not unnecessarily initialize local variable.\n2. Cleanup ice_update_link_info.\n3. Dont clear auto_fec bit in ice_cfg_phy_fec.\n\nSigned-off-by: Bruce Allan <bruce.w.allan@intel.com>\nSigned-off-by: Chinh T Cao <chinh.t.cao@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/ice/base/ice_common.c | 52 ++++++++++++++-----------------\n 1 file changed, 24 insertions(+), 28 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c\nindex 89c922bed..db3acc040 100644\n--- a/drivers/net/ice/base/ice_common.c\n+++ b/drivers/net/ice/base/ice_common.c\n@@ -2414,10 +2414,10 @@ void\n ice_update_phy_type(u64 *phy_type_low, u64 *phy_type_high,\n \t\t    u16 link_speeds_bitmap)\n {\n-\tu16 speed = ICE_AQ_LINK_SPEED_UNKNOWN;\n \tu64 pt_high;\n \tu64 pt_low;\n \tint index;\n+\tu16 speed;\n \n \t/* We first check with low part of phy_type */\n \tfor (index = 0; index <= ICE_PHY_TYPE_LOW_MAX_INDEX; index++) {\n@@ -2498,38 +2498,38 @@ ice_aq_set_phy_cfg(struct ice_hw *hw, struct ice_port_info *pi,\n  */\n enum ice_status ice_update_link_info(struct ice_port_info *pi)\n {\n-\tstruct ice_aqc_get_phy_caps_data *pcaps;\n-\tstruct ice_phy_info *phy_info;\n+\tstruct ice_link_status *li;\n \tenum ice_status status;\n-\tstruct ice_hw *hw;\n \n \tif (!pi)\n \t\treturn ICE_ERR_PARAM;\n \n-\thw = pi->hw;\n-\n-\tpcaps = (struct ice_aqc_get_phy_caps_data *)\n-\t\tice_malloc(hw, sizeof(*pcaps));\n-\tif (!pcaps)\n-\t\treturn ICE_ERR_NO_MEMORY;\n+\tli = &pi->phy.link_info;\n \n-\tphy_info = &pi->phy;\n \tstatus = ice_aq_get_link_info(pi, true, NULL, NULL);\n \tif (status)\n-\t\tgoto out;\n+\t\treturn status;\n+\n+\tif (li->link_info & ICE_AQ_MEDIA_AVAILABLE) {\n+\t\tstruct ice_aqc_get_phy_caps_data *pcaps;\n+\t\tstruct ice_hw *hw;\n \n-\tif (phy_info->link_info.link_info & ICE_AQ_MEDIA_AVAILABLE) {\n-\t\tstatus = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG,\n+\t\thw = pi->hw;\n+\t\tpcaps = (struct ice_aqc_get_phy_caps_data *)\n+\t\t\tice_malloc(hw, sizeof(*pcaps));\n+\t\tif (!pcaps)\n+\t\t\treturn ICE_ERR_NO_MEMORY;\n+\n+\t\tstatus = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP,\n \t\t\t\t\t     pcaps, NULL);\n-\t\tif (status)\n-\t\t\tgoto out;\n+\t\tif (status == ICE_SUCCESS)\n+\t\t\tice_memcpy(li->module_type, &pcaps->module_type,\n+\t\t\t\t   sizeof(li->module_type),\n+\t\t\t\t   ICE_NONDMA_TO_NONDMA);\n \n-\t\tice_memcpy(phy_info->link_info.module_type, &pcaps->module_type,\n-\t\t\t   sizeof(phy_info->link_info.module_type),\n-\t\t\t   ICE_NONDMA_TO_NONDMA);\n+\t\tice_free(hw, pcaps);\n \t}\n-out:\n-\tice_free(hw, pcaps);\n+\n \treturn status;\n }\n \n@@ -2792,27 +2792,24 @@ ice_cfg_phy_fec(struct ice_aqc_set_phy_cfg_data *cfg, enum ice_fec_mode fec)\n {\n \tswitch (fec) {\n \tcase ICE_FEC_BASER:\n-\t\t/* Clear auto FEC and RS bits, and AND BASE-R ability\n+\t\t/* Clear RS bits, and AND BASE-R ability\n \t\t * bits and OR request bits.\n \t\t */\n-\t\tcfg->caps &= ~ICE_AQC_PHY_EN_AUTO_FEC;\n \t\tcfg->link_fec_opt &= ICE_AQC_PHY_FEC_10G_KR_40G_KR4_EN |\n \t\t\t\t     ICE_AQC_PHY_FEC_25G_KR_CLAUSE74_EN;\n \t\tcfg->link_fec_opt |= ICE_AQC_PHY_FEC_10G_KR_40G_KR4_REQ |\n \t\t\t\t     ICE_AQC_PHY_FEC_25G_KR_REQ;\n \t\tbreak;\n \tcase ICE_FEC_RS:\n-\t\t/* Clear auto FEC and BASE-R bits, and AND RS ability\n+\t\t/* Clear BASE-R bits, and AND RS ability\n \t\t * bits and OR request bits.\n \t\t */\n-\t\tcfg->caps &= ~ICE_AQC_PHY_EN_AUTO_FEC;\n \t\tcfg->link_fec_opt &= ICE_AQC_PHY_FEC_25G_RS_CLAUSE91_EN;\n \t\tcfg->link_fec_opt |= ICE_AQC_PHY_FEC_25G_RS_528_REQ |\n \t\t\t\t     ICE_AQC_PHY_FEC_25G_RS_544_REQ;\n \t\tbreak;\n \tcase ICE_FEC_NONE:\n-\t\t/* Clear auto FEC and all FEC option bits. */\n-\t\tcfg->caps &= ~ICE_AQC_PHY_EN_AUTO_FEC;\n+\t\t/* Clear all FEC option bits. */\n \t\tcfg->link_fec_opt &= ~ICE_AQC_PHY_FEC_MASK;\n \t\tbreak;\n \tcase ICE_FEC_AUTO:\n@@ -3912,7 +3909,6 @@ ice_dis_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_queues,\n \tif (!pi || pi->port_state != ICE_SCHED_PORT_STATE_READY)\n \t\treturn ICE_ERR_CFG;\n \n-\n \tif (!num_queues) {\n \t\t/* if queue is disabled already yet the disable queue command\n \t\t * has to be sent to complete the VF reset, then call\n",
    "prefixes": [
        "29/49"
    ]
}