patches for DPDK stable branches
 help / color / mirror / Atom feed
From: wangyunjian <wangyunjian@huawei.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <ferruh.yigit@intel.com>,
	<andrew.rybchenko@oktetlabs.ru>, <jerry.lilijun@huawei.com>,
	<xudingke@huawei.com>, Yunjian Wang <wangyunjian@huawei.com>,
	<stable@dpdk.org>
Subject: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: fix data type for port id
Date: Mon, 26 Oct 2020 20:24:23 +0800	[thread overview]
Message-ID: <e17cf818a98e4dd5109acacd8c2bd754a0c1abda.1603713753.git.wangyunjian@huawei.com> (raw)

From: Yunjian Wang <wangyunjian@huawei.com>

The ethdev port id should be 16 bits now. This patch fixes the data
type of the variable for 'pid', changing from uint32_t to uint16_t.

Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 lib/librte_ethdev/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index b12bb3854d..d52215b9a7 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -816,7 +816,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
 int
 rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
 {
-	uint32_t pid;
+	uint16_t pid;
 
 	if (name == NULL) {
 		RTE_ETHDEV_LOG(ERR, "Null pointer is specified\n");
-- 
2.23.0


             reply	other threads:[~2020-10-26 12:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 12:24 wangyunjian [this message]
2020-10-26 12:29 ` Andrew Rybchenko
2020-10-27 13:41 ` [dpdk-stable] [dpdk-dev] [PATCH v2] " wangyunjian
2020-10-27 14:29   ` Thomas Monjalon
2020-10-29 12:18     ` wangyunjian
2020-10-29 12:40       ` Andrew Rybchenko
2020-10-29 12:43       ` Thomas Monjalon
2020-11-02  9:18   ` [dpdk-stable] [dpdk-dev] [PATCH v3] " wangyunjian
2020-11-03 18:44     ` Thomas Monjalon
2020-11-03 23:42       ` Stephen Hemminger
2020-11-04  1:57       ` wangyunjian
2020-11-04  2:57     ` [dpdk-stable] [dpdk-dev] [PATCH v4] " wangyunjian
2020-11-04  3:26       ` Ajit Khaparde
2020-11-04 11:46         ` Ferruh Yigit
2020-11-04 13:49           ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e17cf818a98e4dd5109acacd8c2bd754a0c1abda.1603713753.git.wangyunjian@huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=xudingke@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).