get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 111420,
    "url": "https://patches.dpdk.org/api/patches/111420/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220519122917.2334-5-humin29@huawei.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": "<20220519122917.2334-5-humin29@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220519122917.2334-5-humin29@huawei.com",
    "date": "2022-05-19T12:29:09",
    "name": "[04/12] net/hns3: adjust the data type of some variables",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "e5d135f65d06bf2e0e17e0f6e791aa1b6daebb5a",
    "submitter": {
        "id": 1944,
        "url": "https://patches.dpdk.org/api/people/1944/?format=api",
        "name": "humin (Q)",
        "email": "humin29@huawei.com"
    },
    "delegate": {
        "id": 3961,
        "url": "https://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220519122917.2334-5-humin29@huawei.com/mbox/",
    "series": [
        {
            "id": 23037,
            "url": "https://patches.dpdk.org/api/series/23037/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=23037",
            "date": "2022-05-19T12:29:05",
            "name": "bugfix for hns3 PMD",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/23037/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/111420/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/111420/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AC9ADA0503;\n\tThu, 19 May 2022 14:31:15 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4B4FA42B85;\n\tThu, 19 May 2022 14:30:37 +0200 (CEST)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 7B4CD42685\n for <dev@dpdk.org>; Thu, 19 May 2022 14:30:30 +0200 (CEST)",
            "from kwepemi500012.china.huawei.com (unknown [172.30.72.57])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4L3q0c53rNzgYD2;\n Thu, 19 May 2022 20:29:04 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.24; Thu, 19 May 2022 20:30:27 +0800"
        ],
        "From": "\"Min Hu (Connor)\" <humin29@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<ferruh.yigit@intel.com>, <thomas@monjalon.net>",
        "Subject": "[PATCH 04/12] net/hns3: adjust the data type of some variables",
        "Date": "Thu, 19 May 2022 20:29:09 +0800",
        "Message-ID": "<20220519122917.2334-5-humin29@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20220519122917.2334-1-humin29@huawei.com>",
        "References": "<20220519122917.2334-1-humin29@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-ClientProxiedBy": "dggems702-chm.china.huawei.com (10.3.19.179) To\n kwepemi500012.china.huawei.com (7.221.188.12)",
        "X-CFilter-Loop": "Reflected",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "From: Huisong Li <lihuisong@huawei.com>\n\nUsing the 'int' type and 'uint16_t' type to compare is insecure. This patch\nmakes them consistent.\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\n---\n drivers/net/hns3/hns3_common.c   |  4 ++--\n drivers/net/hns3/hns3_dcb.c      |  2 +-\n drivers/net/hns3/hns3_ethdev.c   |  2 +-\n drivers/net/hns3/hns3_regs.c     |  2 +-\n drivers/net/hns3/hns3_rss.c      |  2 +-\n drivers/net/hns3/hns3_rxtx.c     | 23 ++++++++++++-----------\n drivers/net/hns3/hns3_rxtx_vec.h |  4 ++--\n 7 files changed, 20 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c\nindex 9c86c00a04..edd16d8076 100644\n--- a/drivers/net/hns3/hns3_common.c\n+++ b/drivers/net/hns3/hns3_common.c\n@@ -475,7 +475,7 @@ hns3_configure_all_mac_addr(struct hns3_adapter *hns, bool del)\n \tstruct rte_ether_addr *addr;\n \tuint16_t mac_addrs_capa;\n \tint ret = 0;\n-\tint i;\n+\tuint16_t i;\n \n \tmac_addrs_capa =\n \t\thns->is_vf ? HNS3_VF_UC_MACADDR_NUM : HNS3_UC_MACADDR_NUM;\n@@ -645,8 +645,8 @@ int\n hns3_init_ring_with_vector(struct hns3_hw *hw)\n {\n \tuint16_t vec;\n+\tuint16_t i;\n \tint ret;\n-\tint i;\n \n \t/*\n \t * In hns3 network engine, vector 0 is always the misc interrupt of this\ndiff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c\nindex 136ada626b..d88757611c 100644\n--- a/drivers/net/hns3/hns3_dcb.c\n+++ b/drivers/net/hns3/hns3_dcb.c\n@@ -628,7 +628,7 @@ hns3_set_rss_size(struct hns3_hw *hw, uint16_t nb_rx_q)\n \tstruct hns3_rss_conf *rss_cfg = &hw->rss_info;\n \tuint16_t rx_qnum_per_tc;\n \tuint16_t used_rx_queues;\n-\tint i;\n+\tuint16_t i;\n \n \trx_qnum_per_tc = nb_rx_q / hw->num_tc;\n \tif (rx_qnum_per_tc > hw->rss_size_max) {\ndiff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 29c9f96c05..97cf27d2a1 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -2929,8 +2929,8 @@ hns3_map_tqps_to_func(struct hns3_hw *hw, uint16_t func_id, uint16_t tqp_pid,\n static int\n hns3_map_tqp(struct hns3_hw *hw)\n {\n+\tuint16_t i;\n \tint ret;\n-\tint i;\n \n \t/*\n \t * In current version, VF is not supported when PF is driven by DPDK\ndiff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c\nindex 86a4cf74d5..6778e4cfc2 100644\n--- a/drivers/net/hns3/hns3_regs.c\n+++ b/drivers/net/hns3/hns3_regs.c\n@@ -294,8 +294,8 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)\n \tstruct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);\n \tuint32_t *origin_data_ptr = data;\n \tuint32_t reg_offset;\n+\tuint16_t i, j;\n \tint reg_num;\n-\tint i, j;\n \n \t/* fetching per-PF registers values from PF PCIe register space */\n \treg_num = sizeof(cmdq_reg_addrs) / sizeof(uint32_t);\ndiff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c\nindex d376486a1d..4c546c9363 100644\n--- a/drivers/net/hns3/hns3_rss.c\n+++ b/drivers/net/hns3/hns3_rss.c\n@@ -631,7 +631,7 @@ hns3_rss_set_default_args(struct hns3_hw *hw)\n {\n \tstruct hns3_rss_conf *rss_cfg = &hw->rss_info;\n \tuint16_t queue_num = hw->alloc_rss_size;\n-\tint i;\n+\tuint16_t i;\n \n \t/* Default hash algorithm */\n \trss_cfg->conf.func = RTE_ETH_HASH_FUNCTION_TOEPLITZ;\ndiff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c\nindex ee0aaaf7fc..510802be05 100644\n--- a/drivers/net/hns3/hns3_rxtx.c\n+++ b/drivers/net/hns3/hns3_rxtx.c\n@@ -390,7 +390,7 @@ hns3_enable_all_queues(struct hns3_hw *hw, bool en)\n \tstruct hns3_tx_queue *txq;\n \tuint32_t rcb_reg;\n \tvoid *tqp_base;\n-\tint i;\n+\tuint16_t i;\n \n \tfor (i = 0; i < hw->cfg_max_queues; i++) {\n \t\tif (hns3_dev_get_support(hw, INDEP_TXRX)) {\n@@ -736,8 +736,8 @@ hns3pf_reset_all_tqps(struct hns3_hw *hw)\n #define HNS3_RESET_RCB_NOT_SUPPORT\t0U\n #define HNS3_RESET_ALL_TQP_SUCCESS\t1U\n \tuint8_t reset_status;\n+\tuint16_t i;\n \tint ret;\n-\tint i;\n \n \tret = hns3_reset_rcb_cmd(hw, &reset_status);\n \tif (ret)\n@@ -774,7 +774,7 @@ hns3vf_reset_all_tqps(struct hns3_hw *hw)\n \tuint8_t reset_status;\n \tuint8_t msg_data[2];\n \tint ret;\n-\tint i;\n+\tuint16_t i;\n \n \tmemset(msg_data, 0, sizeof(uint16_t));\n \tret = hns3_send_mbx_msg(hw, HNS3_MBX_QUEUE_RESET, 0, msg_data,\n@@ -806,7 +806,8 @@ int\n hns3_reset_all_tqps(struct hns3_adapter *hns)\n {\n \tstruct hns3_hw *hw = &hns->hw;\n-\tint ret, i;\n+\tuint16_t i;\n+\tint ret;\n \n \t/* Disable all queues before reset all queues */\n \tfor (i = 0; i < hw->cfg_max_queues; i++) {\n@@ -1037,7 +1038,7 @@ hns3_dev_all_rx_queue_intr_enable(struct hns3_hw *hw, bool en)\n {\n \tstruct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id];\n \tuint16_t nb_rx_q = hw->data->nb_rx_queues;\n-\tint i;\n+\tuint16_t i;\n \n \tif (dev->data->dev_conf.intr_conf.rxq == 0)\n \t\treturn;\n@@ -1121,7 +1122,7 @@ static void\n hns3_init_txq(struct hns3_tx_queue *txq)\n {\n \tstruct hns3_desc *desc;\n-\tint i;\n+\tuint16_t i;\n \n \t/* Clear tx bd */\n \tdesc = txq->tx_ring;\n@@ -1145,7 +1146,7 @@ hns3_init_tx_ring_tc(struct hns3_adapter *hns)\n \n \tfor (i = 0; i < HNS3_MAX_TC_NUM; i++) {\n \t\tstruct hns3_tc_queue_info *tc_queue = &hw->tc_queue[i];\n-\t\tint j;\n+\t\tuint16_t j;\n \n \t\tif (!tc_queue->enable)\n \t\t\tcontinue;\n@@ -1442,7 +1443,7 @@ hns3_alloc_txq_and_dma_zone(struct rte_eth_dev *dev,\n \tstruct hns3_tx_queue *txq;\n \tstruct hns3_desc *desc;\n \tunsigned int tx_desc;\n-\tint i;\n+\tuint16_t i;\n \n \ttxq = rte_zmalloc_socket(q_info->type, sizeof(struct hns3_tx_queue),\n \t\t\t\t RTE_CACHE_LINE_SIZE, q_info->socket_id);\n@@ -1679,7 +1680,7 @@ hns3_dev_release_mbufs(struct hns3_adapter *hns)\n \tstruct rte_eth_dev_data *dev_data = hns->hw.data;\n \tstruct hns3_rx_queue *rxq;\n \tstruct hns3_tx_queue *txq;\n-\tint i;\n+\tuint16_t i;\n \n \tif (dev_data->rx_queues)\n \t\tfor (i = 0; i < dev_data->nb_rx_queues; i++) {\n@@ -3086,7 +3087,7 @@ hns3_tx_free_useless_buffer(struct hns3_tx_queue *txq)\n \tuint16_t tx_next_use = txq->next_to_use;\n \tstruct hns3_entry *tx_entry = &txq->sw_ring[tx_next_clean];\n \tstruct hns3_desc *desc = &txq->tx_ring[tx_next_clean];\n-\tint i;\n+\tuint16_t i;\n \n \tif (tx_next_use >= tx_next_clean &&\n \t    tx_next_use < tx_next_clean + txq->tx_rs_thresh)\n@@ -3984,7 +3985,7 @@ hns3_tx_free_buffer_simple(struct hns3_tx_queue *txq)\n \tstruct hns3_entry *tx_entry;\n \tstruct hns3_desc *desc;\n \tuint16_t tx_next_clean;\n-\tint i;\n+\tuint16_t i;\n \n \twhile (1) {\n \t\tif (HNS3_GET_TX_QUEUE_PEND_BD_NUM(txq) < txq->tx_rs_thresh)\ndiff --git a/drivers/net/hns3/hns3_rxtx_vec.h b/drivers/net/hns3/hns3_rxtx_vec.h\nindex 4985a7cae8..d13f18627d 100644\n--- a/drivers/net/hns3/hns3_rxtx_vec.h\n+++ b/drivers/net/hns3/hns3_rxtx_vec.h\n@@ -15,7 +15,7 @@ hns3_tx_bulk_free_buffers(struct hns3_tx_queue *txq)\n \tstruct hns3_entry *tx_entry;\n \tstruct rte_mbuf *m;\n \tint nb_free = 0;\n-\tint i;\n+\tuint16_t i;\n \n \ttx_entry = &txq->sw_ring[txq->next_to_clean];\n \tif (txq->mbuf_fast_free_en) {\n@@ -56,7 +56,7 @@ static inline void\n hns3_tx_free_buffers(struct hns3_tx_queue *txq)\n {\n \tstruct hns3_desc *tx_desc;\n-\tint i;\n+\tuint16_t i;\n \n \t/*\n \t * All mbufs can be released only when the VLD bits of all\n",
    "prefixes": [
        "04/12"
    ]
}