<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="text-align: left; text-indent: 0px; margin: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Hi Kevin!</div>
<div style="text-align: left; text-indent: 0px; margin: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="text-align: left; text-indent: 0px; margin: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Thank you for the notification about backporting. </div>
<div style="text-align: left; text-indent: 0px; margin: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Please merge this patch into the stable release. </div>
<div style="text-align: left; text-indent: 0px; margin: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="text-align: left; text-indent: 0px; margin: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
If it is possible, it will be nice to add to the stable release this commit too <a style="margin: 0px;" class="OWAAutoLink" id="OWAe6b55abe-6316-8990-bbb9-b6da6be7cce3" href="https://git.dpdk.org/dpdk/commit/?id=f7dabff91738e97d81f6844cb6c00b503de3d9ea">
https://git.dpdk.org/dpdk/commit/?id=f7dabff91738e97d81f6844cb6c00b503de3d9ea</a></div>
<div style="text-align: left; text-indent: 0px; margin: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="text-align: left; text-indent: 0px; margin: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks.</div>
<div style="text-align: left; text-indent: 0px; margin: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Serhii</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Kevin Traynor <ktraynor@redhat.com><br>
<b>Sent:</b> 18 July 2025 22:29<br>
<b>To:</b> Danylo Vodopianov <dvo-plv@napatech.com><br>
<b>Cc:</b> dpdk stable <stable@dpdk.org><br>
<b>Subject:</b> patch 'net/ntnic: avoid divide by zero' has been queued to stable release 24.11.3</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
FYI, your patch has been queued to stable release 24.11.3<br>
<br>
Note it hasn't been pushed to <a href="https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdpdk.org%2fbrowse%2fdpdk-stable&c=E,1,30w89yF4QLjfadAKGQFITCXmNAI8Fubd9zc_3CAyjRcyr7va20H2s-pRwTp8SDIDMsUiJ7ia2x0VYw8GBCf30-aNCcdCSAH9ghwAa3liAemIg-mFdFHKuQKY13B1&typo=1">
https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdpdk.org%2fbrowse%2fdpdk-stable&c=E,1,30w89yF4QLjfadAKGQFITCXmNAI8Fubd9zc_3CAyjRcyr7va20H2s-pRwTp8SDIDMsUiJ7ia2x0VYw8GBCf30-aNCcdCSAH9ghwAa3liAemIg-mFdFHKuQKY13B1&typo=1</a> yet.<br>
It will be pushed if I get no objections before 07/23/25. So please<br>
shout if anyone has objections.<br>
<br>
Also note that after the patch there's a diff of the upstream commit vs the<br>
patch applied to the branch. This will indicate if there was any rebasing<br>
needed to apply to the stable branch. If there were code changes for rebasing<br>
(ie: not only metadata diffs), please double check that the rebase was<br>
correctly done.<br>
<br>
Queued patches are on a temporary branch at:<br>
<a href="https://github.com/kevintraynor/dpdk-stable">https://github.com/kevintraynor/dpdk-stable</a><br>
<br>
This queued commit can be viewed at:<br>
<a href="https://github.com/kevintraynor/dpdk-stable/commit/cc5b54d0d2c07c676771ed09e74322f6512e6cc1">https://github.com/kevintraynor/dpdk-stable/commit/cc5b54d0d2c07c676771ed09e74322f6512e6cc1</a><br>
<br>
Thanks.<br>
<br>
Kevin<br>
<br>
---<br>
>From cc5b54d0d2c07c676771ed09e74322f6512e6cc1 Mon Sep 17 00:00:00 2001<br>
From: Danylo Vodopianov <dvo-plv@napatech.com><br>
Date: Mon, 5 May 2025 09:13:01 +0200<br>
Subject: [PATCH] net/ntnic: avoid divide by zero<br>
<br>
[ upstream commit 8bbae3e37cf309e8ffc5292bf9d41c44a217f7f1 ]<br>
<br>
Fix CID issue 457736 divide by 0. It was avoided by<br>
adding adittional checking on the return value<br>
for function.<br>
<br>
Fixes: effa04693274 ("net/ntnic: add statistics")<br>
<br>
Signed-off-by: Danylo Vodopianov <dvo-plv@napatech.com><br>
---<br>
drivers/net/ntnic/nthw/stat/nthw_stat.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/drivers/net/ntnic/nthw/stat/nthw_stat.c b/drivers/net/ntnic/nthw/stat/nthw_stat.c<br>
index b0db7b1984..d3e9225e58 100644<br>
--- a/drivers/net/ntnic/nthw/stat/nthw_stat.c<br>
+++ b/drivers/net/ntnic/nthw/stat/nthw_stat.c<br>
@@ -319,4 +319,8 @@ int nthw_stat_init(nthw_stat_t *p, nthw_fpga_t *p_fpga, int n_instance)<br>
if (p->mp_fld_load_bin) {<br>
uint32_t rpp = nthw_fpga_get_product_param(p_fpga, NT_RPP_PER_PS, 0);<br>
+ if (rpp == 0) {<br>
+ NT_LOG(ERR, NTHW, "RPP has wrong value"); /* Avoid divide by 0 */<br>
+ return -1;<br>
+ }<br>
uint32_t bin =<br>
(uint32_t)(((PORT_LOAD_WINDOWS_SIZE * 1000000000000ULL) / (32ULL * rpp)) -<br>
-- <br>
2.50.0<br>
<br>
---<br>
Diff of the applied patch vs upstream commit (please double-check if non-empty:<br>
---<br>
--- - 2025-07-18 20:29:13.162673752 +0100<br>
+++ 0060-net-ntnic-avoid-divide-by-zero.patch 2025-07-18 20:29:10.956907411 +0100<br>
@@ -1 +1 @@<br>
-From 8bbae3e37cf309e8ffc5292bf9d41c44a217f7f1 Mon Sep 17 00:00:00 2001<br>
+From cc5b54d0d2c07c676771ed09e74322f6512e6cc1 Mon Sep 17 00:00:00 2001<br>
@@ -5,0 +6,2 @@<br>
+[ upstream commit 8bbae3e37cf309e8ffc5292bf9d41c44a217f7f1 ]<br>
+<br>
@@ -11 +12,0 @@<br>
-Cc: stable@dpdk.org<br>
@@ -19 +20 @@<br>
-index 2ddef052a5..9bb97bf311 100644<br>
+index b0db7b1984..d3e9225e58 100644<br>
@@ -22 +23 @@<br>
-@@ -320,4 +320,8 @@ int nthw_stat_init(nthw_stat_t *p, nthw_fpga_t *p_fpga, int n_instance)<br>
+@@ -319,4 +319,8 @@ int nthw_stat_init(nthw_stat_t *p, nthw_fpga_t *p_fpga, int n_instance)<br>
<br>
</div>
</span></font></div>
</body>
</html>