Fix LINT-NOINET kernels
- Generate opt_inet.h appropriately according to MK_INET_SUPPORT
- Only add in_gif.c to SRCS if MK_INET_SUPPORT != no
MFC after: 1 week
Sponsored by: EMCC / Isilon Storage Division
Differential D4864
Fix LINT-NOINET kernels ngie on Jan 12 2016, 3:36 AM. Authored by Tags None Referenced Files
Details
Fix LINT-NOINET kernels
MFC after: 1 week I built the kernel module like so and ran.. ifconfig gif0 create ifconfig gif0 destroy .. without error: INET | INET6 no | no yes | no no | yes yes | yes make tinderbox passed (finally) on universe10a.freebsd.org: -------------------------------------------------------------- >>> make universe completed on Tue Jan 12 05:46:57 UTC 2016 (started Tue Jan 12 00:48:41 UTC 2016) --------------------------------------------------------------
Diff Detail
Event Timeline
Comment Actions This is how it works in my understanding. You have builded LINT-NOINET kernel. opt_inet.h in KERNBUILDDIR will contain TCP_SIGNATURE option and when modules will be build, this expression will give wrong result. I.e. it will try build kernel module with INET. Comment Actions In this case though, opt_inet.h (if it doesn't already exist in /usr/obj/sys/modules/if_gif/) will only contain #define INET 1, or will be empty. Comment Actions Just tried: # pwd /usr/obj/home/devel/freebsd/base/stable/10/sys/LINT-NOINET/modules/home/devel/freebsd/base/stable/10/sys/modules/if_gif # ll total 30 -rw-r--r-- 1 root wheel 6236 12 янв 09:48 .depend lrwxr-xr-x 1 root wheel 38 12 янв 09:48 @ -> /home/devel/freebsd/base/stable/10/sys -rw-r--r-- 1 root wheel 19720 12 янв 09:50 if_gif.o lrwxr-xr-x 1 root wheel 52 12 янв 09:48 machine -> /home/devel/freebsd/base/stable/10/sys/amd64/include lrwxr-xr-x 1 root wheel 69 12 янв 09:48 opt_inet.h -> /usr/obj/home/devel/freebsd/base/stable/10/sys/LINT-NOINET/opt_inet.h lrwxr-xr-x 1 root wheel 70 12 янв 09:48 opt_inet6.h -> /usr/obj/home/devel/freebsd/base/stable/10/sys/LINT-NOINET/opt_inet6.h lrwxr-xr-x 1 root wheel 73 12 янв 09:48 opt_mrouting.h -> /usr/obj/home/devel/freebsd/base/stable/10/sys/LINT-NOINET/opt_mrouting.h lrwxr-xr-x 1 root wheel 50 12 янв 09:48 x86 -> /home/devel/freebsd/base/stable/10/sys/x86/include # cat opt_inet.h #define TCP_OFFLOAD 1 #define TCP_SIGNATURE 1 Comment Actions I'm not surprised it works, but this is orthogonal to what is trying to be accomplished here. I'm merely trying to unbreak if_gif(4) with MK_INET == no. No more, no less. opt_inet.h is defined in 52 Makefiles, but only 5 add TCP_OFFLOAD, and none of them add TCP_SIGNATURE: $ grep -A 3 -lr opt_inet.h: sys/modules/ sys/modules/patm/Makefile sys/modules/sfxge/Makefile sys/modules/igb/Makefile sys/modules/fatm/Makefile sys/modules/ip_mroute_mod/Makefile sys/modules/arcnet/Makefile sys/modules/sppp/Makefile sys/modules/ixlv/Makefile sys/modules/pflog/Makefile sys/modules/if_gif/Makefile sys/modules/ipdivert/Makefile sys/modules/mlx4ib/Makefile sys/modules/ipoib/Makefile sys/modules/firewire/fwip/Makefile sys/modules/virtio/network/Makefile sys/modules/carp/Makefile sys/modules/if_tap/Makefile sys/modules/pf/Makefile sys/modules/netgraph/ipfw/Makefile sys/modules/netgraph/gif/Makefile sys/modules/netgraph/iface/Makefile sys/modules/if_bridge/Makefile sys/modules/hatm/Makefile sys/modules/an/Makefile sys/modules/wlan/Makefile sys/modules/if_faith/Makefile sys/modules/vmware/vmxnet3/Makefile sys/modules/smbfs/Makefile sys/modules/if_stf/Makefile sys/modules/mlxen/Makefile sys/modules/cxgb/tom/Makefile sys/modules/cxgb/iw_cxgb/Makefile sys/modules/cxgb/cxgb/Makefile sys/modules/if_lagg/Makefile sys/modules/ixl/Makefile sys/modules/ipfw/Makefile sys/modules/if_tun/Makefile sys/modules/em/Makefile sys/modules/en/Makefile sys/modules/snc/Makefile sys/modules/lmc/Makefile sys/modules/nfsclient/Makefile sys/modules/if_gre/Makefile sys/modules/mthca/Makefile sys/modules/if_disc/Makefile sys/modules/pfsync/Makefile sys/modules/nfscl/Makefile sys/modules/if_ef/Makefile sys/modules/cxgbe/if_cxgbe/Makefile sys/modules/cxgbe/iw_cxgbe/Makefile sys/modules/cxgbe/tom/Makefile sys/modules/mlx4/Makefile $ for i in `grep -A 3 -lr opt_inet.h: sys/modules/`; do grep -l TCP_OFFLOAD $i; done sys/modules/cxgb/tom/Makefile sys/modules/cxgb/iw_cxgb/Makefile sys/modules/cxgb/cxgb/Makefile sys/modules/cxgbe/if_cxgbe/Makefile sys/modules/cxgbe/iw_cxgbe/Makefile sys/modules/cxgbe/tom/Makefile $ for i in `grep -A 3 -lr opt_inet.h: sys/modules/`; do grep -l TCP_SIGNATURE $i; done Comment Actions I'm for improvement, but I'd (again) rather stick with how it has historically evolved in head and use cat in this commit to be consistent with the other code and how things evolved historically instead of inventing another mechanism, which will confuse someone potentially that follows history of the code and might apply patches in series assuming that it "just works". Comment Actions So what's wrong with just MFCing the changes I made to make current work without all this crazy? Comment Actions I feel you don't understand what I'm trying to say. These options (TCP_SIGNATURE and TCP_OFFLOAD) by themselves don't needed to build if_gif(4) module. They are orthogonal to it. Comment Actions I didn't have the time to do this right at the moment, but I will setup another branch and pull in your changes and bz's changes to get things working. Part of the pain stems from src.opts.mk and other build related changes that have a large degree of potential impact, which I haven't assessed yet. |