git: 24ad47b239c0 - main - net/intel-ixv-kmod: add port for Intel 10G VF driver

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Mon, 12 Jun 2023 15:14:32 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=24ad47b239c07f6e2f449bbcf25bcb59ddacc401

commit 24ad47b239c07f6e2f449bbcf25bcb59ddacc401
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-06-12 14:55:14 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-06-12 15:14:21 +0000

    net/intel-ixv-kmod: add port for Intel 10G VF driver
---
 net/Makefile                             |  1 +
 net/intel-ixv-kmod/Makefile              | 25 +++++++++++++++++++++++++
 net/intel-ixv-kmod/distinfo              |  5 +++++
 net/intel-ixv-kmod/files/patch-if__ixv.c | 15 +++++++++++++++
 net/intel-ixv-kmod/pkg-descr             |  5 +++++
 5 files changed, 51 insertions(+)

diff --git a/net/Makefile b/net/Makefile
index 0f36eb1fb1b1..b055b2dca592 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -279,6 +279,7 @@
     SUBDIR += intel-igb-kmod
     SUBDIR += intel-ix-kmod
     SUBDIR += intel-ixl-kmod
+    SUBDIR += intel-ixv-kmod
     SUBDIR += iodine
     SUBDIR += ip2location
     SUBDIR += ip2proxy
diff --git a/net/intel-ixv-kmod/Makefile b/net/intel-ixv-kmod/Makefile
new file mode 100644
index 000000000000..8fc4aa444fdd
--- /dev/null
+++ b/net/intel-ixv-kmod/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	ixv
+PORTVERSION=	1.5.33
+PORTEPOCH=	0
+MASTER_SITES?=	https://downloadmirror.intel.com/762491/ \
+		https://downloadmirror.intel.com/29626/eng/:man \
+
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
+		${_MAN_SOURCE}${EXTRACT_SUFX}:man
+_MAN_SOURCE=	${PORTNAME}-1.5.17
+
+MAINTAINER=	freebsd@intel.com
+COMMENT=	10G FreeBSD Base Driver Virtual Function for Intel(R) NIC
+
+MANPAGENAME=	ixgbe
+MANPAGELINKS=	ixv if_ixv if_ixgbevf
+
+MASTERDIR=	${.CURDIR}/../intel-ixl-kmod
+PATCHDIR=	${.CURDIR}/files
+PKGDIR=		${.CURDIR}
+DISTINFO_FILE=	${.CURDIR}/distinfo
+
+pre-install:
+	${CP} ${WRKDIR}/${_MAN_SOURCE}/src/${MANPAGENAME}.4 ${WRKSRC}
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/intel-ixv-kmod/distinfo b/net/intel-ixv-kmod/distinfo
new file mode 100644
index 000000000000..42b4fa01a2d5
--- /dev/null
+++ b/net/intel-ixv-kmod/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1686579057
+SHA256 (ixv-1.5.33.tar.gz) = 1ee4a87966ff77936b773a05fd0cfadbf747b4668220c2c7035db8fca4a82103
+SIZE (ixv-1.5.33.tar.gz) = 114683
+SHA256 (ixv-1.5.17.tar.gz) = f0557e35d2d217f78f4b96d085ce7d049ba753e047aace8e9419e49f9176eed2
+SIZE (ixv-1.5.17.tar.gz) = 110073
diff --git a/net/intel-ixv-kmod/files/patch-if__ixv.c b/net/intel-ixv-kmod/files/patch-if__ixv.c
new file mode 100644
index 000000000000..186f108e0409
--- /dev/null
+++ b/net/intel-ixv-kmod/files/patch-if__ixv.c
@@ -0,0 +1,15 @@
+--- if_ixv.c.orig	2023-06-12 14:23:30 UTC
++++ if_ixv.c
+@@ -146,8 +146,12 @@ static driver_t ixv_driver = {
+ 	"ixv", ixv_methods, sizeof(struct ixgbe_softc),
+ };
+ 
++#if __FreeBSD_version >= 1400058
++DRIVER_MODULE(ixv, pci, ixv_driver, 0, 0);
++#else
+ devclass_t ixv_devclass;
+ DRIVER_MODULE(ixv, pci, ixv_driver, ixv_devclass, 0, 0);
++#endif
+ MODULE_DEPEND(ixv, pci, 1, 1, 1);
+ MODULE_DEPEND(ixv, ether, 1, 1, 1);
+ #ifdef DEV_NETMAP
diff --git a/net/intel-ixv-kmod/pkg-descr b/net/intel-ixv-kmod/pkg-descr
new file mode 100644
index 000000000000..3e3bbca6e3e1
--- /dev/null
+++ b/net/intel-ixv-kmod/pkg-descr
@@ -0,0 +1,5 @@
+This release includes the 10 gigabit FreeBSD Base Driver for Intel(R) Network
+Connection.
+
+- ixgbe driver supports all 82599 and 82598EB-based 10 gigabit
+  network connections.