[1/3] doc: announce bonding macro change
Checks
Commit Message
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(-)
Comments
On 7/14/2023 9:15 AM, Chaoyong He wrote:
> 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>
>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
<...>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index fb771a0305..c9477dd0da 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -161,3 +161,7 @@ Deprecation Notices
> The new port library API (functions rte_swx_port_*)
> will gradually transition from experimental to stable status
> starting with DPDK 23.07 release.
> +
> +* 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``.
It can be better to move this below the ethdev entries, to group them, I
can do this while merging.
> On 7/14/2023 9:15 AM, Chaoyong He wrote:
> > 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>
> >
>
> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
>
> <...>
>
> > diff --git a/doc/guides/rel_notes/deprecation.rst
> > b/doc/guides/rel_notes/deprecation.rst
> > index fb771a0305..c9477dd0da 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -161,3 +161,7 @@ Deprecation Notices
> > The new port library API (functions rte_swx_port_*)
> > will gradually transition from experimental to stable status
> > starting with DPDK 23.07 release.
> > +
> > +* 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``.
>
>
> It can be better to move this below the ethdev entries, to group them, I can do
> this while merging.
Okay, I will do it in the v2 patch, thanks very much.
@@ -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;
}
@@ -161,3 +161,7 @@ Deprecation Notices
The new port library API (functions rte_swx_port_*)
will gradually transition from experimental to stable status
starting with DPDK 23.07 release.
+
+* 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``.
@@ -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 */
@@ -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 */