get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 76250,
    "url": "http://patches.dpdk.org/api/patches/76250/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1598961165-20832-3-git-send-email-humin29@huawei.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": "<1598961165-20832-3-git-send-email-humin29@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1598961165-20832-3-git-send-email-humin29@huawei.com",
    "date": "2020-09-01T11:52:43",
    "name": "[2/4] ethdev: fix compiling errors for per-queue statistics",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7ebab762c6509d0846d4a0a64a3b1894333d3277",
    "submitter": {
        "id": 1944,
        "url": "http://patches.dpdk.org/api/people/1944/?format=api",
        "name": "humin (Q)",
        "email": "humin29@huawei.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/1598961165-20832-3-git-send-email-humin29@huawei.com/mbox/",
    "series": [
        {
            "id": 11873,
            "url": "http://patches.dpdk.org/api/series/11873/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11873",
            "date": "2020-09-01T11:52:41",
            "name": "ethdev: change the queue ID type",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/11873/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/76250/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/76250/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 536B8A04AC;\n\tTue,  1 Sep 2020 14:00:56 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DB87C1C1B1;\n\tTue,  1 Sep 2020 13:55:10 +0200 (CEST)",
            "from huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by dpdk.org (Postfix) with ESMTP id A3BC41C138\n for <dev@dpdk.org>; Tue,  1 Sep 2020 13:55:07 +0200 (CEST)",
            "from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60])\n by Forcepoint Email with ESMTP id D35DD6AF6FA1BF860BF6;\n Tue,  1 Sep 2020 19:55:04 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id\n 14.3.487.0; Tue, 1 Sep 2020 19:54:59 +0800"
        ],
        "From": "\"Min Hu (Connor)\" <humin29@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<ferruh.yigit@intel.com>, <stephen@networkplumber.org>,\n <bruce.richardson@intel.com>, <jerin.jacob@caviumnetworks.com>",
        "Date": "Tue, 1 Sep 2020 19:52:43 +0800",
        "Message-ID": "<1598961165-20832-3-git-send-email-humin29@huawei.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1598961165-20832-1-git-send-email-humin29@huawei.com>",
        "References": "<1598923998-44155-1-git-send-email-humin29@huawei.com>\n <1598961165-20832-1-git-send-email-humin29@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH 2/4] ethdev: fix compiling errors for per-queue\n\tstatistics",
        "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 <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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Huisong Li <lihuisong@huawei.com>\n\nCurrently, only statistics of rx/tx queues with queue_id less than\nRTE_ETHDEV_QUEUE_STAT_CNTRS can be displayed. If there is a certain\napplication scenario that it needs to use 256 or more than 256 queues\nand display all statistics of rx/tx queue. At this moment, we have to\nchange the macro to be equaled to the queue number.\n\nHowever, modifying the macro to be greater than 256 will trigger\nmany errors and warnings from test-pmd, PMD driver and librte_ethdev\nduring compiling dpdk project. But it is possible and permited that\nrx/tx queue number is greater than 256 and all statistics of rx/tx\nqueue need to be displayed. In addition, the data type of rx/tx queue\nnumber in rte_eth_dev_configure API is 'uint16_t'. So It is unreasonable\nto use the 'uint8_t' type for variables that control which per-queue\nstatistics can be displayed.\n\nFixes: ed30d9b691b2 (\"app/testpmd: add stats per queue\")\nFixes: 09c7e63a71f9 (\"net/memif: introduce memory interface PMD\")\nFixes: abf7275bbaa2 (\"ixgbe: move to drivers/net/\")\nFixes: e6defdfddc3b (\"net/igc: enable statistics\")\nFixes: 2265e4b4e84b (\"net/octeontx2: add basic stats operation\")\nFixes: 6c3169a3dc04 (\"virtio: move to drivers/net/\")\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\nReviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\nReviewed-by: Dongdong Liu <liudongdong3@huawei.com>\n---\n app/test-pmd/cmdline.c              | 2 +-\n app/test-pmd/config.c               | 4 ++--\n app/test-pmd/testpmd.c              | 2 +-\n app/test-pmd/testpmd.h              | 5 +++--\n drivers/net/igc/igc_ethdev.c        | 4 ++--\n drivers/net/ixgbe/ixgbe_ethdev.c    | 4 ++--\n drivers/net/memif/rte_eth_memif.c   | 2 +-\n drivers/net/octeontx2/otx2_ethdev.h | 2 +-\n drivers/net/octeontx2/otx2_stats.c  | 2 +-\n drivers/net/virtio/virtio_ethdev.c  | 4 ++--\n lib/librte_ethdev/rte_ethdev.c      | 6 +++---\n lib/librte_ethdev/rte_ethdev.h      | 4 ++--\n lib/librte_ethdev/rte_ethdev_core.h | 2 +-\n 13 files changed, 22 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 0a6ed85..40b6b17 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -8244,7 +8244,7 @@ struct cmd_set_qmap_result {\n \tcmdline_fixed_string_t what;\n \tportid_t port_id;\n \tuint16_t queue_id;\n-\tuint8_t map_value;\n+\tuint16_t map_value;\n };\n \n static void\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 30bee33..9e7526d 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -160,7 +160,7 @@ nic_stats_display(portid_t port_id)\n \tuint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;\n \tstruct rte_eth_stats stats;\n \tstruct rte_port *port = &ports[port_id];\n-\tuint8_t i;\n+\tuint16_t i;\n \n \tstatic const char *nic_stats_border = \"########################\";\n \n@@ -3623,7 +3623,7 @@ tx_vlan_pvid_set(portid_t port_id, uint16_t vlan_id, int on)\n }\n \n void\n-set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value)\n+set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint16_t map_value)\n {\n \tuint16_t i;\n \tuint8_t existing_mapping_found = 0;\ndiff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 7842c3b..d5503bc 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -1835,7 +1835,7 @@ fwd_stats_display(void)\n #endif\n \t}\n \tfor (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {\n-\t\tuint8_t j;\n+\t\tuint16_t j;\n \n \t\tpt_id = fwd_ports_ids[i];\n \t\tport = &ports[pt_id];\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 25a12b1..4ac87b0 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -285,7 +285,7 @@ enum dcb_mode_enable\n struct queue_stats_mappings {\n \tportid_t port_id;\n \tuint16_t queue_id;\n-\tuint8_t stats_counter_id;\n+\tuint16_t stats_counter_id;\n } __rte_cache_aligned;\n \n extern struct queue_stats_mappings tx_queue_stats_mappings_array[];\n@@ -768,7 +768,8 @@ void tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer);\n void tx_vlan_reset(portid_t port_id);\n void tx_vlan_pvid_set(portid_t port_id, uint16_t vlan_id, int on);\n \n-void set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value);\n+void set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id,\n+\t      uint16_t map_value);\n \n void set_xstats_hide_zero(uint8_t on_off);\n \ndiff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c\nindex 6ab3ee9..7211505 100644\n--- a/drivers/net/igc/igc_ethdev.c\n+++ b/drivers/net/igc/igc_ethdev.c\n@@ -221,7 +221,7 @@ static int eth_igc_xstats_get_names_by_id(struct rte_eth_dev *dev,\n static int eth_igc_xstats_reset(struct rte_eth_dev *dev);\n static int\n eth_igc_queue_stats_mapping_set(struct rte_eth_dev *dev,\n-\tuint16_t queue_id, uint8_t stat_idx, uint8_t is_rx);\n+\tuint16_t queue_id, uint16_t stat_idx, uint8_t is_rx);\n static int\n eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id);\n static int\n@@ -2076,7 +2076,7 @@ eth_igc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,\n \n static int\n eth_igc_queue_stats_mapping_set(struct rte_eth_dev *dev,\n-\t\tuint16_t queue_id, uint8_t stat_idx, uint8_t is_rx)\n+\t\tuint16_t queue_id, uint16_t stat_idx, uint8_t is_rx)\n {\n \tstruct igc_adapter *igc = IGC_DEV_PRIVATE(dev);\n \ndiff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex fd0cb9b..8c418f5 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -178,7 +178,7 @@ static int ixgbe_dev_xstats_get_names_by_id(\n \tunsigned int limit);\n static int ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,\n \t\t\t\t\t     uint16_t queue_id,\n-\t\t\t\t\t     uint8_t stat_idx,\n+\t\t\t\t\t     uint16_t stat_idx,\n \t\t\t\t\t     uint8_t is_rx);\n static int ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version,\n \t\t\t\t size_t fw_size);\n@@ -897,7 +897,7 @@ ixgbe_reset_qstat_mappings(struct ixgbe_hw *hw)\n static int\n ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,\n \t\t\t\t  uint16_t queue_id,\n-\t\t\t\t  uint8_t stat_idx,\n+\t\t\t\t  uint16_t stat_idx,\n \t\t\t\t  uint8_t is_rx)\n {\n #define QSM_REG_NB_BITS_PER_QMAP_FIELD 8\ndiff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c\nindex c1c7e9f..696475c 100644\n--- a/drivers/net/memif/rte_eth_memif.c\n+++ b/drivers/net/memif/rte_eth_memif.c\n@@ -1341,7 +1341,7 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n \tstruct pmd_internals *pmd = dev->data->dev_private;\n \tstruct memif_queue *mq;\n \tint i;\n-\tuint8_t tmp, nq;\n+\tuint16_t tmp, nq;\n \n \tstats->ipackets = 0;\n \tstats->ibytes = 0;\ndiff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h\nindex e9efe52..8c1cf78 100644\n--- a/drivers/net/octeontx2/otx2_ethdev.h\n+++ b/drivers/net/octeontx2/otx2_ethdev.h\n@@ -476,7 +476,7 @@ int otx2_nix_dev_stats_get(struct rte_eth_dev *eth_dev,\n int otx2_nix_dev_stats_reset(struct rte_eth_dev *eth_dev);\n \n int otx2_nix_queue_stats_mapping(struct rte_eth_dev *dev,\n-\t\t\t\t uint16_t queue_id, uint8_t stat_idx,\n+\t\t\t\t uint16_t queue_id, uint16_t stat_idx,\n \t\t\t\t uint8_t is_rx);\n int otx2_nix_xstats_get(struct rte_eth_dev *eth_dev,\n \t\t\tstruct rte_eth_xstat *xstats, unsigned int n);\ndiff --git a/drivers/net/octeontx2/otx2_stats.c b/drivers/net/octeontx2/otx2_stats.c\nindex 8aaf270..6efe122 100644\n--- a/drivers/net/octeontx2/otx2_stats.c\n+++ b/drivers/net/octeontx2/otx2_stats.c\n@@ -145,7 +145,7 @@ otx2_nix_dev_stats_reset(struct rte_eth_dev *eth_dev)\n \n int\n otx2_nix_queue_stats_mapping(struct rte_eth_dev *eth_dev, uint16_t queue_id,\n-\t\t\t     uint8_t stat_idx, uint8_t is_rx)\n+\t\t\t     uint16_t stat_idx, uint8_t is_rx)\n {\n \tstruct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);\n \ndiff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex dc0093b..8144bb2 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -82,7 +82,7 @@ static int virtio_intr_disable(struct rte_eth_dev *dev);\n static int virtio_dev_queue_stats_mapping_set(\n \tstruct rte_eth_dev *eth_dev,\n \tuint16_t queue_id,\n-\tuint8_t stat_idx,\n+\tuint16_t stat_idx,\n \tuint8_t is_rx);\n \n static void virtio_notify_peers(struct rte_eth_dev *dev);\n@@ -2647,7 +2647,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n  */\n static int\n virtio_dev_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *eth_dev,\n-__rte_unused uint16_t queue_id, __rte_unused uint8_t stat_idx,\n+__rte_unused uint16_t queue_id, __rte_unused uint16_t stat_idx,\n __rte_unused uint8_t is_rx)\n {\n \treturn 0;\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 7858ad5..cf1f5d7 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -2905,7 +2905,7 @@ rte_eth_xstats_reset(uint16_t port_id)\n }\n \n static int\n-set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint8_t stat_idx,\n+set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint16_t stat_idx,\n \t\tuint8_t is_rx)\n {\n \tstruct rte_eth_dev *dev;\n@@ -2932,7 +2932,7 @@ set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint8_t stat_idx,\n \n int\n rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id,\n-\t\tuint8_t stat_idx)\n+\t\tuint16_t stat_idx)\n {\n \treturn eth_err(port_id, set_queue_stats_mapping(port_id, tx_queue_id,\n \t\t\t\t\t\tstat_idx, STAT_QMAP_TX));\n@@ -2941,7 +2941,7 @@ rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id,\n \n int\n rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id,\n-\t\tuint8_t stat_idx)\n+\t\tuint16_t stat_idx)\n {\n \treturn eth_err(port_id, set_queue_stats_mapping(port_id, rx_queue_id,\n \t\t\t\t\t\tstat_idx, STAT_QMAP_RX));\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex b0114bb..b4e10e2 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -2610,7 +2610,7 @@ int rte_eth_xstats_reset(uint16_t port_id);\n  *   Zero if successful. Non-zero otherwise.\n  */\n int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,\n-\t\tuint16_t tx_queue_id, uint8_t stat_idx);\n+\t\tuint16_t tx_queue_id, uint16_t stat_idx);\n \n /**\n  *  Set a mapping for the specified receive queue to the specified per-queue\n@@ -2631,7 +2631,7 @@ int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,\n  */\n int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,\n \t\t\t\t\t   uint16_t rx_queue_id,\n-\t\t\t\t\t   uint8_t stat_idx);\n+\t\t\t\t\t   uint16_t stat_idx);\n \n /**\n  * Retrieve the Ethernet address of an Ethernet device.\ndiff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h\nindex 32407dd..6061782 100644\n--- a/lib/librte_ethdev/rte_ethdev_core.h\n+++ b/lib/librte_ethdev/rte_ethdev_core.h\n@@ -223,7 +223,7 @@ typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,\n \n typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,\n \t\t\t\t\t     uint16_t queue_id,\n-\t\t\t\t\t     uint8_t stat_idx,\n+\t\t\t\t\t     uint16_t stat_idx,\n \t\t\t\t\t     uint8_t is_rx);\n /**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */\n \n",
    "prefixes": [
        "2/4"
    ]
}