DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] dedicated queues: delete redundant check valid_bonded_port_id has include check_for_bonded_ethdev, no need to check again.
@ 2020-06-21 13:34 197020236
  0 siblings, 0 replies; 3+ messages in thread
From: 197020236 @ 2020-06-21 13:34 UTC (permalink / raw)
  To: chas3, 197020236; +Cc: dev

From: pandongyang <197020236@qq.com>

Signed-off-by: pandongyang <197020236@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;
 
@@ -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;
-- 
2.23.0.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] dedicated queues: delete redundant check valid_bonded_port_id has include check_for_bonded_ethdev, no need to check again.
  2020-07-02  1:02 ` Wei Hu (Xavier)
@ 2020-07-04  1:22   ` =?gb18030?B?19S/2MXLtqzR8w==?=
  0 siblings, 0 replies; 3+ messages in thread
From: =?gb18030?B?19S/2MXLtqzR8w==?= @ 2020-07-04  1:22 UTC (permalink / raw)
  To: =?gb18030?B?eGF2aWVyLmh1d2Vp?=, =?gb18030?B?ZGV2?=,
	=?gb18030?B?Y2hhczM=?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 3532 bytes --]

Ok, I will fix it in the next patch, thank you.




------------------&nbsp;Original&nbsp;------------------
From:&nbsp;"xavier.huwei"<xavier.huwei@huawei.com&gt;;
Date:&nbsp;Thu, Jul 2, 2020 09:02 AM
To:&nbsp;"×Ô¿ØÅ˶¬Ñó"<197020236@qq.com&gt;;"chas3"<chas3@att.com&gt;;
Cc:&nbsp;"dev"<dev@dpdk.org&gt;;"Wei Hu (Xavier)"<xavier.huwei@huawei.com&gt;;
Subject:&nbsp;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.
&nbsp;&nbsp;&nbsp; You can use this script to check your commit when making patch
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ./devtools/check-git-log.sh -[num]

On 2020/6/21 21:34, 197020236@qq.com wrote:
&gt; From: pandongyang <197020236@qq.com&gt;
&gt;
&gt; Signed-off-by: pandongyang <197020236@qq.com&gt;
&gt; ---
&gt;&nbsp;&nbsp; drivers/net/bonding/rte_eth_bond_8023ad.c | 6 ------
&gt;&nbsp;&nbsp; 1 file changed, 6 deletions(-)
&gt;
&gt; diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
&gt; index b77a37d..3393743 100644
&gt; --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
&gt; +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
&gt; @@ -1675,9 +1675,6 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
&gt;&nbsp;&nbsp; 	dev = &amp;rte_eth_devices[port];
&gt;&nbsp;&nbsp; 	internals = dev-&gt;data-&gt;dev_private;
&gt;&nbsp;&nbsp; 
&gt; -	if (check_for_bonded_ethdev(dev) != 0)
&gt; -		return -1;
&gt; -
&gt;&nbsp;&nbsp; 	if (bond_8023ad_slow_pkt_hw_filter_supported(port) != 0)
&gt;&nbsp;&nbsp; 		return -1;
&gt;&nbsp;&nbsp; 
Maybe it is better to remove another place as follows

int
rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
{
&nbsp;&nbsp;&nbsp;&nbsp; int retval = 0;
&nbsp;&nbsp;&nbsp;&nbsp; struct rte_eth_dev *dev;
&nbsp;&nbsp;&nbsp;&nbsp; struct bond_dev_private *internals;

&nbsp;&nbsp;&nbsp;&nbsp; if (valid_bonded_port_id(port) != 0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -EINVAL;

&nbsp;&nbsp;&nbsp;&nbsp; dev = &amp;rte_eth_devices[port];
&nbsp;&nbsp;&nbsp;&nbsp; internals = dev-&gt;data-&gt;dev_private;

-&nbsp;&nbsp;&nbsp; if (check_for_bonded_ethdev(dev) != 0)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -1;

&nbsp;&nbsp;&nbsp;&nbsp; [snip]


&gt; @@ -1704,9 +1701,6 @@ rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
&gt;&nbsp;&nbsp; 	dev = &amp;rte_eth_devices[port];
&gt;&nbsp;&nbsp; 	internals = dev-&gt;data-&gt;dev_private;
&gt;&nbsp;&nbsp; 
&gt; -	if (check_for_bonded_ethdev(dev) != 0)
&gt; -		return -1;
&gt; -
&gt;&nbsp;&nbsp; 	/* Device must be stopped to set up slow queue */
&gt;&nbsp;&nbsp; 	if (dev-&gt;data-&gt;dev_started)
&gt;&nbsp;&nbsp; 		return -1;
similar to above comment

int
rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
{
&nbsp;&nbsp;&nbsp;&nbsp; int retval = 0;
&nbsp;&nbsp;&nbsp;&nbsp; struct rte_eth_dev *dev;
&nbsp;&nbsp;&nbsp;&nbsp; struct bond_dev_private *internals;

&nbsp;&nbsp;&nbsp;&nbsp; if (valid_bonded_port_id(port) != 0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -EINVAL;

&nbsp;&nbsp;&nbsp;&nbsp; dev = &amp;rte_eth_devices[port];
&nbsp;&nbsp;&nbsp;&nbsp; internals = dev-&gt;data-&gt;dev_private;

-&nbsp;&nbsp;&nbsp; if (check_for_bonded_ethdev(dev) != 0)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -1;

[snip]


Thanks, Xavier

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] dedicated queues: delete redundant check valid_bonded_port_id has include check_for_bonded_ethdev, no need to check again.
       [not found] <20200621133455.6BFC01C0C0@dpdk.org>
@ 2020-07-02  1:02 ` Wei Hu (Xavier)
  2020-07-04  1:22   ` =?gb18030?B?19S/2MXLtqzR8w==?=
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Hu (Xavier) @ 2020-07-02  1:02 UTC (permalink / raw)
  To: 197020236, chas3; +Cc: dev, Wei Hu (Xavier)

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@qq.com wrote:
> From: pandongyang <197020236@qq.com>
>
> Signed-off-by: pandongyang <197020236@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-04  1:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-21 13:34 [dpdk-dev] [PATCH] dedicated queues: delete redundant check valid_bonded_port_id has include check_for_bonded_ethdev, no need to check again 197020236
     [not found] <20200621133455.6BFC01C0C0@dpdk.org>
2020-07-02  1:02 ` Wei Hu (Xavier)
2020-07-04  1:22   ` =?gb18030?B?19S/2MXLtqzR8w==?=

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git