From patchwork Mon Oct 31 03:52:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linhaifeng X-Patchwork-Id: 16875 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 D0E0358D8; Mon, 31 Oct 2016 04:53:16 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [58.251.152.64]) by dpdk.org (Postfix) with ESMTP id 25FC756AB for ; Mon, 31 Oct 2016 04:53:13 +0100 (CET) Received: from 172.24.1.36 (EHLO SZXEML424-HUB.china.huawei.com) ([172.24.1.36]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DUI33423; Mon, 31 Oct 2016 11:53:11 +0800 (CST) Received: from localhost (10.177.20.223) by SZXEML424-HUB.china.huawei.com (10.82.67.153) with Microsoft SMTP Server id 14.3.235.1; Mon, 31 Oct 2016 11:53:06 +0800 From: linhaifeng To: , Date: Mon, 31 Oct 2016 11:52:27 +0800 Message-ID: <1477885947-35804-1-git-send-email-haifeng.lin@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.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" From: Haifeng Lin 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 | 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 09ce7bf..ca17898 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -169,7 +169,8 @@ 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((hdr->ether_type == ether_type_slow_be && + !bufs[j]->vlan_tci) || !collecting || (!promisc && !is_multicast_ether_addr(&hdr->d_addr) && !is_same_ether_addr(&bond_mac, &hdr->d_addr)))) {