Bug 193824

Summary: ixl driver compilation fail if only add "device ixl" in GENERIC configure file
Product: Base System Reporter: fuzhli <fuzhli>
Component: kernAssignee: Bjoern A. Zeeb <bz>
Status: Closed FIXED    
Severity: Affects Only Me CC: bz
Priority: ---    
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
modify the sys/conf/files
none
Make ixl{,v}(4) amd64 specific and depend on pic rather than inet none

Description fuzhli 2014-09-22 02:52:17 UTC
Created attachment 147548 [details]
modify the sys/conf/files

Hi,

I use the FreeBSD current source code, and add below line in sys/amd64/conf/GENERIC:
device ixl
Then run “make buildkernel” and there will be linking error. And I find that only the sys/dev/ixl/if_ixl.c is compiled into object file, other c files in sys/dev/ixl/ directory are not compiled.

After do some research, I finally find that the sys/conf/files seems have something wrong. I can build kernel successfully after apply the attached patch file.
Comment 1 Bjoern A. Zeeb freebsd_committer 2014-09-22 11:54:09 UTC
That solution is not quite right either.  I have a pending patch to move it to amd64 only and fix things.  I'll paste it in here later today.
Comment 2 Bjoern A. Zeeb freebsd_committer 2014-09-22 14:56:37 UTC
Created attachment 147561 [details]
Make ixl{,v}(4) amd64 specific and depend on pic rather than inet

This is the proposed updated patch which will probably be committed the next 24 hours.  If you can please test and report back.
Comment 3 commit-hook freebsd_committer 2014-09-23 08:33:08 UTC
A commit references this bug:

Author: bz
Date: Tue Sep 23 08:33:05 UTC 2014
New revision: 272022
URL: http://svnweb.freebsd.org/changeset/base/272022

Log:
  As per [1] Intel only supports this driver on 64bit platforms.
  For now restrict it to amd64.  Other architectures might be
  re-added later once tested.

  Remove the drivers from the global NOTES and files files and move
  them to the amd64 specifics.
  Remove the drivers from the i386 modules build and only leave the
  amd64 version.

  Rather than depending on "inet" depend on "pci" and make sure that
  ixl(4) and ixlv(4) can be compiled independently [2].  This also
  allows the drivers to build properly on IPv4-only or IPv6-only
  kernels.

  PR:		193824 [2]
  Reviewed by:	eric.joyner intel.com
  MFC after:	3 days

  References:
  [1] http://lists.freebsd.org/pipermail/svn-src-all/2014-August/090470.html

Changes:
  head/sys/amd64/conf/GENERIC
  head/sys/amd64/conf/NOTES
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/conf/files.amd64
  head/sys/modules/Makefile
Comment 4 commit-hook freebsd_committer 2014-09-30 16:56:04 UTC
A commit references this bug:

Author: bz
Date: Tue Sep 30 16:55:23 UTC 2014
New revision: 272313
URL: https://svnweb.freebsd.org/changeset/base/272313

Log:
  MFC 271745,271834,271899,271900,271913,272022,272023:

    Revert changes to shared code of the ixl and ixlv drivers to allow
    for easier long-term maintainability.

    Restrict the drivers to building on amd64 for now as it is
    only tested on that 64bit architecture.

    Just depend on PCI and neither INET nor INET6; also make sure we
    can build individual drivers and they do not depend on each other
    anymore.

    Reviewed by:	gnn, eric.joyner intel.com
  PR:		193824
  Approved by:	re (gjb)

Changes:
_U  stable/10/
  stable/10/sys/amd64/conf/GENERIC
  stable/10/sys/amd64/conf/NOTES
  stable/10/sys/conf/NOTES
  stable/10/sys/conf/files.amd64
  stable/10/sys/dev/ixl/i40e_alloc.h
  stable/10/sys/dev/ixl/i40e_common.c
  stable/10/sys/dev/ixl/i40e_osdep.c
  stable/10/sys/dev/ixl/i40e_osdep.h
  stable/10/sys/dev/ixl/if_ixl.c
  stable/10/sys/dev/ixl/if_ixlv.c
  stable/10/sys/dev/ixl/ixl_txrx.c
Comment 5 Bjoern A. Zeeb freebsd_committer 2014-09-30 16:57:33 UTC
Thanks a lot for reporting.  Upcoming 10.1-R and HEAD should both be fine now.