Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Apr 2018 20:45:10 +0000
From:      "Somayajulu, David" <David.Somayajulu@cavium.com>
To:        Hans Petter Selasky <hps@selasky.org>, Julian Elischer <julian@freebsd.org>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Cc:        "davidcs@freebsd.org" <davidcs@freebsd.org>
Subject:   RE: kldload ibcore.ko fails in snapshot: FreeBSD-12.0-CURRENT-amd64-20180329-r331740-disc1
Message-ID:  <CY4PR07MB31255FAECFC694916958C912EE8E0@CY4PR07MB3125.namprd07.prod.outlook.com>
In-Reply-To: <c3a67535-3f5c-c16e-fe76-6ba8dcdb31ec@selasky.org>
References:  <BN6PR07MB3122A34BF6462952F5C53CEFEE890@BN6PR07MB3122.namprd07.prod.outlook.com> <53cea7bc-c3e5-26c3-30d8-42438e67f19f@selasky.org> <32be98b1-4abe-3de4-ec62-c3282bc3cad2@freebsd.org> <c3a67535-3f5c-c16e-fe76-6ba8dcdb31ec@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Thanks Hans and Julian.
I did the following and still see the problem

#cd /usr/src
#make buildworld WITH_OFED=yes
#make installworld WITH_OFED=yes
#reboot
#cd /usr/src
#make buildkernel WITH_OFED=yes KERNCONF=MYKERNEL                      ; MYKERNEL content is shown below in case it is a cause
#make installkernel WITH_OFED=yes  KERNCONF=MYKERNEL
#reboot
#cd /usr/src/sys/modules/linuxkpi
#make clean && make WITH_OFED=yes
#cd /usr/src/sys/modules/ibcore
#make clean && make WITH_OFED=yes
#kldload -v /usr/obj/usr/src/amd64.amd64/sys/modules/linuxkpi/linuxkpi.ko
#kldload -v /usr/obj/usr/src/amd64.amd64/sys/modules/ibcore/ibcore.ko

linuxkpi.ko loads fine. 
However I see the same error when I load ibcore.ko
================
	link_elf_obj: symbol if_index undefined
	linker_load_file: /usr/obj/usr/src/amd64.amd64/sys/modules/ibcore/ibcore.ko - unsupported file type
================

I don't see any such problems with FreeBSD11.1 or 11.0 Kernels.

Would appreciate any help.

Cheers
David S. (davidcs@freebsd.org)

==== MYKERNEL FILE CONTENT BEGIN =========
include         GENERIC
ident           MYKERNEL

makeoptions     MODULES_OVERRIDE="bxe cxgb cxgbe et ipmi mxge netgraph nullfs nxge oce qlxgb vxge mlx4 ixl"
nodevice        bxe
nodevice        cxgb
nodevice        cxgbe
#nodevice        em
nodevice        et
#nodevice        igb
nodevice        ixgbe
nodevice        mxge
nodevice        nxge
nodevice        oce
nodevice        qlxgb
nodevice        qlxgbe
nodevice        isp
nodevice        mlx
nodevice        mlx5
#nodevice        mlxen
#nodevice       ixl
#options                RATELIMIT
# Debugging support.  Always need this:
nooptions       KDB                     # Enable kernel debugger support.
# nooptions     KDB_TRACE               # Print a stack trace for a panic.
# For full debugger support use (turn off in stable branch):
nooptions       DDB                     # Support DDB.
nooptions       GDB                     # Support remote GDB.
nooptions       DEADLKRES               # Enable the deadlock resolver
nooptions       INVARIANTS              # Enable calls of extra sanity checking
nooptions       INVARIANT_SUPPORT       # Extra sanity checks of internal structures, required by INVARIANTS
nooptions       WITNESS                 # Enable checks to detect deadlocks and cycles
nooptions       WITNESS_SKIPSPIN        # Don't run witness on spinlocks for speed
#makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug symbols
makeoptions     DEBUG+=-fno-inline      # Helps DTrace and HWPMC produce
                                         # better stack traces
#makeoptions     WITH_CTF=1              # Run ctfconvert(1) for DTrace support


# For pmcstat
device hwpmc
#options HWPMC_HOOKS


========== MYKERNEL FILE CONTENT END============

-----Original Message-----
From: Hans Petter Selasky [mailto:hps@selasky.org] 
Sent: Wednesday, April 25, 2018 7:51 AM
To: Julian Elischer <julian@freebsd.org>; Somayajulu, David <David.Somayajulu@cavium.com>; freebsd-net@freebsd.org
Subject: Re: kldload ibcore.ko fails in snapshot: FreeBSD-12.0-CURRENT-amd64-20180329-r331740-disc1

On 04/25/18 16:12, Julian Elischer wrote:
> On 24/4/18 3:15 pm, Hans Petter Selasky wrote:
>> On 04/24/18 01:33, Somayajulu, David wrote:
>>> Hi All,
>>> kldload ibcore.ko
>>> fails in the above snapshot with the following error.
>>>
>>> # kldload -v 
>>> /usr/obj/usr/src/amd64.amd64/sys/modules/ibcore/ibcore.ko
>>> kldload: an error occurred while loading module 
>>> /usr/obj/usr/src/amd64.amd64/sys/modules/ibcore/ibcore.ko. Please 
>>> check dmesg(8) for more details.
>>>
>>> /var/log/messages indicates the following.
>>>
>>> Apr 23 16:28:07 bsd25_12 kernel: link_elf_obj: symbol if_index 
>>> undefined Apr 23 16:28:07 bsd25_12 kernel: linker_load_file:
>>> /usr/obj/usr/src/amd64.amd64/sys/modules/ibcore/ibcore.ko - 
>>> unsupported file type
>>>
>>> What am I missing?
>>>
>>
>> Hi,
>>
>> It looks like ibcore.ko was built w/o DEBUG_FLAGS="-DVIMAGE=1"
> 
> that shouldn't be in debug flags..   Not sure WHERE it should be, but 
> I think that isn't it.
> (may work though)
> 

If you build outside the "buildkernel WITH_OFED=YES" target these flags must be specified manually in my experience.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CY4PR07MB31255FAECFC694916958C912EE8E0>