DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet
@ 2016-10-31  3:52 linhaifeng
  2016-11-01 10:46 ` Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: linhaifeng @ 2016-10-31  3:52 UTC (permalink / raw)
  To: dev, declan.doherty

From: Haifeng Lin <haifeng.lin@huawei.com>

if rx vlan offload is enable we should not handle vlan slow
packets too.

Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 09ce7bf..ca17898 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -169,7 +169,8 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 			/* Remove packet from array if it is slow packet or slave is not
 			 * in collecting state or bondign interface is not in promiscus
 			 * mode and packet address does not match. */
-			if (unlikely(hdr->ether_type == ether_type_slow_be ||
+			if (unlikely((hdr->ether_type == ether_type_slow_be &&
+				!bufs[j]->vlan_tci) ||
 				!collecting || (!promisc &&
 					!is_multicast_ether_addr(&hdr->d_addr) &&
 					!is_same_ether_addr(&bond_mac, &hdr->d_addr)))) {
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet
  2016-10-31  3:52 [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet linhaifeng
@ 2016-11-01 10:46 ` Ferruh Yigit
  2016-11-01 12:32   ` linhaifeng
  0 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2016-11-01 10:46 UTC (permalink / raw)
  To: linhaifeng, dev, declan.doherty

Hi Haifeng,

On 10/31/2016 3:52 AM, linhaifeng wrote:
> From: Haifeng Lin <haifeng.lin@huawei.com>
> 
> if rx vlan offload is enable we should not handle vlan slow
> packets too.
> 
> Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
> ---
>  drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 09ce7bf..ca17898 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -169,7 +169,8 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
>  			/* Remove packet from array if it is slow packet or slave is not
>  			 * in collecting state or bondign interface is not in promiscus
>  			 * mode and packet address does not match. */
> -			if (unlikely(hdr->ether_type == ether_type_slow_be ||
> +			if (unlikely((hdr->ether_type == ether_type_slow_be &&
> +				!bufs[j]->vlan_tci) ||
>  				!collecting || (!promisc &&
>  					!is_multicast_ether_addr(&hdr->d_addr) &&
>  					!is_same_ether_addr(&bond_mac, &hdr->d_addr)))) {
> 

There are a few version of this patch, I guess this one is the correct
one, can you please confirm?
Also this one supersede following one, right?
http://dpdk.org/dev/patchwork/patch/16840/

It helps a lot if you use versioning in the patches [PATCH -vN] and add
a description of changes in commit log (after "---") between patch versions.

Thanks,
ferruh

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

* Re: [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet
  2016-11-01 10:46 ` Ferruh Yigit
@ 2016-11-01 12:32   ` linhaifeng
  2016-11-04  3:16     ` linhaifeng
  0 siblings, 1 reply; 7+ messages in thread
From: linhaifeng @ 2016-11-01 12:32 UTC (permalink / raw)
  To: Ferruh Yigit, dev, declan.doherty

在 2016/11/1 18:46, Ferruh Yigit 写道:
> Hi Haifeng,
> 
> On 10/31/2016 3:52 AM, linhaifeng wrote:
>> From: Haifeng Lin <haifeng.lin@huawei.com>
>>
>> if rx vlan offload is enable we should not handle vlan slow
>> packets too.
>>
>> Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
>> ---
>>  drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
>> index 09ce7bf..ca17898 100644
>> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
>> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
>> @@ -169,7 +169,8 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
>>  			/* Remove packet from array if it is slow packet or slave is not
>>  			 * in collecting state or bondign interface is not in promiscus
>>  			 * mode and packet address does not match. */
>> -			if (unlikely(hdr->ether_type == ether_type_slow_be ||
>> +			if (unlikely((hdr->ether_type == ether_type_slow_be &&
>> +				!bufs[j]->vlan_tci) ||
>>  				!collecting || (!promisc &&
>>  					!is_multicast_ether_addr(&hdr->d_addr) &&
>>  					!is_same_ether_addr(&bond_mac, &hdr->d_addr)))) {
>>
> 
> There are a few version of this patch, I guess this one is the correct
> one, can you please confirm?
> Also this one supersede following one, right?
> http://dpdk.org/dev/patchwork/patch/16840/

yes,this is

> 
> It helps a lot if you use versioning in the patches [PATCH -vN] and add
> a description of changes in commit log (after "---") between patch versions.
> 

ok,i think should not send patch so worry:)

I have a question to ask:
Is there any other packets' type also is 0x8809 except with lacp packets?
I saw some guests try to use this type to check link status between VM
but droped by lacp bond recv function.


> Thanks,
> ferruh
> 
> .
> 

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

* Re: [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet
  2016-11-01 12:32   ` linhaifeng
@ 2016-11-04  3:16     ` linhaifeng
  0 siblings, 0 replies; 7+ messages in thread
From: linhaifeng @ 2016-11-04  3:16 UTC (permalink / raw)
  To: Ferruh Yigit, dev, declan.doherty

Hi,all

please ignore the patch which title is "net/bonding: not handle vlan slow packet",
I will send another one.

在 2016/11/1 20:32, linhaifeng 写道:
> 在 2016/11/1 18:46, Ferruh Yigit 写道:
>> Hi Haifeng,
>>
>> On 10/31/2016 3:52 AM, linhaifeng wrote:
>>> From: Haifeng Lin <haifeng.lin@huawei.com>
>>>
>>> if rx vlan offload is enable we should not handle vlan slow
>>> packets too.
>>>
>>> Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
>>> ---
>>>  drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
>>> index 09ce7bf..ca17898 100644
>>> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
>>> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
>>> @@ -169,7 +169,8 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
>>>  			/* Remove packet from array if it is slow packet or slave is not
>>>  			 * in collecting state or bondign interface is not in promiscus
>>>  			 * mode and packet address does not match. */
>>> -			if (unlikely(hdr->ether_type == ether_type_slow_be ||
>>> +			if (unlikely((hdr->ether_type == ether_type_slow_be &&
>>> +				!bufs[j]->vlan_tci) ||
>>>  				!collecting || (!promisc &&
>>>  					!is_multicast_ether_addr(&hdr->d_addr) &&
>>>  					!is_same_ether_addr(&bond_mac, &hdr->d_addr)))) {
>>>
>>
>> There are a few version of this patch, I guess this one is the correct
>> one, can you please confirm?
>> Also this one supersede following one, right?
>> http://dpdk.org/dev/patchwork/patch/16840/
> 
> yes,this is
> 
>>
>> It helps a lot if you use versioning in the patches [PATCH -vN] and add
>> a description of changes in commit log (after "---") between patch versions.
>>
> 
> ok,i think should not send patch so worry:)
> 
> I have a question to ask:
> Is there any other packets' type also is 0x8809 except with lacp packets?
> I saw some guests try to use this type to check link status between VM
> but droped by lacp bond recv function.
> 
> 
>> Thanks,
>> ferruh
>>
>> .
>>
> 

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

* [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet
@ 2016-10-31  2:39 linhaifeng
  0 siblings, 0 replies; 7+ messages in thread
From: linhaifeng @ 2016-10-31  2:39 UTC (permalink / raw)
  To: dev, declan.doherty

From: Haifeng Lin <haifeng.lin@huawei.com>

if rx vlan offload is enable we should not handle vlan slow
packets too.

Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 09ce7bf..9e99442 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -169,7 +169,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 			/* Remove packet from array if it is slow packet or slave is not
 			 * in collecting state or bondign interface is not in promiscus
 			 * mode and packet address does not match. */
-			if (unlikely(hdr->ether_type == ether_type_slow_be ||
+			if (unlikely((hdr->ether_type == ether_type_slow_be && && !bufs[j]->vlan_tci) ||
 				!collecting || (!promisc &&
 					!is_multicast_ether_addr(&hdr->d_addr) &&
 					!is_same_ether_addr(&bond_mac, &hdr->d_addr)))) {
-- 
1.8.3.1

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

* [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet
@ 2016-10-31  1:34 linhaifeng
  0 siblings, 0 replies; 7+ messages in thread
From: linhaifeng @ 2016-10-31  1:34 UTC (permalink / raw)
  To: dev, declan.doherty

From: ZengGanghui <ZengGanghui@huawei.com>

if rx vlan offload is enable we should not handle vlan slow
packets too.

Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 43334f7..6c74bba 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -169,7 +169,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 			/* Remove packet from array if it is slow packet or slave is not
 			 * in collecting state or bondign interface is not in promiscus
 			 * mode and packet address does not match. */
-			if (unlikely((hdr->ether_type == ether_type_slow_be ||
+			if (unlikely(((hdr->ether_type == ether_type_slow_be && !bufs[j]->vlan_tci) ||
 				!collecting || (!promisc &&
 					!is_multicast_ether_addr(&hdr->d_addr) &&
 					!is_same_ether_addr(&bond_mac, &hdr->d_addr))) &&
-- 
1.8.3.1

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

* [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet
@ 2016-10-28  2:57 linhaifeng
  0 siblings, 0 replies; 7+ messages in thread
From: linhaifeng @ 2016-10-28  2:57 UTC (permalink / raw)
  To: dev, declan.doherty

If rx vlan offload is enable we should not handle vlan slow
packets too.

Signed-off-by: Haifeng Lin  <haifeng.lin@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 09ce7bf..7765017 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -169,10 +169,11 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
            /* Remove packet from array if it is slow packet or slave is not
             * in collecting state or bondign interface is not in promiscus
             * mode and packet address does not match. */
-           if (unlikely(hdr->ether_type == ether_type_slow_be ||
+           if (unlikely(!bufs[j]->vlan_tci &&
+                (hdr->ether_type == ether_type_slow_be ||
                !collecting || (!promisc &&
                    !is_multicast_ether_addr(&hdr->d_addr) &&
-                   !is_same_ether_addr(&bond_mac, &hdr->d_addr)))) {
+                   !is_same_ether_addr(&bond_mac, &hdr->d_addr))))) {

                if (hdr->ether_type == ether_type_slow_be) {
                    bond_mode_8023ad_handle_slow_pkt(internals, slaves[i],
--
1.8.3.1

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

end of thread, other threads:[~2016-11-04  3:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-31  3:52 [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet linhaifeng
2016-11-01 10:46 ` Ferruh Yigit
2016-11-01 12:32   ` linhaifeng
2016-11-04  3:16     ` linhaifeng
  -- strict thread matches above, loose matches on Subject: below --
2016-10-31  2:39 linhaifeng
2016-10-31  1:34 linhaifeng
2016-10-28  2:57 linhaifeng

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).