From mboxrd@z Thu Jan 1 00:00:00 1970 From: linhaifeng Subject: [PATCH] net/bonding: not handle vlan slow packet Date: Fri, 28 Oct 2016 10:57:03 +0800 Message-ID: <5812BE7F.8020007@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit To: "dev@dpdk.org" , Return-path: 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) 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(-) 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