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 65655A054A for ; Tue, 25 Oct 2022 17:08:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 61BB142C3C; Tue, 25 Oct 2022 17:08:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 2D3B042C1D for ; Tue, 25 Oct 2022 17:08:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666710528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5+Do/zcnS4dkLdpSmOAWt4IjzGF8Bnn0CRcZg91rx60=; b=LSLthJN8bDBEEu31S+yXy+zUxFVW2HB/E3nsV0h8GrZRV+HcI1YVnrcNwsY4OGGHrGIeQT CuMJQmd7KeUr3XyPlLoG5WOVFNz5ds7Y+vOfM3e/sFdZwUW4tNL4t+LWaYgr44ajkwcu8k 2BFQsHPOgM5KkIFBbPE1NB3bVKoPXgc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-330-bphxvXrJOq6dk5NpFzXH6A-1; Tue, 25 Oct 2022 11:08:45 -0400 X-MC-Unique: bphxvXrJOq6dk5NpFzXH6A-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8D28C2A59551; Tue, 25 Oct 2022 15:08:43 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 827414A9254; Tue, 25 Oct 2022 15:08:42 +0000 (UTC) From: Kevin Traynor To: Nithin Dabilpuram Cc: Akhil Goyal , dpdk stable Subject: patch 'examples/ipsec-secgw: use Tx checksum offload conditionally' has been queued to stable release 21.11.3 Date: Tue, 25 Oct 2022 16:06:27 +0100 Message-Id: <20221025150734.142189-32-ktraynor@redhat.com> In-Reply-To: <20221025150734.142189-1-ktraynor@redhat.com> References: <20221025150734.142189-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/01/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/783a1099f2d51b440ca86b2d119b720371451e4a Thanks. Kevin --- >From 783a1099f2d51b440ca86b2d119b720371451e4a Mon Sep 17 00:00:00 2001 From: Nithin Dabilpuram Date: Thu, 21 Jul 2022 21:01:31 +0530 Subject: [PATCH] examples/ipsec-secgw: use Tx checksum offload conditionally [ upstream commit 4edcee19fc20be7c28da3e06e3be5e8567162f01 ] Use Tx checksum offload only when all the ports have it enabled as the qconf for a particular lcore stores ipv4_offloads for all the Tx ports and each lcore can Tx to any port. Fixes: 03128be4cd4d ("examples/ipsec-secgw: allow disabling some Rx/Tx offloads") Signed-off-by: Nithin Dabilpuram Acked-by: Akhil Goyal --- examples/ipsec-secgw/ipsec-secgw.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index a1faff6a59..19ced948ec 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -2371,10 +2371,4 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads) qconf->tx_queue_id[portid] = tx_queueid; - /* Pre-populate pkt offloads based on capabilities */ - qconf->outbound.ipv4_offloads = RTE_MBUF_F_TX_IPV4; - qconf->outbound.ipv6_offloads = RTE_MBUF_F_TX_IPV6; - if (local_port_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) - qconf->outbound.ipv4_offloads |= RTE_MBUF_F_TX_IP_CKSUM; - tx_queueid++; @@ -3254,4 +3248,5 @@ main(int32_t argc, char **argv) uint64_t req_tx_offloads[RTE_MAX_ETHPORTS]; struct eh_conf *eh_conf = NULL; + uint32_t ipv4_cksum_port_mask = 0; size_t sess_sz; @@ -3361,4 +3356,18 @@ main(int32_t argc, char **argv) port_init(portid, req_rx_offloads[portid], req_tx_offloads[portid]); + if ((req_tx_offloads[portid] & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM)) + ipv4_cksum_port_mask = 1U << portid; + } + + for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { + if (rte_lcore_is_enabled(lcore_id) == 0) + continue; + + /* Pre-populate pkt offloads based on capabilities */ + lcore_conf[lcore_id].outbound.ipv4_offloads = RTE_MBUF_F_TX_IPV4; + lcore_conf[lcore_id].outbound.ipv6_offloads = RTE_MBUF_F_TX_IPV6; + /* Update per lcore checksum offload support only if all ports support it */ + if (ipv4_cksum_port_mask == enabled_port_mask) + lcore_conf[lcore_id].outbound.ipv4_offloads |= RTE_MBUF_F_TX_IP_CKSUM; } -- 2.37.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-10-25 14:18:59.269242499 +0100 +++ 0032-examples-ipsec-secgw-use-Tx-checksum-offload-conditi.patch 2022-10-25 14:18:58.387798005 +0100 @@ -1 +1 @@ -From 4edcee19fc20be7c28da3e06e3be5e8567162f01 Mon Sep 17 00:00:00 2001 +From 783a1099f2d51b440ca86b2d119b720371451e4a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4edcee19fc20be7c28da3e06e3be5e8567162f01 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 815b9254ae..8a25b83535 100644 +index a1faff6a59..19ced948ec 100644 @@ -23 +24 @@ -@@ -1999,10 +1999,4 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads) +@@ -2371,10 +2371,4 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads) @@ -34 +35 @@ -@@ -2926,4 +2920,5 @@ main(int32_t argc, char **argv) +@@ -3254,4 +3248,5 @@ main(int32_t argc, char **argv) @@ -40 +41 @@ -@@ -3047,4 +3042,18 @@ main(int32_t argc, char **argv) +@@ -3361,4 +3356,18 @@ main(int32_t argc, char **argv)