From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id 835FF1B5AA; Mon, 11 Feb 2019 09:02:35 +0100 (CET) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E7AF4BECA3A8734AAFCC; Mon, 11 Feb 2019 16:02:32 +0800 (CST) Received: from localhost (10.177.24.66) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.408.0; Mon, 11 Feb 2019 16:02:22 +0800 From: wangyunjian To: CC: , , Yunjian Wang , Date: Mon, 11 Feb 2019 16:01:36 +0800 Message-ID: <1549872096-16116-1-git-send-email-wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.24.66] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] net/bonding: fix slave tx burst for mode 4 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: Mon, 11 Feb 2019 08:02:35 -0000 From: Yunjian Wang Now sending 0 packet it doesn't consider for LACPDUs, but the LACPDUs should be checked and sended. Fixes: 09150784a776 ("net/bonding: burst mode hash calculation") Cc: stable@dpdk.org Reported-by: Hui Zhao Signed-off-by: Yunjian Wang --- drivers/net/bonding/rte_eth_bond_pmd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 44deaf1..a77af19 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1298,9 +1298,6 @@ struct bwg_slave { uint16_t i; - if (unlikely(nb_bufs == 0)) - return 0; - /* Copy slave list to protect against slave up/down changes during tx * bursting */ slave_count = internals->active_slave_count; @@ -1310,6 +1307,9 @@ struct bwg_slave { memcpy(slave_port_ids, internals->active_slaves, sizeof(slave_port_ids[0]) * slave_count); + if (unlikely(nb_bufs == 0)) + goto lacp_send; + dist_slave_count = 0; for (i = 0; i < slave_count; i++) { struct port *port = &bond_mode_8023ad_ports[slave_port_ids[i]]; @@ -1365,6 +1365,7 @@ struct bwg_slave { } } +lacp_send: /* Check for LACP control packets and send if available */ for (i = 0; i < slave_count; i++) { struct port *port = &bond_mode_8023ad_ports[slave_port_ids[i]]; -- 1.8.3.1