git: 97583aa25675 - main - linuxkpi: Migrate to IfAPI
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Apr 2023 14:12:09 UTC
The branch main has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=97583aa2567589cb83540d2d9de1980b76db9a99
commit 97583aa2567589cb83540d2d9de1980b76db9a99
Author: Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2023-04-03 14:48:28 +0000
Commit: Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2023-04-24 13:54:22 +0000
linuxkpi: Migrate to IfAPI
Summary:
Trivial changes for LinuxKPI to use IfAPI. The 'bsdifp' looks unused,
so removed it instead of converting it to a pointer.
Bump __FreeBSD_version for change to struct net_device.
Reviewed by: bz, hselasky
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D39491
---
sys/compat/linuxkpi/common/include/linux/if_vlan.h | 2 +-
sys/compat/linuxkpi/common/include/linux/netdevice.h | 3 ---
sys/sys/param.h | 2 +-
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/if_vlan.h b/sys/compat/linuxkpi/common/include/linux/if_vlan.h
index 7c5531f6ec11..2cbb9b7e0b54 100644
--- a/sys/compat/linuxkpi/common/include/linux/if_vlan.h
+++ b/sys/compat/linuxkpi/common/include/linux/if_vlan.h
@@ -44,7 +44,7 @@
static inline int
is_vlan_dev(struct ifnet *ifp)
{
- return (ifp->if_type == IFT_L2VLAN);
+ return (if_gettype(ifp) == IFT_L2VLAN);
}
static inline uint16_t
diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h
index 8653b5df68bd..1093f3cff080 100644
--- a/sys/compat/linuxkpi/common/include/linux/netdevice.h
+++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h
@@ -106,9 +106,6 @@ struct net_device_ops {
};
struct net_device {
- /* BSD specific for compat. */
- struct ifnet bsdifp;
-
/* net_device fields seen publicly. */
/* XXX can we later make some aliases to ifnet? */
char name[IFNAMSIZ];
diff --git a/sys/sys/param.h b/sys/sys/param.h
index b6bbe545a5b1..25fac3efde1d 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -76,7 +76,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1400087
+#define __FreeBSD_version 1400088
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,