[dpdk-dev] [PATCH] dedicated queues: delete redundant check valid_bonded_port_id has include check_for_bonded_ethdev, no need to check again.
自控潘冬洋
197020236 at qq.com
Sat Jul 4 03:22:48 CEST 2020
Ok, I will fix it in the next patch, thank you.
------------------ Original ------------------
From: "xavier.huwei"<xavier.huwei at huawei.com>;
Date: Thu, Jul 2, 2020 09:02 AM
To: "自控潘冬洋"<197020236 at qq.com>;"chas3"<chas3 at att.com>;
Cc: "dev"<dev at dpdk.org>;"Wei Hu (Xavier)"<xavier.huwei at huawei.com>;
Subject: Re: [dpdk-dev] [PATCH] dedicated queues: delete redundant check valid_bonded_port_id has include check_for_bonded_ethdev, no need to check again.
Hi, pandongyang
The title is too long, and lack of the commit log.
You can use this script to check your commit when making patch
./devtools/check-git-log.sh -[num]
On 2020/6/21 21:34, 197020236 at qq.com wrote:
> From: pandongyang <197020236 at qq.com>
>
> Signed-off-by: pandongyang <197020236 at qq.com>
> ---
> drivers/net/bonding/rte_eth_bond_8023ad.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
> index b77a37d..3393743 100644
> --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
> +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
> @@ -1675,9 +1675,6 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
> dev = &rte_eth_devices[port];
> internals = dev->data->dev_private;
>
> - if (check_for_bonded_ethdev(dev) != 0)
> - return -1;
> -
> if (bond_8023ad_slow_pkt_hw_filter_supported(port) != 0)
> return -1;
>
Maybe it is better to remove another place as follows
int
rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
{
int retval = 0;
struct rte_eth_dev *dev;
struct bond_dev_private *internals;
if (valid_bonded_port_id(port) != 0)
return -EINVAL;
dev = &rte_eth_devices[port];
internals = dev->data->dev_private;
- if (check_for_bonded_ethdev(dev) != 0)
- return -1;
[snip]
> @@ -1704,9 +1701,6 @@ rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
> dev = &rte_eth_devices[port];
> internals = dev->data->dev_private;
>
> - if (check_for_bonded_ethdev(dev) != 0)
> - return -1;
> -
> /* Device must be stopped to set up slow queue */
> if (dev->data->dev_started)
> return -1;
similar to above comment
int
rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
{
int retval = 0;
struct rte_eth_dev *dev;
struct bond_dev_private *internals;
if (valid_bonded_port_id(port) != 0)
return -EINVAL;
dev = &rte_eth_devices[port];
internals = dev->data->dev_private;
- if (check_for_bonded_ethdev(dev) != 0)
- return -1;
[snip]
Thanks, Xavier
More information about the dev
mailing list