From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 93057A0C41 for ; Tue, 30 Nov 2021 17:39:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E80E41186; Tue, 30 Nov 2021 17:39:54 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id D046A410F7 for ; Tue, 30 Nov 2021 17:39:53 +0100 (CET) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id AEFBC3F1B1 for ; Tue, 30 Nov 2021 16:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290393; bh=XLdyiT2UEhFHSRHnY6Kpj56LvNHS97ziAZ51uXqVivI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nSYtdIN//0qfTvy5tZTecN9rwNrIVSfhdxqHo1MZDaUyxc5WikVpV4dAMk+Ldxidq 4R5FbvrYFYkQcLh7LbIg5X5HTUl2BnUuQPiPwaRY1a+JlbsLY+Q9fO/wssj+/2FROX /Np2VYxlVSRbn1WO6bvIvqKqH3t/xLb43uKD00Nnq3AykIgcM06SAIrKxa3kBzOQKB cRieUMrOg5rQ6BhjVuvWJKHzyBns5XH0+ovfcnnAfBM5l4okoE5ty8+NJEZjeFk3bQ 48tOM+8K+lA7GCZrBs+pJ9N6cYz958k5CYaIoxrUJLupi90ALSbW75Fg81RmvxM79H A4dBeQaYjA5Wg== Received: by mail-ed1-f69.google.com with SMTP id k7-20020aa7c387000000b003e7ed87fb31so17578642edq.3 for ; Tue, 30 Nov 2021 08:39:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XLdyiT2UEhFHSRHnY6Kpj56LvNHS97ziAZ51uXqVivI=; b=BpfVO2VfBWQWDzDevWg50TXQ2Uqwcd7CtFWlUfZps4hlU4nvN+AzNIMfFk27yyImlk 4BCl9K7NnC69+jrRIklTqOaYKKWT6IHlfkOkcY73TWlSn8Bq/GRu5tZUfupvJclREs34 yklomT8pY++C8NtCkDkpPRmYyhowsfK9T40z9m0VOh1CuOO0Dis40CVqbdtU4o1BpcqF iaDVuLsn1C7nO89eIX1wWFHK1Qi8Vthxhc1mDHHU0DbfFAThmnDNpTMNut0tjLdlQgyt 3dyUoskUH6b7S3vOtXSZsixVKViCM7DFV3nFamdYtrREVZu0OYkOmbJ+yUMIMB1cWMUD r4zQ== X-Gm-Message-State: AOAM532JDo/vQIPcgIkTCQmDaRcu+mX9uMr0/6lN+dzvn2jkd1zJVfGO 4E4zn/3GRR8mweE81EtZVWyzEbR9ra/nhW2tBTrVASuyMzmPkuWtZ4nqN8UjFtNbgQsZc1p7aBq esriX94960NvimF5ZX/OF5iTL X-Received: by 2002:a50:9eca:: with SMTP id a68mr51647edf.127.1638290393244; Tue, 30 Nov 2021 08:39:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2Qmgg//qsurCMDyL26zVTtPYCp9EuJtqc2t3pqLFXhMElxwgAZnJMDePWzmUix2PQoXupfw== X-Received: by 2002:a50:9eca:: with SMTP id a68mr51619edf.127.1638290393106; Tue, 30 Nov 2021 08:39:53 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id w5sm13073870edc.58.2021.11.30.08.39.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:39:52 -0800 (PST) From: christian.ehrhardt@canonical.com To: Chengchang Tang Cc: Min Hu , dpdk stable Subject: patch 'net/bonding: fix dedicated queue mode in vector burst' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:36 +0100 Message-Id: <20211130163605.2460997-72-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/cc4a61ee3144b61dee2f2071dc3d3162a237c63c Thanks. Christian Ehrhardt --- >From cc4a61ee3144b61dee2f2071dc3d3162a237c63c Mon Sep 17 00:00:00 2001 From: Chengchang Tang Date: Wed, 22 Sep 2021 15:09:12 +0800 Subject: [PATCH] net/bonding: fix dedicated queue mode in vector burst [ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ] If the vector burst mode is selected, the dedicated queue mode will not take effect on some PMDs because these PMDs may have some limitations in vector burst mode. For example, the limit on burst size. Currently, both hns3 and intel I40E require four alignments when receiving packets in vector mode. As a result, they can't accept packets if burst size below four. However, in dedicated queue mode, the burst size of periodic packets processing is one. This patch fixes the above problem by modifying the burst size to 32. This approach also makes the packet processing of the dedicated queue mode more reasonable. Currently, if multiple LACP protocol packets are received in the hardware queue in a cycle, only one LACP packet will be processed in this cycle, and the left packets will be processed in the following cycle. After the modification, all the LACP packets will be processed at one time, which seems more reasonable and closer to the behavior of the bonding driver when the dedicated queue is not turned on. Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control") Signed-off-by: Chengchang Tang Signed-off-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_8023ad.c | 32 ++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 128754f459..478c28afee 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -838,6 +838,27 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id, rx_machine(internals, slave_id, NULL); } +static void +bond_mode_8023ad_dedicated_rxq_process(struct bond_dev_private *internals, + uint16_t slave_id) +{ +#define DEDICATED_QUEUE_BURST_SIZE 32 + struct rte_mbuf *lacp_pkt[DEDICATED_QUEUE_BURST_SIZE]; + uint16_t rx_count = rte_eth_rx_burst(slave_id, + internals->mode4.dedicated_queues.rx_qid, + lacp_pkt, DEDICATED_QUEUE_BURST_SIZE); + + if (rx_count) { + uint16_t i; + + for (i = 0; i < rx_count; i++) + bond_mode_8023ad_handle_slow_pkt(internals, slave_id, + lacp_pkt[i]); + } else { + rx_machine_update(internals, slave_id, NULL); + } +} + static void bond_mode_8023ad_periodic_cb(void *arg) { @@ -926,15 +947,8 @@ bond_mode_8023ad_periodic_cb(void *arg) rx_machine_update(internals, slave_id, lacp_pkt); } else { - uint16_t rx_count = rte_eth_rx_burst(slave_id, - internals->mode4.dedicated_queues.rx_qid, - &lacp_pkt, 1); - - if (rx_count == 1) - bond_mode_8023ad_handle_slow_pkt(internals, - slave_id, lacp_pkt); - else - rx_machine_update(internals, slave_id, NULL); + bond_mode_8023ad_dedicated_rxq_process(internals, + slave_id); } periodic_machine(internals, slave_id); -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:10.111629426 +0100 +++ 0072-net-bonding-fix-dedicated-queue-mode-in-vector-burst.patch 2021-11-30 16:50:05.750873236 +0100 @@ -1 +1 @@ -From b8cfca26aed14354a6594d416a37881f494e2cfc Mon Sep 17 00:00:00 2001 +From cc4a61ee3144b61dee2f2071dc3d3162a237c63c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ] + @@ -24 +25,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ -index 3558644232..2029955c10 100644 +index 128754f459..478c28afee 100644