From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 6556CA0096 for ; Wed, 10 Apr 2019 18:44:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 58CB41B105; Wed, 10 Apr 2019 18:44:39 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 966E61B1F1 for ; Wed, 10 Apr 2019 18:44:37 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 080EFA091E; Wed, 10 Apr 2019 16:44:37 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-94.ams2.redhat.com [10.36.117.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2CEC5D967; Wed, 10 Apr 2019 16:44:35 +0000 (UTC) From: Kevin Traynor To: Chas Williams Cc: Hui Zhao , dpdk stable Date: Wed, 10 Apr 2019 17:43:21 +0100 Message-Id: <20190410164411.10546-13-ktraynor@redhat.com> In-Reply-To: <20190410164411.10546-1-ktraynor@redhat.com> References: <20190410164411.10546-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 10 Apr 2019 16:44:37 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bonding: fix slave Tx burst for mode 4' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/16/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Kevin Traynor --- >From 0b58135e247bfffb9b852aa68a715e58f61a0cb4 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Thu, 14 Feb 2019 14:09:58 -0500 Subject: [PATCH] net/bonding: fix slave Tx burst for mode 4 [ upstream commit af91947cd236ece51b026ad9648b12cb59deeee5 ] The Tx burst routine always needs to check for pending LACPDUs and send them if available. Do this first to prioritize the control traffic. We can still early exit, before calculating the distribution slaves, if there isn't any data packets. Fixes: 09150784a776 ("net/bonding: burst mode hash calculation") Reported-by: Hui Zhao Signed-off-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 48 +++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index d709b077d..a39f72898 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1299,7 +1299,4 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t i; - if (unlikely(nb_bufs == 0)) - return 0; - /* Copy slave list to protect against slave up/down changes during tx * bursting */ @@ -1311,4 +1308,28 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs, sizeof(slave_port_ids[0]) * slave_count); + /* 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]]; + struct rte_mbuf *ctrl_pkt = NULL; + + if (likely(rte_ring_empty(port->tx_ring))) + continue; + + if (rte_ring_dequeue(port->tx_ring, + (void **)&ctrl_pkt) != -ENOENT) { + slave_tx_count = rte_eth_tx_burst(slave_port_ids[i], + bd_tx_q->queue_id, &ctrl_pkt, 1); + /* + * re-enqueue LAG control plane packets to buffering + * ring if transmission fails so the packet isn't lost. + */ + if (slave_tx_count != 1) + rte_ring_enqueue(port->tx_ring, ctrl_pkt); + } + } + + if (unlikely(nb_bufs == 0)) + return 0; + dist_slave_count = 0; for (i = 0; i < slave_count; i++) { @@ -1366,25 +1387,4 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs, } - /* 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]]; - struct rte_mbuf *ctrl_pkt = NULL; - - if (likely(rte_ring_empty(port->tx_ring))) - continue; - - if (rte_ring_dequeue(port->tx_ring, - (void **)&ctrl_pkt) != -ENOENT) { - slave_tx_count = rte_eth_tx_burst(slave_port_ids[i], - bd_tx_q->queue_id, &ctrl_pkt, 1); - /* - * re-enqueue LAG control plane packets to buffering - * ring if transmission fails so the packet isn't lost. - */ - if (slave_tx_count != 1) - rte_ring_enqueue(port->tx_ring, ctrl_pkt); - } - } - return total_tx_count; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-04-10 14:06:09.025517511 +0100 +++ 0013-net-bonding-fix-slave-Tx-burst-for-mode-4.patch 2019-04-10 14:06:07.803295640 +0100 @@ -1,15 +1,16 @@ -From af91947cd236ece51b026ad9648b12cb59deeee5 Mon Sep 17 00:00:00 2001 +From 0b58135e247bfffb9b852aa68a715e58f61a0cb4 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Thu, 14 Feb 2019 14:09:58 -0500 Subject: [PATCH] net/bonding: fix slave Tx burst for mode 4 +[ upstream commit af91947cd236ece51b026ad9648b12cb59deeee5 ] + The Tx burst routine always needs to check for pending LACPDUs and send them if available. Do this first to prioritize the control traffic. We can still early exit, before calculating the distribution slaves, if there isn't any data packets. Fixes: 09150784a776 ("net/bonding: burst mode hash calculation") -Cc: stable@dpdk.org Reported-by: Hui Zhao Signed-off-by: Chas Williams @@ -18,7 +19,7 @@ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c -index 2304172d0..61e731a8f 100644 +index d709b077d..a39f72898 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1299,7 +1299,4 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,