Bug 243058

Summary: net/dpdk: fix build with 13-CURRENT
Product: Ports & Packages Reporter: Bruce Richardson <bruce.richardson>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Only Me CC: pi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch fixes for compile on 13-CURRENT none

Description Bruce Richardson 2020-01-03 14:15:06 UTC
Created attachment 210418 [details]
Patch fixes for compile on 13-CURRENT

The automated package builds for net/dpdk are failing on 13-CURRENT because of changes to the FreeBSD code in the 13 tree. This update provides minor tweaks to the code to fix compatibility with BSD 13.

Two issues were observed:
* rename of CPU_NAND to CPU_ANDNOT
* change in vm_page_replace parameters and behaviour

Both issues only required small changes to a single file, and both fixes are in the diff attached.

This patches have also been submitted upstream for inclusion in future DPDK releases: http://patches.dpdk.org/project/dpdk/list/?series=7977
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2020-01-12 16:50:51 UTC
https://people.freebsd.org/~pi/logs/dpdk-on-current-build-error.txt
shows a build error with this patch. Any ideas, why that is the case ?
Comment 2 Bruce Richardson 2020-01-13 13:02:17 UTC
(In reply to Kurt Jaeger from comment #1)

Is that with the latest kernel sources? Checking https://github.com/freebsd/freebsd/blob/master/sys/vm/vm_page.h#L650 or https://svnweb.freebsd.org/base/head/sys/vm/vm_page.h?view=annotate#l650 shows vm_page_replace with 4 rather than 3 parameters, as is adjusted by the patch.
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2020-01-13 13:06:06 UTC
It's with r354278, so before the change to vm_page_replace().

It will take a bit until I find time to update my testbox to a more recent -CUR.
Comment 4 Bruce Richardson 2020-02-12 14:02:23 UTC
Ping, any update on testing this?
Thanks.
Comment 5 Bruce Richardson 2020-05-18 10:58:00 UTC
Further ping on this patch, thanks.
Comment 6 Kurt Jaeger freebsd_committer freebsd_triage 2020-05-18 11:02:45 UTC
I've updated my testbox, testbuild@work
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2020-05-18 11:38:09 UTC
Committed with small pkg-plist fixes.

Please note: It fails in stage-qa if TOOLS is not selected, with the following error:

====> Running Q/A tests (stage-qa)
Error: '/usr/local/bin/python' is an invalid shebang you need USES=shebangfix for 'bin/dpdk-pmdinfo.py'
Error: '/usr/local/bin/python' is an invalid shebang you need USES=shebangfix for 'bin/dpdk-devbind.py'
Error: '/usr/local/bin/python' is an invalid shebang you need USES=shebangfix for 'share/dpdk/examples/ipsec-secgw/test/tun_null_header_reconstruct.py'
Error: '/usr/local/bin/python' is an invalid shebang you need USES=shebangfix for 'share/dpdk/examples/ipsec-secgw/test/pkttest.py'
Error: '/usr/local/bin/python' is an invalid shebang you need USES=shebangfix for 'share/dpdk/examples/ipsec-secgw/test/trs_ipv6opts.py'
*** Error code 1

Please consider to fix this in some later update. If possible, try to test with some of the options in non-default values. There might be other regressions.
Comment 8 commit-hook freebsd_committer freebsd_triage 2020-05-18 11:38:16 UTC
A commit references this bug:

Author: pi
Date: Mon May 18 11:38:10 UTC 2020
New revision: 535736
URL: https://svnweb.freebsd.org/changeset/ports/535736

Log:
  net/dpdk: ix build with 13-CURRENT

  The automated package builds for net/dpdk are failing on 13-CURRENT
  because of changes to the FreeBSD code in the 13 tree. This update
  provides minor tweaks to the code to fix compatibility with BSD 13.

  Two issues were observed:
  * rename of CPU_NAND to CPU_ANDNOT
  * change in vm_page_replace parameters and behaviour

  Both issues only required small changes to a single file, and both
  fixes are in the diff attached.

  PR:		243058
  Submitted by:	Bruce Richardson <bruce.richardson@intel.com> (maintainer)

Changes:
  head/net/dpdk/Makefile
  head/net/dpdk/files/
  head/net/dpdk/files/patch-kernel_freebsd_contigmem_contigmem.c
  head/net/dpdk/files/patch-lib_librte__eal_freebsd_eal_include_rte__os.h
  head/net/dpdk/pkg-plist
Comment 9 Bruce Richardson 2020-05-18 13:49:47 UTC
(In reply to Kurt Jaeger from comment #7)

Interesting, I don't see these issues on my system running stage-qa. 

However, I suspect the cause is the fact that python is set only TOOLS_USES rather than just USES. I'll change that in another patch shortly, along with an update to the latest patch-update to the 19.11 DPDK release.