git: 78ccc5af3d23 - releng/14.1 - sys/dev/irdma/irdma_cm: fix compile without INET
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 May 2024 20:09:15 UTC
The branch releng/14.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=78ccc5af3d23fe6c7d87c5f40cf6ab2b1d9d6fb2 commit 78ccc5af3d23fe6c7d87c5f40cf6ab2b1d9d6fb2 Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-04-12 16:47:16 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-21 20:08:35 +0000 sys/dev/irdma/irdma_cm: fix compile without INET irdma_get_vlan_ipv4() calls ip_ifp_find() even if INET isn't defined, in which case this function isn't available. Stub this out for the non-INET case to return an error (0xffff) instead. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1156 (cherry picked from commit 0478a0356272ab3907af9d97711f0bb8b14bf38b) (cherry picked from commit 7aba922879474189e5694ffb92a51ab387ad3dd6) Approved-by: re (cperciva) --- sys/dev/irdma/irdma_cm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c index 65cb5c643783..167e3c67390c 100644 --- a/sys/dev/irdma/irdma_cm.c +++ b/sys/dev/irdma/irdma_cm.c @@ -1664,9 +1664,11 @@ irdma_get_vlan_mac_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, u8 *mac u16 irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) { + u16 vlan_id = 0xFFFF; + +#ifdef INET if_t netdev; struct vnet *vnet = &init_net; - u16 vlan_id = 0xFFFF; #ifdef VIMAGE vnet = irdma_cmid_to_vnet(cm_id); @@ -1676,6 +1678,7 @@ irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) vlan_id = rdma_vlan_dev_vlan_id(netdev); dev_put(netdev); } +#endif return vlan_id; }