Page MenuHomeFreeBSD

ofed/infiniband: fix ifdefs for new INET changes, fixing LINT-NOIP
ClosedPublic

Authored by karels on Jul 16 2022, 9:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 10:58 PM
Unknown Object (File)
Dec 12 2023, 2:17 AM
Unknown Object (File)
Nov 6 2023, 9:24 PM
Unknown Object (File)
Nov 4 2023, 6:38 AM
Unknown Object (File)
Oct 30 2023, 8:31 PM
Unknown Object (File)
Oct 18 2023, 10:39 PM
Unknown Object (File)
Oct 5 2023, 8:22 PM
Unknown Object (File)
Sep 28 2023, 8:48 PM

Details

Summary

Some of the ofed/infiniband code has INET and INET6 address handling
code without using ifdefs. This failed with a recent change to INET,
in which IN_LOOPBACK() started using a VNET variable, and which is not
present if INET is not configured. Add #ifdef INET, and INET6 for good
measure, in cma_loopback_addr(), along with inclusion of the options
headers in ib_cma.c.

Test Plan

verified that correct symbols are referenced with and without
INET.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rgrimes added a subscriber: rgrimes.

Adding some more eyes to this, IIRC this is ofed code and actually maintained and imported from some place else. Though I agree with Glebius that this is the right way to fix it, it may need or be desired to do this upstream. Hselesky is the infiniband expert.

This revision is now accepted and ready to land.Jul 17 2022, 5:15 PM
bz added a subscriber: bz.
bz added inline comments.
sys/ofed/drivers/infiniband/core/ib_cma.c
1058

Do we need this comment?

sys/ofed/drivers/infiniband/core/ib_cma.c
1058

I thought it was worth an explanation of why this particular code has ifdefs.