net/pkt-gen: Update to latest version and adding tlem
tlem is a link emulator (bandwidth and delay). Sponsored by: Netflix
This commit is contained in:
parent
6239d44fa9
commit
1abec7c6fe
@ -1,9 +1,9 @@
|
||||
PORTNAME= pkt-gen
|
||||
PORTVERSION= g2024.09.16
|
||||
PORTVERSION= g2025.10.08
|
||||
CATEGORIES= net
|
||||
|
||||
MAINTAINER= olivier@FreeBSD.org
|
||||
COMMENT= Packet sink/source using the netmap API
|
||||
COMMENT= Packet sink/source and bandwidth/delay emulator using the netmap API
|
||||
WWW= https://github.com/luigirizzo/netmap
|
||||
|
||||
LICENSE= BSD2CLAUSE
|
||||
@ -12,7 +12,7 @@ USES= gmake
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= luigirizzo
|
||||
GH_PROJECT= netmap
|
||||
GH_TAGNAME= eb905c6
|
||||
GH_TAGNAME= bc3a126
|
||||
|
||||
MAKEFILE= GNUmakefile
|
||||
|
||||
@ -23,22 +23,29 @@ PCAP_MAKE_ARGS= WITH_PCAP=1
|
||||
|
||||
PLIST_FILES= bin/pkt-gen \
|
||||
bin/nmreplay \
|
||||
bin/tlem \
|
||||
share/man/man8/nmreplay.8.gz \
|
||||
share/man/man8/pkt-gen.8.gz
|
||||
share/man/man8/pkt-gen.8.gz \
|
||||
share/man/man8/tlem.8.gz
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC}/libnetmap && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} ${MAKE_FLAGS} ${MAKEFILE}
|
||||
cd ${WRKSRC}/apps/pkt-gen && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} ${MAKE_FLAGS} ${MAKEFILE}
|
||||
cd ${WRKSRC}/apps/nmreplay && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} ${MAKE_FLAGS} ${MAKEFILE}
|
||||
cd ${WRKSRC}/apps/tlem && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} ${MAKE_FLAGS} ${MAKEFILE}
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/apps/pkt-gen/pkt-gen \
|
||||
${STAGEDIR}${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/apps/nmreplay/nmreplay \
|
||||
${STAGEDIR}${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/apps/tlem/tlem \
|
||||
${STAGEDIR}${PREFIX}/bin
|
||||
${INSTALL_MAN} ${WRKSRC}/apps/pkt-gen/pkt-gen.8 \
|
||||
${STAGEDIR}${PREFIX}/share/man/man8
|
||||
${INSTALL_MAN} ${WRKSRC}/apps/nmreplay/nmreplay.8 \
|
||||
${STAGEDIR}${PREFIX}/share/man/man8
|
||||
${INSTALL_MAN} ${WRKSRC}/apps/tlem/tlem.8 \
|
||||
${STAGEDIR}${PREFIX}/share/man/man8
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1729258698
|
||||
SHA256 (luigirizzo-netmap-g2024.09.16-eb905c6_GH0.tar.gz) = 50e681ff6156273b810cc6fd8c64bc240de4f75db642d34a3b4f70c1f09f42fa
|
||||
SIZE (luigirizzo-netmap-g2024.09.16-eb905c6_GH0.tar.gz) = 771578
|
||||
TIMESTAMP = 1759939977
|
||||
SHA256 (luigirizzo-netmap-g2025.10.08-bc3a126_GH0.tar.gz) = de3abd8353612777784fce661bd56eed9731f24d93216a4bac37a92d66b0dcbd
|
||||
SIZE (luigirizzo-netmap-g2025.10.08-bc3a126_GH0.tar.gz) = 775215
|
||||
|
||||
37
net/pkt-gen/files/patch-apps_tlem_tlem.c
Normal file
37
net/pkt-gen/files/patch-apps_tlem_tlem.c
Normal file
@ -0,0 +1,37 @@
|
||||
--- apps/tlem/tlem.c.orig 2025-07-29 09:00:18 UTC
|
||||
+++ apps/tlem/tlem.c
|
||||
@@ -194,6 +194,7 @@ static void latency_reduction_stop(void)
|
||||
#include <stddef.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/time.h>
|
||||
+#include <sys/mman.h> /* MAP_ */
|
||||
|
||||
// for route-mode
|
||||
#include <netinet/in.h>
|
||||
@@ -214,7 +215,6 @@ static void latency_reduction_stop(void)
|
||||
|
||||
#ifdef linux
|
||||
#define cpuset_t cpu_set_t
|
||||
-#include <sys/mman.h>
|
||||
#ifndef MAP_HUGETLB
|
||||
#define MAP_HUGETLB 0x40000
|
||||
#endif
|
||||
@@ -3227,7 +3227,8 @@ avg_bw_parse(struct _qs *q, struct _cfg *dst, int ac,
|
||||
static int
|
||||
avg_bw_parse(struct _qs *q, struct _cfg *dst, int ac, char *av[])
|
||||
{
|
||||
- double bw, token;
|
||||
+ double token;
|
||||
+ uint64_t bw;
|
||||
struct avgbw_arg *d;
|
||||
|
||||
if (strcmp(av[0], "avg") != 0)
|
||||
@@ -3239,7 +3240,7 @@ avg_bw_parse(struct _qs *q, struct _cfg *dst, int ac,
|
||||
return 1; /* error */
|
||||
if (update_max_bw(q, bw))
|
||||
return 1;
|
||||
- token = (bw / 8) * (1UL << WSHIFT) / 1e9;
|
||||
+ token = ((double)bw / 8) * (1UL << WSHIFT) / 1e9;
|
||||
dst->arg = ec_alloc(q, dst->ec, sizeof(*d));
|
||||
if (dst->arg == NULL)
|
||||
return 1;
|
||||
@ -1,3 +1,4 @@
|
||||
Packet sink/source using the netmap API useful for perforamce testing
|
||||
networks. This is the upstream version of the program by the same name
|
||||
that lives in /usr/src/tools/tools/netmap, maintained by Luigi Rizzo.
|
||||
Packet sink/source (pkt-gen) and link emulator (tlem) using the netmap API
|
||||
useful for performance testing networks. This is the upstream version of the
|
||||
program by the same name that lives in /usr/src/tools/tools/netmap, maintained
|
||||
by Luigi Rizzo.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user