From patchwork Fri Oct 28 02:57:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linhaifeng X-Patchwork-Id: 16840 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id B4DD5326D; Fri, 28 Oct 2016 04:57:43 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [119.145.14.65]) by dpdk.org (Postfix) with ESMTP id 5C7B1326C for ; Fri, 28 Oct 2016 04:57:41 +0200 (CEST) Received: from 172.24.1.60 (EHLO szxeml430-hub.china.huawei.com) ([172.24.1.60]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DPT19591; Fri, 28 Oct 2016 10:57:36 +0800 (CST) Received: from [127.0.0.1] (10.177.20.223) by szxeml430-hub.china.huawei.com (10.82.67.185) with Microsoft SMTP Server id 14.3.235.1; Fri, 28 Oct 2016 10:57:31 +0800 To: "dev@dpdk.org" , From: linhaifeng Message-ID: <5812BE7F.8020007@huawei.com> Date: Fri, 28 Oct 2016 10:57:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 X-Originating-IP: [10.177.20.223] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] net/bonding: not handle vlan slow packet X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If rx vlan offload is enable we should not handle vlan slow packets too. Signed-off-by: Haifeng Lin --- drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 1.8.3.1 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],