[dpdk-dev] [PATCH] net/bonding: add support to match on 0x88A8 ethertype

Chas Williams 3chas3 at gmail.com
Thu Aug 16 14:56:23 CEST 2018


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

> From: Yunjian Wang <wangyunjian at 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 at huawei.com>
>

Acked-by: Chas Williams <chas3 at 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
>
>
>


More information about the dev mailing list