diff --git a/backport-fix-formula-error-in-comment.patch b/backport-fix-formula-error-in-comment.patch new file mode 100644 index 0000000000000000000000000000000000000000..83081e2bc9c38cce5b7926556b8765ae4153a97b --- /dev/null +++ b/backport-fix-formula-error-in-comment.patch @@ -0,0 +1,26 @@ +From 5feccf2f08b8954b3076366a3782b510455b3013 Mon Sep 17 00:00:00 2001 +From: ZENOTME +Date: Mon, 11 Mar 2024 21:50:18 +0800 +Subject: [PATCH] fix formula error in comment +Reference:https://github.com/xdp-project/xdp-tools/pull/404/ + +--- + headers/xdp/xsk.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/headers/xdp/xsk.h b/headers/xdp/xsk.h +index c604f9c..0b4fdca 100644 +--- a/headers/xdp/xsk.h ++++ b/headers/xdp/xsk.h +@@ -101,7 +101,7 @@ XDP_ALWAYS_INLINE __u32 xsk_prod_nb_free(struct xsk_ring_prod *r, __u32 nb) + * that this addition can be avoided in the more frequently + * executed code that computs free_entries in the beginning of + * this function. Without this optimization it whould have been +- * free_entries = r->cached_prod - r->cached_cons + r->size. ++ * free_entries = r->cached_cons - r->cached_prod + r->size + */ + r->cached_cons = __atomic_load_n(r->consumer, __ATOMIC_ACQUIRE); + r->cached_cons += r->size; +-- +2.27.0 + diff --git a/xdp-tools.spec b/xdp-tools.spec index 10aa9641c53e4e2143c40415626b39de0e8aa79c..57d5f87163b474605b005978a09ebce188e33060 100644 --- a/xdp-tools.spec +++ b/xdp-tools.spec @@ -7,7 +7,7 @@ Name: xdp-tools Version: 1.4.1 -Release: 2 +Release: 3 Summary: Utilities and example programs for use with XDP %global _soversion 1.4.0 @@ -15,6 +15,7 @@ License: GPLv2 URL: https://github.com/xdp-project/%{name} Source0: https://github.com/xdp-project/%{name}/archive/v%{version}.tar.gz Patch01: backport-xdp-bench-Add-correct-logging-message-for-XDP_PASS.patch +Patch02: backport-fix-formula-error-in-comment.patch BuildRequires: libbpf-devel BuildRequires: elfutils-libelf-devel @@ -118,6 +119,9 @@ make install V=1 %{_libdir}/pkgconfig/libxdp.pc %changelog +* Thu May 30 2024 baiguo 1.4.1-3 +- fix formula error in comment + * Sat May 11 2024 baiguo 1.4.1-2 - xdp-bench: Add correct logging message for XDP_PASS