summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-support/tcpreplay/tcpreplay/0001-Fix-linker-error-for-TX_RING.patch71
-rw-r--r--meta-networking/recipes-support/tcpreplay/tcpreplay/0002-fix-incompatible-type-assignment-in-txring.c.patch31
-rw-r--r--meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.2.bb (renamed from meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.1.bb)4
3 files changed, 1 insertions, 105 deletions
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-Fix-linker-error-for-TX_RING.patch b/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-Fix-linker-error-for-TX_RING.patch
deleted file mode 100644
index d8f0ab270c..0000000000
--- a/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-Fix-linker-error-for-TX_RING.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1From 36e038d9e4047ae42a148f671f18971cc6a68558 Mon Sep 17 00:00:00 2001
2From: "mark.yang" <mark.yang@lge.com>
3Date: Thu, 10 Apr 2025 18:30:52 +0900
4Subject: [PATCH] Fix linker error for TX_RING
5
6Found similar issue in gcc 15 build environment.
7- See more details at: http://errors.yoctoproject.org/Errors/Details/851800/
8```
9TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket':
10/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:328:(.text+0x1be): undefined reference to `txring_put'
11TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket_open_pf':
12/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:1088:(.text+0x7ea): undefined reference to `txring_init'
13TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket':
14/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:328:(.text+0x1be): undefined reference to `txring_put'
15TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket_open_pf':
16/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:1088:(.text+0x7ea): undefined reference to `txring_init'
17TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket':
18/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:328:(.text+0x1be): undefined reference to `txring_put'
19TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket_open_pf':
20/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:1088:(.text+0x7ea): undefined reference to `txring_init'
21```
22- The result of "nm -u txring.o" shows no symbols exist.
23
24- The config.h has HAVE_TX_RING defined but txring.c is not aware of it.
25 txring.c and txring.h include config.h at the beginning.
26
27- This resulted in a successful build in my build environment.
28
29It may
30Fixes #731
31Fixes #904
32
33Upstream-Status: Submitted [https://github.com/appneta/tcpreplay/pull/924]
34Signed-off-by: mark.yang <mark.yang@lge.com>
35---
36 src/common/txring.c | 3 +++
37 src/common/txring.h | 4 ++--
38 2 files changed, 5 insertions(+), 2 deletions(-)
39
40diff --git a/src/common/txring.c b/src/common/txring.c
41index d5768d75..f522893d 100644
42--- a/src/common/txring.c
43+++ b/src/common/txring.c
44@@ -31,6 +31,9 @@
45 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46 */
47
48+#include "defines.h"
49+#include "config.h"
50+
51 #ifdef HAVE_TX_RING
52
53 #include "txring.h"
54diff --git a/src/common/txring.h b/src/common/txring.h
55index 309da84c..3f14cac0 100644
56--- a/src/common/txring.h
57+++ b/src/common/txring.h
58@@ -33,11 +33,11 @@
59
60 #pragma once
61
62-#ifdef HAVE_TX_RING
63-
64 #include "defines.h"
65 #include "config.h"
66
67+#ifdef HAVE_TX_RING
68+
69 #if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1
70 #include <net/ethernet.h> /* the L2 protocols */
71 #include <netpacket/packet.h>
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay/0002-fix-incompatible-type-assignment-in-txring.c.patch b/meta-networking/recipes-support/tcpreplay/tcpreplay/0002-fix-incompatible-type-assignment-in-txring.c.patch
deleted file mode 100644
index 906c30e147..0000000000
--- a/meta-networking/recipes-support/tcpreplay/tcpreplay/0002-fix-incompatible-type-assignment-in-txring.c.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 5615e8f7bbf83f03acacd6d6ba9ff8dc6fdc91df Mon Sep 17 00:00:00 2001
2From: "mark.yang" <mark.yang@lge.com>
3Date: Thu, 10 Apr 2025 18:49:51 +0900
4Subject: [PATCH] fix incompatible type assignment in txring.c
5
6* There is an incompatible type assignment error in txring.c.
7 txring.c:200:12: error: incompatible types when assigning to type 'txring_t' {aka 'struct txring_s'} from type 'txring_t *' {aka 'struct txring_s *'}
8 200 | *txp = (txring_t *)safe_malloc(sizeof(txring_t));
9 | ^
10
11 txp is allocated as txring_t *, so I fixed it.
12
13Upstream-Status: Submitted [https://github.com/appneta/tcpreplay/pull/924]
14Signed-off-by: mark.yang <mark.yang@lge.com>
15---
16 src/common/txring.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/src/common/txring.c b/src/common/txring.c
20index f522893d..b062dac2 100644
21--- a/src/common/txring.c
22+++ b/src/common/txring.c
23@@ -197,7 +197,7 @@ txring_init(int fd, unsigned int mtu)
24 txring_t *txp;
25
26 /* allocate memory for structure and fill it with different stuff*/
27- *txp = (txring_t *)safe_malloc(sizeof(txring_t));
28+ txp = (txring_t *)safe_malloc(sizeof(txring_t));
29 txp->treq = (struct tpacket_req *)safe_malloc(sizeof(struct tpacket_req));
30
31 txring_mkreq(txp->treq, mtu);
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.1.bb b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.2.bb
index 46e06a928e..96a7087b0b 100644
--- a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.1.bb
+++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.5.2.bb
@@ -9,11 +9,9 @@ LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=10f0474a2f0e5dccfca20f69d6598ad8"
9 9
10SRC_URI = "https://github.com/appneta/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ 10SRC_URI = "https://github.com/appneta/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
11 file://0001-libopts.m4-set-POSIX_SHELL-to-bin-sh.patch \ 11 file://0001-libopts.m4-set-POSIX_SHELL-to-bin-sh.patch \
12 file://0001-Fix-linker-error-for-TX_RING.patch \
13 file://0002-fix-incompatible-type-assignment-in-txring.c.patch \
14" 12"
15 13
16SRC_URI[sha256sum] = "2de79bfd67ec92ca9ae2ffb50456dd1d53ff40f3fa71b422c65e8062013c9e85" 14SRC_URI[sha256sum] = "ccff3bb29469a04ccc20ed0b518e3e43c4a7b5a876339d9435bfd9db7fe5d0f1"
17 15
18UPSTREAM_CHECK_URI = "https://github.com/appneta/tcpreplay/releases" 16UPSTREAM_CHECK_URI = "https://github.com/appneta/tcpreplay/releases"
19 17