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 D5F1045D5D for ; Thu, 21 Nov 2024 00:43:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD87240296; Thu, 21 Nov 2024 00:43:52 +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 5FB6D40296 for ; Thu, 21 Nov 2024 00:43:51 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4315baa51d8so2233255e9.0 for ; Wed, 20 Nov 2024 15:43:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732146231; x=1732751031; 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=wdVm0m+k9H6fti4oT3pODUDOURk9lVQj5wTs4j+hGwA=; b=LXhcn3Oy+vkH5w6UeglPXqOaRUQF/S6XefyZnjq9yGd7FKe6KhI8NELJV0c6y9bDlB 0EGQe7m2rCcM4p9xEhJzD7UOsgrio0NPA6NJu2uCeBicY6hZAO10Drci07/Bfw709Zlt VpQ6f7s5L9q73KBXGqypcvBCu6NisTmf/hC/0fDRfSwCTpbZ84VB6rIXH8rxhzZjNzf2 YWTFQs2LsSqUn3rbkEfbfAAI1ol59upDpUezsv/OGALJriVOMpNu7CbA4SZ2X1a2+Z0m JekOmywCFqjUKMBfeZOLinh6FkwRjeeglHu3+4KQGPPk+io6d7mdkuS5lb0sKZvUCdBr opnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732146231; x=1732751031; 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=wdVm0m+k9H6fti4oT3pODUDOURk9lVQj5wTs4j+hGwA=; b=wnu0BiTLOVwJBGCPB8qe9C0WcSOT+say1qKGj2IBUfKLp/cFh16fR3tHvyuhsCoSNq +/dbi0CxArch+HaQVqqxxubumC8GGQqmYLcrVByTfHG+PnvaBlLQzfXgO/MIFfI1FqUJ OoCSR6n135+/ANd7P+p5n7iJEtqHUUTCP+OQp35J0BIYEjpvN5w5zdQN5hQyk7KJek2E gCMQaLIJSstPnjGQ71wUzEVmwnQ6jmOQu0WrEtyWCmz7QUMydeSk8UFURVU6gKdMQAh+ PJS4OIM9BJytMreWMVM5nyBrYXNBj17r4PE9Ty+ySMXfI8Hpidu0qZckXPHCW+mKQ6zp bYwQ== X-Forwarded-Encrypted: i=1; AJvYcCWwzKpPykJjaScfSCYH0fDGTtCvPn/A0goqVrvi0Mps91gRg+hfNIO+zfh4PMOXARbskinp4Uw=@dpdk.org X-Gm-Message-State: AOJu0YwF+465sPqv+eAK18ifcWnLcBn6zS+XHA5Isnj6oTbZk96YYA62 yMwSNpW/e6FP4Y/AjISPd3Bx78U9a/APfc+FhpXTKTSaU2DW0OnJvYoldrDv X-Google-Smtp-Source: AGHT+IHvXFmpYBFvabk1cJCkHw4NTql1N8r6K5ddgxQxQQ0gkzSy/ShhIoVj0sncd+P3cceF1SR84A== X-Received: by 2002:a05:600c:3b9d:b0:432:7c08:d0ff with SMTP id 5b1f17b1804b1-4334f01f748mr35349645e9.23.1732146230923; Wed, 20 Nov 2024 15:43:50 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825493ea20sm3299952f8f.93.2024.11.20.15.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 15:43:49 -0800 (PST) From: luca.boccassi@gmail.com To: Bruce Richardson Cc: Padraig Connolly , Vladimir Medvedkin , dpdk stable Subject: patch 'net/iavf: add segment-length check to Tx prep' has been queued to stable release 22.11.7 Date: Wed, 20 Nov 2024 23:41:48 +0000 Message-ID: <20241120234215.233355-23-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241120234215.233355-1-luca.boccassi@gmail.com> References: <20241112220754.666489-40-luca.boccassi@gmail.com> <20241120234215.233355-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 22.11.7 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/22/24. 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/cc6ceb096e8e1d3d04dc42f6e125a45264087630 Thanks. Luca Boccassi --- >From cc6ceb096e8e1d3d04dc42f6e125a45264087630 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 11 Nov 2024 16:42:20 +0000 Subject: [PATCH] net/iavf: add segment-length check to Tx prep [ upstream commit 4523e0753b243066357f98fd9739fde72605d0fb ] In the Tx prep function, the metadata checks were only checking the packet length and ignoring the data length. For single-buffer packets we can quickly check that the data length is the packet length. Fixes: 19ee91c6bd9a ("net/iavf: check illegal packet sizes") Reported-by: Padraig Connolly Signed-off-by: Bruce Richardson Acked-by: Vladimir Medvedkin Tested-by: Padraig Connolly --- drivers/net/iavf/iavf_rxtx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 6a0cf31a4c..073f724231 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -3005,7 +3005,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, return i; } - if (m->pkt_len < IAVF_TX_MIN_PKT_LEN) { + /* valid packets are greater than min size, and single-buffer pkts + * must have data_len == pkt_len + */ + if (m->pkt_len < IAVF_TX_MIN_PKT_LEN || + (m->nb_segs == 1 && m->data_len != m->pkt_len)) { rte_errno = EINVAL; return i; } -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-20 23:41:23.524287358 +0000 +++ 0023-net-iavf-add-segment-length-check-to-Tx-prep.patch 2024-11-20 23:41:22.752195468 +0000 @@ -1 +1 @@ -From 4523e0753b243066357f98fd9739fde72605d0fb Mon Sep 17 00:00:00 2001 +From cc6ceb096e8e1d3d04dc42f6e125a45264087630 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4523e0753b243066357f98fd9739fde72605d0fb ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 4850b9e381..6a093c6746 100644 +index 6a0cf31a4c..073f724231 100644 @@ -25 +26 @@ -@@ -3677,7 +3677,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -3005,7 +3005,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,