From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) by dpdk.org (Postfix) with ESMTP id E43B4324D for ; Thu, 16 Aug 2018 14:56:34 +0200 (CEST) Received: by mail-io0-f195.google.com with SMTP id m4-v6so3770730iop.3 for ; Thu, 16 Aug 2018 05:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Au5TI7D/pwcyR8NqsA+X6i9YHaxccxnjbu/E850yxfo=; b=DbDjiotpqOaMTAzze+UmZJoC2FrJViOYF0A5h4hBMNe/EhlGKhXlFk183QA/blPIMf oVoYngIz4VIGBhxfLjmZd2VgLxsHEPoEX3TVkrMrklAcxIOAoO0wJ4pa7V4fmQ1rOq/f P3bQk7C4XDbWUFy8slho5f3NXg3F42KZ7VYbworsv8CXJN2EkPA2gNQobkqe/SRckwmM 16hZmaN3S3z33fjyx06peR+FxeAHuHwYoVbuseW+nM9AWM+SHq+biIHZnKz9vcKjSKtp pzOzlnCrPPzUsbrRQJzsfPx4W2NWG7L3XiwCAMsDj56u0BRsg6L+p20n2FUsDVudGhNM dsSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Au5TI7D/pwcyR8NqsA+X6i9YHaxccxnjbu/E850yxfo=; b=GKQ2tl5UnEoEgpzYx92WPA840P84Ay0Ajlxve6QMy6Tt+6YstMavwbgDM6KZqLSdGS dWu7BVMyEkKjV2SD7sW8TaWxcxNZ7bueiaFP2pvxoMhPw5StYLaIC3h9xAyhHndEsB/z anMRMhnXJZ9qH/A49rL8/FC7e38W3Y1tD8MHJiH64mFHc+MA1cI/Z/Z6y2hh5iK48i28 6l4kaEVyt2JSzrUmhaqOTOoJGVrUrhAS28qdBoa0TXPTHGaSUKT3jBSh5/M8baRckRLS LHXcaoDNPP2tmwPKOIpIHEXRsZ2YR20PGLBdIRQbey/J4dgCMsk8by9pJdvCVGf4SkM0 JeXw== X-Gm-Message-State: AOUpUlGNwdN+Kg8d3Yk3rFpnxgw4QLcT/I70kJTj3YfA1+eHK6Vb7mEr kY0xP0cVagaw2Em6sFZUE//IG6ezxBklIucDa1M= X-Google-Smtp-Source: AA+uWPwvi+TiRlFumREKQFTFqXsBnabroTpQlQbgd2NtmR8SMME5jY8infwLpBKE6YoNsgNE8lnTabToEjAA4x4lZdk= X-Received: by 2002:a5e:db43:: with SMTP id r3-v6mr23988703iop.215.1534424194242; Thu, 16 Aug 2018 05:56:34 -0700 (PDT) MIME-Version: 1.0 References: <1533629446-5712-1-git-send-email-wangyunjian@huawei.com> In-Reply-To: <1533629446-5712-1-git-send-email-wangyunjian@huawei.com> From: Chas Williams <3chas3@gmail.com> Date: Thu, 16 Aug 2018 08:56:23 -0400 Message-ID: To: wangyunjian@huawei.com Cc: dev@dpdk.org, stone.zhou@huawei.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/bonding: add support to match on 0x88A8 ethertype X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 12:56:35 -0000 On Tue, Aug 7, 2018 at 4:11 AM wangyunjian wrote: > From: Yunjian Wang > > 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 > Acked-by: Chas Williams > --- > 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 > > >