DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bonding: add support to match on 0x88A8 ethertype
@ 2018-08-07  8:10 wangyunjian
  2018-08-16 12:56 ` Chas Williams
  0 siblings, 1 reply; 3+ messages in thread
From: wangyunjian @ 2018-08-07  8:10 UTC (permalink / raw)
  To: dev; +Cc: stone.zhou, Yunjian Wang

From: Yunjian Wang <wangyunjian@huawei.com>

We assume VLAN ethtertype is 0x8100 in get_vlan_offset() function,
but it could be 0x88A8 if QinQ is supported.

Signed-off-by: Yunjian Wang <wangyunjian@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 58f7377..4417422 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -37,7 +37,8 @@
 {
 	size_t vlan_offset = 0;
 
-	if (rte_cpu_to_be_16(ETHER_TYPE_VLAN) == *proto) {
+	if (rte_cpu_to_be_16(ETHER_TYPE_VLAN) == *proto ||
+		rte_cpu_to_be_16(ETHER_TYPE_QINQ) == *proto) {
 		struct vlan_hdr *vlan_hdr = (struct vlan_hdr *)(eth_hdr + 1);
 
 		vlan_offset = sizeof(struct vlan_hdr);
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH] net/bonding: add support to match on 0x88A8 ethertype
  2018-08-07  8:10 [dpdk-dev] [PATCH] net/bonding: add support to match on 0x88A8 ethertype wangyunjian
@ 2018-08-16 12:56 ` Chas Williams
  2018-08-23 13:38   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Chas Williams @ 2018-08-16 12:56 UTC (permalink / raw)
  To: wangyunjian; +Cc: dev, stone.zhou

On Tue, Aug 7, 2018 at 4:11 AM wangyunjian <wangyunjian@huawei.com> wrote:

> From: Yunjian Wang <wangyunjian@huawei.com>
>
> We assume VLAN ethtertype is 0x8100 in get_vlan_offset() function,
> but it could be 0x88A8 if QinQ is supported.
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
>

Acked-by: Chas Williams <chas3@att.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 58f7377..4417422 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -37,7 +37,8 @@
>  {
>         size_t vlan_offset = 0;
>
> -       if (rte_cpu_to_be_16(ETHER_TYPE_VLAN) == *proto) {
> +       if (rte_cpu_to_be_16(ETHER_TYPE_VLAN) == *proto ||
> +               rte_cpu_to_be_16(ETHER_TYPE_QINQ) == *proto) {
>                 struct vlan_hdr *vlan_hdr = (struct vlan_hdr *)(eth_hdr +
> 1);
>
>                 vlan_offset = sizeof(struct vlan_hdr);
> --
> 1.8.3.1
>
>
>

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

* Re: [dpdk-dev] [PATCH] net/bonding: add support to match on 0x88A8 ethertype
  2018-08-16 12:56 ` Chas Williams
@ 2018-08-23 13:38   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-08-23 13:38 UTC (permalink / raw)
  To: Chas Williams, wangyunjian; +Cc: dev, stone.zhou

On 8/16/2018 1:56 PM, Chas Williams wrote:
> On Tue, Aug 7, 2018 at 4:11 AM wangyunjian <wangyunjian@huawei.com> wrote:
> 
>> From: Yunjian Wang <wangyunjian@huawei.com>
>>
>> We assume VLAN ethtertype is 0x8100 in get_vlan_offset() function,
>> but it could be 0x88A8 if QinQ is supported.
>>
>> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
>>
> 
> Acked-by: Chas Williams <chas3@att.com>

    Fixes: 06fe78b98ccd ("bond: add mode 6")
    Cc: stable@dpdk.org

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2018-08-23 13:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-07  8:10 [dpdk-dev] [PATCH] net/bonding: add support to match on 0x88A8 ethertype wangyunjian
2018-08-16 12:56 ` Chas Williams
2018-08-23 13:38   ` Ferruh Yigit

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