On 1/08/2021 4:45 am, John-Mark Gurney wrote:
pkt-gen by default compiles against headers that it ships with.  This is
likely to deal w/ Linux, but now that FreeBSD has rev'd the API a few
times, it fails to work on FreeBSD, instead, giving you this:
360.000574 [ 376] netmap_ioctl_legacy       Minimum supported API is 14 
(requested 11)

This drops the inclusion of the header files when building pkt-gen,
so that it uses the correct FreeBSD kernel headers.

I have done basic testing, and pkt-gen is working.

Note, that this does not update pkt-gen to the latest in github, and it is
almost 4 years out of date.

I can commit it (I think, I haven't used a ports bit in years) if
someone wants to approve it, or someone else can commit it for me.

I have included it both inline and attached, in case there are problems
w/ either.

patch:
diff --git a/net/pkt-gen/files/patch-pkt-gen_GNUmakefile 
b/net/pkt-gen/files/patch-pkt-gen_GNUmakefile
index 5237c3d4d3c7..e4a1d15abb4c 100644
--- a/net/pkt-gen/files/patch-pkt-gen_GNUmakefile
+++ b/net/pkt-gen/files/patch-pkt-gen_GNUmakefile
@@ -1,13 +1,14 @@
---- pkt-gen/GNUmakefile.orig   2018-08-15 02:22:27 UTC
+--- pkt-gen/GNUmakefile.orig   2017-08-06 18:26:36 UTC
  +++ pkt-gen/GNUmakefile
  @@ -10,9 +10,8 @@ VPATH = $(SRCDIR)/apps/pkt-gen
NO_MAN=
   CFLAGS = -O2 -pipe
  -CFLAGS += -Werror -Wall -Wunused-function
-+CFLAGS += -Wunused-function
- CFLAGS += -I $(SRCDIR)/sys -I $(SRCDIR)/apps/include
+-CFLAGS += -I $(SRCDIR)/sys -I $(SRCDIR)/apps/include
  -CFLAGS += -Wextra
++CFLAGS += -Wunused-function
++CFLAGS += -I $(SRCDIR)/apps/include
LDLIBS += -lpthread -lm
   ifeq ($(shell uname),Linux)


If you can add a comment to the patch header and add a PORTREVISION, and this has been compile tested against at least current,13,12{$tier1archs}:

Reviewed by: koobs (ports)
Approved by: koobs (ports)
MFH: 202Q3 (build fix, ports compliance)

Is this going upstream as an issue or pr?


Reply via email to