From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Markus Theil <markus.theil@tu-ilmenau.de>, dev@dpdk.org
Cc: Chas Williams <chas3@att.com>, Min Hu <humin29@huawei.com>,
Thorben Roemer <thorben.roemer@secunet.com>
Subject: Re: [PATCH] net/bonding: fix socket_id type
Date: Wed, 12 Oct 2022 13:23:03 +0100 [thread overview]
Message-ID: <e06f03be-d175-dda2-1e60-f9ed87b3362d@amd.com> (raw)
In-Reply-To: <20221012114523.9569-1-markus.theil@tu-ilmenau.de>
On 10/12/2022 12:45 PM, Markus Theil wrote:
> From: Thorben Roemer <thorben.roemer@secunet.com>
>
> DPDK uses int or u32 in most other places for
> socket IDs. Fix compilation warnings by also
> using int in the bonding code.
>
Hi Markus,
'rte_eth_bond_create()' is part of API, so changing it impacts the users.
Since 'rte_socket_id()' returns 'int', it is reasonable to make
'socket_id' parameter type 'int', but I am not sure if it worth the
trouble it may cause in user end.
Maybe we can announce the change in this release and update the API in
v23.11?
Can you please list the mentioned compile warning?
> Signed-off-by: Thorben Roemer <thorben.roemer@secunet.com>
> ---
> drivers/net/bonding/rte_eth_bond.h | 2 +-
> drivers/net/bonding/rte_eth_bond_api.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond.h b/drivers/net/bonding/rte_eth_bond.h
> index 874aa91a5f..3ce2b29052 100644
> --- a/drivers/net/bonding/rte_eth_bond.h
> +++ b/drivers/net/bonding/rte_eth_bond.h
> @@ -99,7 +99,7 @@ extern "C" {
> * Port Id of created rte_eth_dev on success, negative value otherwise
> */
> int
> -rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id);
> +rte_eth_bond_create(const char *name, uint8_t mode, int socket_id);
>
> /**
> * Free a bonded rte_eth_dev device
> diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
> index b44dd219cb..3c6e236382 100644
> --- a/drivers/net/bonding/rte_eth_bond_api.c
> +++ b/drivers/net/bonding/rte_eth_bond_api.c
> @@ -148,7 +148,7 @@ deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
> }
>
> int
> -rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
> +rte_eth_bond_create(const char *name, uint8_t mode, int socket_id)
> {
> struct bond_dev_private *internals;
> struct rte_eth_dev *bond_dev;
next prev parent reply other threads:[~2022-10-12 12:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 11:45 Markus Theil
2022-10-12 12:23 ` Ferruh Yigit [this message]
2022-10-12 14:20 ` Markus Theil
2022-10-12 15:15 ` 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=e06f03be-d175-dda2-1e60-f9ed87b3362d@amd.com \
--to=ferruh.yigit@amd.com \
--cc=chas3@att.com \
--cc=dev@dpdk.org \
--cc=humin29@huawei.com \
--cc=markus.theil@tu-ilmenau.de \
--cc=thorben.roemer@secunet.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).