DPDK patches and discussions
 help / color / mirror / Atom feed
From: "lihuisong (C)" <lihuisong@huawei.com>
To: Chaoyong He <chaoyong.he@corigine.com>, <dev@dpdk.org>
Cc: <oss-drivers@corigine.com>, <niklas.soderlund@corigine.com>,
	Long Wu <long.wu@corigine.com>
Subject: Re: [PATCH v3 1/3] doc: announce bonding macro change
Date: Wed, 19 Jul 2023 09:24:02 +0800	[thread overview]
Message-ID: <5257be49-9515-a90d-3e55-5464211c9679@huawei.com> (raw)
In-Reply-To: <20230718082856.2235450-2-chaoyong.he@corigine.com>

+1 do not use slave in macro, data and function.
Acked-by: Huisong Li <lihuisong@huawei.com>

在 2023/7/18 16:28, Chaoyong He 写道:
> From: Long Wu <long.wu@corigine.com>
>
> In order to support inclusive naming, some of the macro in DPDK will
> need to be renamed. Do this through deprecation process now for 23.07.
>
> Signed-off-by: Long Wu <long.wu@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
> ---
>   app/test-pmd/testpmd.c                 | 2 +-
>   doc/guides/rel_notes/deprecation.rst   | 4 ++++
>   drivers/net/bonding/rte_eth_bond_api.c | 6 +++---
>   lib/ethdev/rte_ethdev.h                | 5 +++--
>   4 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index c6ad9b18bf..938ca035d4 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -4248,7 +4248,7 @@ uint8_t port_is_bonding_slave(portid_t slave_pid)
>   			slave_pid);
>   		return 0;
>   	}
> -	if ((*dev_info.dev_flags & RTE_ETH_DEV_BONDED_SLAVE) || (port->slave_flag == 1))
> +	if ((*dev_info.dev_flags & RTE_ETH_DEV_BONDING_MEMBER) || (port->slave_flag == 1))
>   		return 1;
>   	return 0;
>   }
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index fb771a0305..f3f2baf0b9 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -118,6 +118,10 @@ Deprecation Notices
>     The legacy actions should be removed
>     once ``MODIFY_FIELD`` alternative is implemented in drivers.
>   
> +* bonding: The macro ``RTE_ETH_DEV_BONDED_SLAVE`` will be deprecated in
> +  DPDK 23.07, and removed in DPDK 23.11. The relevant code can be updated using
> +  ``RTE_ETH_DEV_BONDING_MEMBER``.
> +
>   * cryptodev: The function ``rte_cryptodev_cb_fn`` will be updated
>     to have another parameter ``qp_id`` to return the queue pair ID
>     which got error interrupt to the application,
> diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
> index 85d0528b7c..8b6cdce34a 100644
> --- a/drivers/net/bonding/rte_eth_bond_api.c
> +++ b/drivers/net/bonding/rte_eth_bond_api.c
> @@ -472,7 +472,7 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
>   		return -1;
>   
>   	slave_eth_dev = &rte_eth_devices[slave_port_id];
> -	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_BONDED_SLAVE) {
> +	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_BONDING_MEMBER) {
>   		RTE_BOND_LOG(ERR, "Slave device is already a slave of a bonded device");
>   		return -1;
>   	}
> @@ -615,7 +615,7 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
>   	}
>   
>   	/* Add slave details to bonded device */
> -	slave_eth_dev->data->dev_flags |= RTE_ETH_DEV_BONDED_SLAVE;
> +	slave_eth_dev->data->dev_flags |= RTE_ETH_DEV_BONDING_MEMBER;
>   
>   	slave_vlan_filter_set(bonded_port_id, slave_port_id);
>   
> @@ -724,7 +724,7 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
>   
>   	slave_eth_dev = &rte_eth_devices[slave_port_id];
>   	slave_remove(internals, slave_eth_dev);
> -	slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDED_SLAVE);
> +	slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDING_MEMBER);
>   
>   	/*  first slave in the active list will be the primary by default,
>   	 *  otherwise use first device in list */
> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index 3d44979b44..04a2564f22 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -2036,8 +2036,9 @@ struct rte_eth_dev_owner {
>   #define RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE  RTE_BIT32(0)
>   /** Device supports link state interrupt */
>   #define RTE_ETH_DEV_INTR_LSC              RTE_BIT32(1)
> -/** Device is a bonded slave */
> -#define RTE_ETH_DEV_BONDED_SLAVE          RTE_BIT32(2)
> +/** Device is a bonding member */
> +#define RTE_ETH_DEV_BONDING_MEMBER        RTE_BIT32(2)
> +#define RTE_ETH_DEV_BONDED_SLAVE RTE_DEPRECATED(RTE_ETH_DEV_BONDED_SLAVE) RTE_ETH_DEV_BONDING_MEMBER
>   /** Device supports device removal interrupt */
>   #define RTE_ETH_DEV_INTR_RMV              RTE_BIT32(3)
>   /** Device is port representor */

  parent reply	other threads:[~2023-07-19  1:24 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  8:15 [PATCH 0/3] announce bonding macro and function change Chaoyong He
2023-07-14  8:15 ` [PATCH 1/3] doc: announce bonding macro change Chaoyong He
2023-07-17 15:13   ` Ferruh Yigit
2023-07-18  1:17     ` Chaoyong He
2023-07-14  8:15 ` [PATCH 2/3] doc: announce bonding data change Chaoyong He
2023-07-17 15:03   ` Ferruh Yigit
2023-07-18  1:13     ` Chaoyong He
2023-07-14  8:15 ` [PATCH 3/3] doc: announce bonding function change Chaoyong He
2023-07-17 15:13   ` Ferruh Yigit
2023-07-18  1:15     ` Chaoyong He
2023-07-17 15:14 ` [PATCH 0/3] announce bonding macro and " Ferruh Yigit
2023-07-18  1:48 ` [PATCH v2 " Chaoyong He
2023-07-18  1:48   ` [PATCH v2 1/3] doc: announce bonding macro change Chaoyong He
2023-07-18  8:09     ` Ferruh Yigit
2023-07-18  1:48   ` [PATCH v2 2/3] doc: announce bonding data change Chaoyong He
2023-07-18  8:05     ` Ferruh Yigit
2023-07-18  1:48   ` [PATCH v2 3/3] doc: announce bonding function change Chaoyong He
2023-07-18  8:05     ` Ferruh Yigit
2023-07-18  8:28   ` [PATCH v3 0/3] announce bonding macro and " Chaoyong He
2023-07-18  8:28     ` [PATCH v3 1/3] doc: announce bonding macro change Chaoyong He
2023-07-18 11:39       ` Ferruh Yigit
2023-07-18 15:53       ` Stephen Hemminger
2023-07-19  1:24       ` lihuisong (C) [this message]
2023-07-26 11:47       ` Morten Brørup
2023-07-18  8:28     ` [PATCH v3 2/3] doc: announce bonding data change Chaoyong He
2023-07-18 11:40       ` Ferruh Yigit
2023-07-18 15:53       ` Stephen Hemminger
2023-07-19  1:32       ` lihuisong (C)
2023-07-18  8:28     ` [PATCH v3 3/3] doc: announce bonding function change Chaoyong He
2023-07-18 11:40       ` Ferruh Yigit
2023-07-18 15:52       ` Stephen Hemminger
2023-07-19  1:31       ` lihuisong (C)
2023-07-19  1:37         ` Chaoyong He
2023-07-19  1:53           ` lihuisong (C)
2023-07-26  9:06     ` [PATCH v3 0/3] announce bonding macro and " Chaoyong He
2023-07-28 13:54     ` Thomas Monjalon

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=5257be49-9515-a90d-3e55-5464211c9679@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=long.wu@corigine.com \
    --cc=niklas.soderlund@corigine.com \
    --cc=oss-drivers@corigine.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).