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 32044432DA for ; Wed, 8 Nov 2023 20:27:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B1DD406A2; Wed, 8 Nov 2023 20:27:00 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 9C69940395 for ; Wed, 8 Nov 2023 20:26:58 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4079ed65582so53946115e9.1 for ; Wed, 08 Nov 2023 11:26:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699471618; x=1700076418; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KomkpVx+8W2BNAcFNOvyP7ZC5IhiIcZjEsUHbk/MPOQ=; b=DbBB9ueoAnFAZ4y87UfuhYckOqLzMyn1jO7/E37F1QIOp+WusSxLWf8Z1yqk18PS0l UmwCYMV49P72Og4aahbenubk0EjnX9wHwD4GzoQxFk3Syxp827LRK9K61nHEy23Aa6ij wBF3C7jQBcwfg4Cuws3XG48VJZV/TRbx8z3sKEZz/BpK5NpwoVy8zOpYngAeU8z0XScl x3mWlASEZJi+6yx04NAvSV54SvOTIouVOMLQgoxj/F62KmZKZ+ooLUgvfNloRIgxnJGr JZhcl7nP3Xk6UO9P3ubxM6gJK9xOmpYG97oQ7oHT3X/TYSkpRwnnOoLRzeRD5PzBhxhc xVwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699471618; x=1700076418; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KomkpVx+8W2BNAcFNOvyP7ZC5IhiIcZjEsUHbk/MPOQ=; b=lOJznys+JWXA0SGMW1vr4V/FXvybe5w83Xz+qGEIsk/LgJmdN07W7PGbm5OypeesmR PiH6HT7o2anjJPCqdDIl2o5OvJnsbym5Mho2nbfzpyGqX4AVgDI2UDbOD43r5q7zDnf8 Is/bgxPqwtEtK4PvoqljdXN5VgTY3RlrzmRvQGYn4+L4ASpq0whE7qnT36QjdbX7Tw3m 3CQCQpRsKjl/q9qfeuw9rnQP7uTZrJtVD6p3Ko3Ei39DxLzCGHznkaOTffgc7qGL7j/9 bDxeyA6t2dFN7CNIvXyWCC3/DWHyi/kp1h3wgX9Dtu+XYozl6T/ot+FohbujVsJpFlqb KOBA== X-Gm-Message-State: AOJu0YzU8hvqayBs8dV0y5FECs7j1NwdytnnRqHeiDtBAML3mEcrQ64C lc41SbpT0iFl6I0sPhs+7TU= X-Google-Smtp-Source: AGHT+IE2f+gozSnj3Jse2ebe5cHUUeB38P/q5/UPG65Pm13jaH+Xm1fLV41PWW1+EZj3cjtHW0EO7A== X-Received: by 2002:a5d:588a:0:b0:32f:7d80:9c89 with SMTP id n10-20020a5d588a000000b0032f7d809c89mr2150225wrf.54.1699471618100; Wed, 08 Nov 2023 11:26:58 -0800 (PST) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id v17-20020a5d5911000000b00326b8a0e817sm5596699wrd.84.2023.11.08.11.26.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 11:26:57 -0800 (PST) From: luca.boccassi@gmail.com To: David Marchand Cc: Ferruh Yigit , dpdk stable Subject: patch 'net/tap: fix IPv4 checksum offloading' has been queued to stable release 20.11.10 Date: Wed, 8 Nov 2023 19:25:24 +0000 Message-Id: <20231108192535.922238-26-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108192535.922238-1-luca.boccassi@gmail.com> References: <20231018235930.3144-41-luca.boccassi@gmail.com> <20231108192535.922238-1-luca.boccassi@gmail.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 20.11.10 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/10/23. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/8932ba110ac486f7fec81fa3bee5c2e25a2c0e8c Thanks. Luca Boccassi --- >From 8932ba110ac486f7fec81fa3bee5c2e25a2c0e8c Mon Sep 17 00:00:00 2001 From: David Marchand Date: Thu, 24 Aug 2023 09:18:21 +0200 Subject: [PATCH] net/tap: fix IPv4 checksum offloading [ upstream commit 3e9c82e88069b1e6e945479626b4c054edf8ba96 ] Checking that one of RTE_MBUF_F_TX_IPV4 or RTE_MBUF_F_TX_IP_CKSUM is present is not compliant with the offloading API which specifies that IP checksum requires RTE_MBUF_F_TX_IP_CKSUM. On the other hand, RTE_MBUF_F_TX_IP_CKSUM is invalid for IPv6 packets, so we can simply check for RTE_MBUF_F_TX_IP_CKSUM and assume this is an IPv4 packet. Fixes: 8ae3023387e9 ("net/tap: add Rx/Tx checksum offload support") Signed-off-by: David Marchand Acked-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 2a7006c7b2..67b3a45fd2 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -570,7 +570,7 @@ tap_tx_l3_cksum(char *packet, uint64_t ol_flags, unsigned int l2_len, { void *l3_hdr = packet + l2_len; - if (ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_IPV4)) { + if (ol_flags & PKT_TX_IP_CKSUM) { struct rte_ipv4_hdr *iph = l3_hdr; uint16_t cksum; @@ -653,7 +653,7 @@ tap_write_mbufs(struct tx_queue *txq, uint16_t num_mbufs, nb_segs = mbuf->nb_segs; if (txq->csum && - ((mbuf->ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_IPV4) || + ((mbuf->ol_flags & PKT_TX_IP_CKSUM || (mbuf->ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM || (mbuf->ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM))) { unsigned int l4_len = 0; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-08 19:23:53.247309215 +0000 +++ 0026-net-tap-fix-IPv4-checksum-offloading.patch 2023-11-08 19:23:51.809397038 +0000 @@ -1 +1 @@ -From 3e9c82e88069b1e6e945479626b4c054edf8ba96 Mon Sep 17 00:00:00 2001 +From 8932ba110ac486f7fec81fa3bee5c2e25a2c0e8c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3e9c82e88069b1e6e945479626b4c054edf8ba96 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 66335d2755..939c68db9a 100644 +index 2a7006c7b2..67b3a45fd2 100644 @@ -26 +27 @@ -@@ -559,7 +559,7 @@ tap_tx_l3_cksum(char *packet, uint64_t ol_flags, unsigned int l2_len, +@@ -570,7 +570,7 @@ tap_tx_l3_cksum(char *packet, uint64_t ol_flags, unsigned int l2_len, @@ -30,2 +31,2 @@ -- if (ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_IPV4)) { -+ if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) { +- if (ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_IPV4)) { ++ if (ol_flags & PKT_TX_IP_CKSUM) { @@ -35 +36 @@ -@@ -642,7 +642,7 @@ tap_write_mbufs(struct tx_queue *txq, uint16_t num_mbufs, +@@ -653,7 +653,7 @@ tap_write_mbufs(struct tx_queue *txq, uint16_t num_mbufs, @@ -39,4 +40,4 @@ -- ((mbuf->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_IPV4) || -+ ((mbuf->ol_flags & RTE_MBUF_F_TX_IP_CKSUM || - (mbuf->ol_flags & RTE_MBUF_F_TX_L4_MASK) == RTE_MBUF_F_TX_UDP_CKSUM || - (mbuf->ol_flags & RTE_MBUF_F_TX_L4_MASK) == RTE_MBUF_F_TX_TCP_CKSUM))) { +- ((mbuf->ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_IPV4) || ++ ((mbuf->ol_flags & PKT_TX_IP_CKSUM || + (mbuf->ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM || + (mbuf->ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM))) {