Date: Tue, 21 May 2024 03:27:35 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 7aba92287947 - stable/14 - sys/dev/irdma/irdma_cm: fix compile without INET Message-ID: <202405210327.44L3RZWW052600@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7aba922879474189e5694ffb92a51ab387ad3dd6 commit 7aba922879474189e5694ffb92a51ab387ad3dd6 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 03:10:46 +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) --- 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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405210327.44L3RZWW052600>