Netdev List
 help / color / mirror / Atom feed
* Re: [patch] ipv4: initialize arp_tbl rw lock
From: Sam Ravnborg @ 2006-04-08 12:14 UTC (permalink / raw)
  To: David S. Miller
  Cc: heiko.carstens, shemminger, jgarzik, akpm, netdev, linux-kernel,
	fpavlic, davem
In-Reply-To: <20060408.031404.111884281.davem@davemloft.net>

On Sat, Apr 08, 2006 at 03:14:04AM -0700, David S. Miller wrote:
 
> Perhaps fs_initcall() would work better.  Or if that causes
> problems we could create a net_initcall() that sits between
> fs_initcall() and device_initcall().

fs_initcall() seems to be used mainly for "init after subsystem" stuff.
Within fs/ only pipe.c uses fs_initcall().

If we are going to overload the usage of fs_initcall() even more then
we should maybe try to rename it?


	Sam

^ permalink raw reply

* Re: [PATCH 17/21] orinoco_pci: use pci_iomap() for resources
From: Jeff Garzik @ 2006-04-08 15:00 UTC (permalink / raw)
  To: Pavel Roskin
  Cc: Francois Romieu, netdev-u79uwXL29TY76Z2rM5mHXA,
	orinoco-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <20060407200731.mqskowo8808gccs8-2RFepEojUI3Rd1RZctBqVdHuzzzSOjJt@public.gmane.org>

Pavel Roskin wrote:
> Quoting Francois Romieu <romieu-W8zweXLXuWQS+FvcfC7Uqw@public.gmane.org>:
>>>> Is there a reason why dev->mem_{start/end} should not be removed ?
>>> Is there a reason why it should? Is it going to be obsolete?
>> It is slowly obsoleting for a few years (don't laugh...). It is preferred
>> to store the relevant address in the private part of the (pci) device.
>>
>> Moderately recent drivers do not use it at all. However it's fairly common
>> in the setup code of the (legacy) isa devices.
> 
> I agree that many drivers don't use it.  But it would be nice to have a document
> describing what is going on.  On one hand we are adding new information elements
> (such as the bus in "ethtool -i"), on the other hand we are removing addresses
> from the ifconfig output.  Who is deciding which information is useful and 
> which is not?

Most of the ifconfig-exported stuff is obsolete, simply because most of 
it is quite inappropriate for hardware more modern than ISA. 
dev->mem_start has been a hacky way to pass options for over 10 years 
now, since only few, rare drivers use it to specify the ISA memory 
region for probing.


> How about netdev->irq?  Is it going to be obsolete too?  Then I can easily
> remove orinoco_pci_setup_netdev() with very minimal adjustments.

netdev->irq is obsolete as well.  Some newer drivers don't even bother 
to set it.  With PCI, it became write-only, because modern drivers 
autoprobe their irq, ignoring whatever the user requests.  With PCI 
MSI[-X] and even more modern hardware, dev->irq is just a cookie, not 
something to program PCI_INTERRUPT_LINE with.  So setting netdev->irq is 
even less useful.

Programs which need to discover hardware information when given a 
network interface name should do ETHTOOL_GDRVINFO, get the bus info, and 
then obtain the information needed in a bus-specific way.

	Jeff




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: David S. Miller @ 2006-04-08 22:54 UTC (permalink / raw)
  To: gnychis; +Cc: linux-kernel, netdev
In-Reply-To: <32947.128.2.140.234.1144536454.squirrel@128.2.140.234>

From: "George P Nychis" <gnychis@cmu.edu>
Date: Sat, 8 Apr 2006 18:47:34 -0400 (EDT)

> Hey,
> 
> I have a kernel module that uses unregister_qdisc and register_qdisc, whenever i try to insert the module I get:
> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol unregister_qdisc
> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol register_qdisc
> 
> Am i missing some sort of support in the kernel?

Make sure CONFIG_NET_SCHED is enabled and that you compiled your module against
that kernel.

Where does this sch_xcp come from?  It's not in the vanilla sources.

Also, please direct networking questions to the netdev@vger.kernel.org
mailing list which I have added to the CC:.

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: George P Nychis @ 2006-04-08 23:18 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel, netdev
In-Reply-To: <20060408.155430.111013393.davem@davemloft.net>

Yeah, this module is unfortunately not under the GPL, it was made for research and i am not the author, I was only given the code for my own research.

I enabled that support in the kernel, and then tried to recompile and get tons of errors/warnings... so maybe I am missing something else to be enabled in the kernel... here are a few examples of errors:
/usr/include/linux/skbuff.h:30:26: net/checksum.h: No such file or directory
/usr/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
/usr/include/linux/irq.h:72: error: `NR_IRQS' undeclared here (not in a function)
/usr/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)

I think those are the top most errors, so if i can fix those hopefully the rest shall vanish!

- George


> From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8 Apr 2006 18:47:34
> -0400 (EDT)
> 
>> Hey,
>> 
>> I have a kernel module that uses unregister_qdisc and register_qdisc,
>> whenever i try to insert the module I get: 
>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol
>> unregister_qdisc /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol
>> register_qdisc
>> 
>> Am i missing some sort of support in the kernel?
> 
> Make sure CONFIG_NET_SCHED is enabled and that you compiled your module
> against that kernel.
> 
> Where does this sch_xcp come from?  It's not in the vanilla sources.
> 
> Also, please direct networking questions to the netdev@vger.kernel.org 
> mailing list which I have added to the CC:.
> 
> 


-- 

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: Randy.Dunlap @ 2006-04-08 23:37 UTC (permalink / raw)
  To: George P Nychis; +Cc: davem, linux-kernel, netdev
In-Reply-To: <33083.128.2.140.234.1144538327.squirrel@128.2.140.234>

On Sat, 8 Apr 2006 19:18:47 -0400 (EDT) George P Nychis wrote:

> Yeah, this module is unfortunately not under the GPL, it was made for research and i am not the author, I was only given the code for my own research.
> 
> I enabled that support in the kernel, and then tried to recompile and get tons of errors/warnings... so maybe I am missing something else to be enabled in the kernel... here are a few examples of errors:
> /usr/include/linux/skbuff.h:30:26: net/checksum.h: No such file or directory
> /usr/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
> /usr/include/linux/irq.h:72: error: `NR_IRQS' undeclared here (not in a function)
> /usr/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
> 
> I think those are the top most errors, so if i can fix those hopefully the rest shall vanish!

Looks like a Makefile problem then.  Can you post the Makefile?
Hopefully it is using a Makefile and not just an elaborate gcc command line.

[and please don't top-post]

> - George
> 
> 
> > From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8 Apr 2006 18:47:34
> > -0400 (EDT)
> > 
> >> Hey,
> >> 
> >> I have a kernel module that uses unregister_qdisc and register_qdisc,
> >> whenever i try to insert the module I get: 
> >> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
> >> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol
> >> unregister_qdisc /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
> >> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol
> >> register_qdisc
> >> 
> >> Am i missing some sort of support in the kernel?
> > 
> > Make sure CONFIG_NET_SCHED is enabled and that you compiled your module
> > against that kernel.
> > 
> > Where does this sch_xcp come from?  It's not in the vanilla sources.
> > 
> > Also, please direct networking questions to the netdev@vger.kernel.org 
> > mailing list which I have added to the CC:.

---
~Randy

^ permalink raw reply

* Re: Linux v2.6.16-rc6
From: Andy Furniss @ 2006-04-09 12:08 UTC (permalink / raw)
  To: David S. Miller; +Cc: michal.k.k.piotrowski, torvalds, linux-kernel, netdev
In-Reply-To: <20060311.183904.71244086.davem@davemloft.net>

David S. Miller wrote:
> From: "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com>
> Date: Sun, 12 Mar 2006 02:51:40 +0100
> 
> 
>>I have noticed this warnings
>>TCP: Treason uncloaked! Peer 82.113.55.2:11759/50967 shrinks window
>>148470938:148470943. Repaired.
>>TCP: Treason uncloaked! Peer 82.113.55.2:11759/50967 shrinks window
>>148470938:148470943. Repaired.
>>TCP: Treason uncloaked! Peer 82.113.55.2:11759/59768 shrinks window
>>1124211698:1124211703. Repaired.
>>TCP: Treason uncloaked! Peer 82.113.55.2:11759/59768 shrinks window
>>1124211698:1124211703. Repaired.
>>
>>It maybe problem with ktorrent.
> 
> 
> It is a problem with the remote TCP implementation, it is
> illegally advertising a smaller window that it previously
> did.
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Packeteer manipulates window for shaping. I probably misread/read wrong 
RFC on this but I thought it didn't break any MUST NOTs.

I assume Linux + SFQ reordering packets during window growth would not 
trigger it.

Andy.

^ permalink raw reply

* Re: [PATCH] Unaligned accesses in the ethernet bridge
From: Adrian Bunk @ 2006-04-09 14:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Peter Chubb, linux-kernel, netdev
In-Reply-To: <20060407165711.1df5b52e@dxpl.pdx.osdl.net>

On Fri, Apr 07, 2006 at 04:57:11PM -0700, Stephen Hemminger wrote:
> On Thu, 6 Apr 2006 22:37:08 +0200
> Adrian Bunk <bunk@stusta.de> wrote:
> 
> > On Thu, Mar 23, 2006 at 01:06:02PM +1100, Peter Chubb wrote:
> > > 
> > > I see lots of
> > > 	kernel unaligned access to 0xa0000001009dbb6f, ip=0xa000000100811591
> > > 	kernel unaligned access to 0xa0000001009dbb6b, ip=0xa0000001008115c1
> > > 	kernel unaligned access to 0xa0000001009dbb6d, ip=0xa0000001008115f1
> > > messages in my logs on IA64 when using the ethernet bridge with 2.6.16.
> > > 
> > > 
> > > Appended is a patch to fix them.
> > 
> > 
> > I see this patch already made it into 2.6.17-rc1.
> > 
> > It seems to be a candidate for 2.6.16.3, too?
> > If yes, please submit it to stable@kernel.org.
> 
> The code that caused this was new in 2.6.17

Ah sorry, Peter's "when using the ethernet bridge with 2.6.16" confused 
me.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

^ permalink raw reply

* [2.6 patch] drivers/net/via-rhine.c: make a function static
From: Adrian Bunk @ 2006-04-09 15:58 UTC (permalink / raw)
  To: Andrew Morton; +Cc: rl, jgarzik, netdev, linux-kernel

This patch makes the needlessly global rhine_set_carrier() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 4 Apr 2006

--- linux-2.6.17-rc1-mm1-full/drivers/net/via-rhine.c.old	2006-04-04 17:41:16.000000000 +0200
+++ linux-2.6.17-rc1-mm1-full/drivers/net/via-rhine.c	2006-04-04 17:41:29.000000000 +0200
@@ -1091,7 +1091,7 @@
 }
 
 /* Called after status of force_media possibly changed */
-void rhine_set_carrier(struct mii_if_info *mii)
+static void rhine_set_carrier(struct mii_if_info *mii)
 {
 	if (mii->force_media) {
 		/* autoneg is off: Link is always assumed to be up */

^ permalink raw reply

* [2.6 patch] drivers/char/random.c: unexport secure_ipv6_port_ephemeral
From: Adrian Bunk @ 2006-04-09 15:58 UTC (permalink / raw)
  To: Andrew Morton; +Cc: mpm, linux-kernel, netdev

This patch removes the unused EXPORT_SYMBOL(secure_ipv6_port_ephemeral).

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 5 Apr 2006

--- linux-2.6.17-rc1-mm1-full/drivers/char/random.c.old	2006-04-05 17:00:04.000000000 +0200
+++ linux-2.6.17-rc1-mm1-full/drivers/char/random.c	2006-04-05 17:00:22.000000000 +0200
@@ -1584,7 +1584,6 @@
 
 	return twothirdsMD4Transform(daddr, hash);
 }
-EXPORT_SYMBOL(secure_ipv6_port_ephemeral);
 #endif
 
 #if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE)

^ permalink raw reply

* Re: [2.6 patch] drivers/char/random.c: unexport secure_ipv6_port_ephemeral
From: Matt Mackall @ 2006-04-09 16:56 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andrew Morton, linux-kernel, netdev
In-Reply-To: <20060409155822.GI8454@stusta.de>

On Sun, Apr 09, 2006 at 05:58:22PM +0200, Adrian Bunk wrote:
> This patch removes the unused EXPORT_SYMBOL(secure_ipv6_port_ephemeral).

> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Matt Mackall <mpm@selenic.com>

Adrian appears to be correct that this doesn't break modular ipv6.
-- 
Mathematics is the supreme nostalgia of our time.

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: George P Nychis @ 2006-04-09 17:37 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: davem, linux-kernel, netdev
In-Reply-To: <20060408163743.c59d6e59.rdunlap@xenotime.net>

Thanks for the help.

Here is the makefile:
http://rafb.net/paste/results/auchPH75.html

And here is the full errors I receive:
http://rafb.net/paste/results/Qplpqw74.html

Greatly appreciate it

- George


> On Sat, 8 Apr 2006 19:18:47 -0400 (EDT) George P Nychis wrote:
> 
>> Yeah, this module is unfortunately not under the GPL, it was made for
>> research and i am not the author, I was only given the code for my own
>> research.
>> 
>> I enabled that support in the kernel, and then tried to recompile and
>> get tons of errors/warnings... so maybe I am missing something else to
>> be enabled in the kernel... here are a few examples of errors: 
>> /usr/include/linux/skbuff.h:30:26: net/checksum.h: No such file or
>> directory /usr/include/asm/irq.h:16:25: irq_vectors.h: No such file or
>> directory /usr/include/linux/irq.h:72: error: `NR_IRQS' undeclared here
>> (not in a function) /usr/include/asm/hw_irq.h:28: error:
>> `NR_IRQ_VECTORS' undeclared here (not in a function)
>> 
>> I think those are the top most errors, so if i can fix those hopefully
>> the rest shall vanish!
> 
> Looks like a Makefile problem then.  Can you post the Makefile? Hopefully
> it is using a Makefile and not just an elaborate gcc command line.
> 
> [and please don't top-post]
> 
>> - George
>> 
>> 
>>> From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8 Apr 2006
>>> 18:47:34 -0400 (EDT)
>>> 
>>>> Hey,
>>>> 
>>>> I have a kernel module that uses unregister_qdisc and
>>>> register_qdisc, whenever i try to insert the module I get: 
>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol 
>>>> unregister_qdisc /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol 
>>>> register_qdisc
>>>> 
>>>> Am i missing some sort of support in the kernel?
>>> 
>>> Make sure CONFIG_NET_SCHED is enabled and that you compiled your
>>> module against that kernel.
>>> 
>>> Where does this sch_xcp come from?  It's not in the vanilla sources.
>>> 
>>> Also, please direct networking questions to the
>>> netdev@vger.kernel.org mailing list which I have added to the CC:.
> 
> --- ~Randy
> 
> 


-- 

^ permalink raw reply

* Re: net interface renaming issue (+fix?)
From: Sergey Vlasov @ 2006-04-09 17:56 UTC (permalink / raw)
  To: Thomas de Grenier de Latour; +Cc: Linux-hotplug-devel, netdev
In-Reply-To: <20060409192140.73644723@eusebe>

[-- Attachment #1: Type: text/plain, Size: 5493 bytes --]

On Sun, 9 Apr 2006 19:21:40 +0200 Thomas de Grenier de Latour wrote:

> Hi,
> 
> I'm running Gentoo Linux, a 2.6.16-ck kernel, and udev-0.89-r2, and 
> have had hard time with network interfaces renaming through udev 
> rules. The first thing i've tried were rules like this one:
> 
> SUBSYSTEM=="net", KERNEL=="eth*", SYSFS{address}=="00:0d:60:12:75:0a", NAME="lan"
> 
> Plus this one from the standard early rules:
> 
> ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
> 
> It doesn't work when i "modprobe e1000" (my ethernet driver):
> ...
> udevd[21612]: udev_event_run: seq 956 forked, pid [21816], 'add' 'net', 0 seconds old
> udevd-event[21816]: wait_for_sysfs: file '/sys/class/net/eth0/address' appeared after 0 loops
> udevd-event[21816]: udev_rules_get_name: no node name set, will use kernel name 'eth0'
> ...
> But if i later do a "echo add > /sys/class/net/eth0/uevent", then 
> interface is properly renamed. It also works fine if i start with
> the module initialy not loaded, and then trigger the uevent on the
> corresponding pci device (will load the module, etc.)
> 
> 
> Then i've tried replacing the address match by DRIVER=="e1000", with
> no more success.  But i've  noticed something interesting in debug 
> output, when the rule matcher walks up in parent devices to check 
> the driver:
> % grep -i driver /var/tmp/udev-net-debug.log
> ...
> udevd-event[18411]: match_key: key DRIVER value='e1000'
> udevd-event[18411]: match_key: match DRIVER 'e1000' <-> ''
> udevd-event[18411]: match_key: DRIVER is false
> udevd-event[18411]: sysfs_device_get: add to cache 'devpath=/devices/pci0000:00/0000:00:1e.0/0000:02:01.0', subsystem='pci', driver=''
> udevd-event[18411]: match_key: key DRIVER value='e1000' 
> udevd-event[18411]: match_key: match DRIVER 'e1000' <-> '' 
> udevd-event[18411]: match_key: DRIVER is false
> ...
> This is weird, because if i latter look in /sys, the "driver" links
> are here. Which made me think it was a race, so i've added this rule:
> 
> ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="device/driver"
> 
> And it fixed the problem:
> ...
> udevd[21612]: udev_event_run: seq 950 forked, pid [21790], 'add' 'net', 0 seconds old
> udevd-event[21790]: wait_for_sysfs: file '/sys/class/net/eth0/address' appeared after 0 loops
> udevd-event[21790]: wait_for_sysfs: wait for '/sys/class/net/eth0/device/driver' for 20 mseconds
> udevd-event[21790]: wait_for_sysfs: file '/sys/class/net/eth0/device/driver' appeared after 1 loops
> udevd-event[21790]: udev_rules_get_name: rule applied, 'eth0' becomes 'lan'
> udevd-event[21790]: rename_net_if: changing net interface name from 'eth0' to 'lan'
> udevd-event[21790]: udev_add_device: renamed netif to 'lan'
> ...
> 
> It also fixes the problem with using a SYSFS{address} match btw.
> With no such wait, i can see in debug that "address" is found in sysfs,
> but with no value:
> ...
> udevd-event[21977]: sysfs_attr_get_value: open '/class/net/eth0'/'address'
> udevd-event[21977]: sysfs_attr_get_value: new uncached attribute '/sys/class/net/eth0/address'
> udevd-event[21977]: sysfs_attr_get_value: add to cache '/sys/class/net/eth0/address'
> udevd-event[21977]: sysfs_attr_get_value: open '/class/net/eth0'/'address'
> ...
> Whereas with the wait-for-driver trick, i can see it read with a 
> useful value:
> ...
> udevd-event[21954]: sysfs_attr_get_value: open '/class/net/eth0'/'address'
> udevd-event[21954]: sysfs_attr_get_value: new uncached attribute '/sys/class/net/eth0/address'
> udevd-event[21954]: sysfs_attr_get_value: add to cache '/sys/class/net/eth0/address'
> udevd-event[21954]: sysfs_attr_get_value: cache '/sys/class/net/eth0/address' with value '00:0d:60:12:75:0a'
> ...
> 
> So i wonder, maybe such a rule should be added to the standard early
> ones? It should maybe use more checks though, to be sure there is
> actually a driver to wait. Something like ENV{PHYSDEVPATH}=="?*" 
> and/or ENV{PHYSDEVDRIVER}=="?*".
> 
> Btw, using ENV{PHYSDEVDRIVER}=="e1000" in my renaming rule was working
> fine, with no trick (this variables are correctly set, like 'udevmonitor 
> --env' shows).
> 
> 
> So, what do you think, does such a rule makes sense?
> Or is "address" being added to sysfs with no useful value yet the real
> issue, and my rule only an ugly workround?

(quoting the whole message for netdev)

Apparently there is a race there.  The "add" uevent for /class/net/eth0
is emitted by class_device_register(), which is called by
netdev_register_sysfs().  Class device attributes (like "address") are
also added by class_device_register() (really class_device_add(), which
is invoked from there), but this is done before generating the uevent,
so at the first glance there is no race here (and waiting for "address"
is unnecessary).  However, show_address() does not output anything
unless dev->reg_state == NETREG_REGISTERED - and this state is set by
netdev_run_todo() only after netdev_register_sysfs() returns, so in the
meantime (while netdev_register_sysfs() is busy adding the "statistics"
attribute group) some process may see an empty "address" attribute.

Waiting for "device/driver" ensures that udevd continues to process the
uevent only after the probe function completes, which ensures completion
of the registration (netdev_run_todo() is invoked by rtnl_unlock() at
the end of register_netdev() and processes all pending requests).

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: Randy.Dunlap @ 2006-04-09 20:03 UTC (permalink / raw)
  To: George P Nychis; +Cc: davem, linux-kernel, netdev
In-Reply-To: <1786.128.2.140.234.1144604245.squirrel@128.2.140.234>

On Sun, 9 Apr 2006 13:37:25 -0400 (EDT) George P Nychis wrote:

> Thanks for the help.
> 
> Here is the makefile:
> http://rafb.net/paste/results/auchPH75.html
> 
> And here is the full errors I receive:
> http://rafb.net/paste/results/Qplpqw74.html
> 
> Greatly appreciate it
> 
> - George

[repeat: please don't top-post]

I don't know how much I can help you.  It's been a long time since
I've built external modules on 2.4.x.

Problems that I see:
- the Makefile does not use the expected 2.4 kernel build infrastructure;
- kernel Makefile uses -nostdinc to prevent use of userspace headers;
- Makefile is trying to include userspace headers instead of kernel headers, e.g.:
  In file included from /usr/include/linux/if_ether.h:107,
                 from /usr/include/linux/netdevice.h:29,
                 from sch_xcp.c:8:
- this specified include directory is only in 2.6.x, not 2.4.x:
  -I/lib/modules/`uname -r`/build/include/asm/mach-default

It's not clear to me how this makefile could work with 2.4.x at all.
Is it supposed to, or that's just what you want to see it do?

You could try to fix the Makefile based on makefile-changes articles at lwn.net.
E.g.:
http://lwn.net/Articles/151784/
http://lwn.net/Articles/79984/
http://lwn.net/Articles/74767/
http://lwn.net/Articles/69148/
http://lwn.net/Articles/21823/



> > On Sat, 8 Apr 2006 19:18:47 -0400 (EDT) George P Nychis wrote:
> > 
> >> Yeah, this module is unfortunately not under the GPL, it was made for
> >> research and i am not the author, I was only given the code for my own
> >> research.
> >> 
> >> I enabled that support in the kernel, and then tried to recompile and
> >> get tons of errors/warnings... so maybe I am missing something else to
> >> be enabled in the kernel... here are a few examples of errors: 
> >> /usr/include/linux/skbuff.h:30:26: net/checksum.h: No such file or
> >> directory /usr/include/asm/irq.h:16:25: irq_vectors.h: No such file or
> >> directory /usr/include/linux/irq.h:72: error: `NR_IRQS' undeclared here
> >> (not in a function) /usr/include/asm/hw_irq.h:28: error:
> >> `NR_IRQ_VECTORS' undeclared here (not in a function)
> >> 
> >> I think those are the top most errors, so if i can fix those hopefully
> >> the rest shall vanish!
> > 
> > Looks like a Makefile problem then.  Can you post the Makefile? Hopefully
> > it is using a Makefile and not just an elaborate gcc command line.
> > 
> > [and please don't top-post]
> > 
> >> - George
> >> 
> >> 
> >>> From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8 Apr 2006
> >>> 18:47:34 -0400 (EDT)
> >>> 
> >>>> Hey,
> >>>> 
> >>>> I have a kernel module that uses unregister_qdisc and
> >>>> register_qdisc, whenever i try to insert the module I get: 
> >>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol 
> >>>> unregister_qdisc /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol 
> >>>> register_qdisc
> >>>> 
> >>>> Am i missing some sort of support in the kernel?
> >>> 
> >>> Make sure CONFIG_NET_SCHED is enabled and that you compiled your
> >>> module against that kernel.
> >>> 
> >>> Where does this sch_xcp come from?  It's not in the vanilla sources.
> >>> 
> >>> Also, please direct networking questions to the
> >>> netdev@vger.kernel.org mailing list which I have added to the CC:.

---
~Randy

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: George P Nychis @ 2006-04-09 20:06 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: davem, linux-kernel, netdev
In-Reply-To: <20060409130315.50daaec9.rdunlap@xenotime.net>


> On Sun, 9 Apr 2006 13:37:25 -0400 (EDT) George P Nychis wrote:
> 
>> Thanks for the help.
>> 
>> Here is the makefile: http://rafb.net/paste/results/auchPH75.html
>> 
>> And here is the full errors I receive: 
>> http://rafb.net/paste/results/Qplpqw74.html
>> 
>> Greatly appreciate it
>> 
>> - George
> 
> [repeat: please don't top-post]
> 
> I don't know how much I can help you.  It's been a long time since I've
> built external modules on 2.4.x.
> 
> Problems that I see: - the Makefile does not use the expected 2.4 kernel
> build infrastructure; - kernel Makefile uses -nostdinc to prevent use of
> userspace headers; - Makefile is trying to include userspace headers
> instead of kernel headers, e.g.: In file included from
> /usr/include/linux/if_ether.h:107, from /usr/include/linux/netdevice.h:29,
>  from sch_xcp.c:8: - this specified include directory is only in 2.6.x,
> not 2.4.x: -I/lib/modules/`uname -r`/build/include/asm/mach-default
> 
> It's not clear to me how this makefile could work with 2.4.x at all. Is it
> supposed to, or that's just what you want to see it do?
> 
> You could try to fix the Makefile based on makefile-changes articles at
> lwn.net. E.g.: http://lwn.net/Articles/151784/ 
> http://lwn.net/Articles/79984/ http://lwn.net/Articles/74767/ 
> http://lwn.net/Articles/69148/ http://lwn.net/Articles/21823/
> 
> 
> 
>>> On Sat, 8 Apr 2006 19:18:47 -0400 (EDT) George P Nychis wrote:
>>> 
>>>> Yeah, this module is unfortunately not under the GPL, it was made
>>>> for research and i am not the author, I was only given the code for
>>>> my own research.
>>>> 
>>>> I enabled that support in the kernel, and then tried to recompile
>>>> and get tons of errors/warnings... so maybe I am missing something
>>>> else to be enabled in the kernel... here are a few examples of
>>>> errors: /usr/include/linux/skbuff.h:30:26: net/checksum.h: No such
>>>> file or directory /usr/include/asm/irq.h:16:25: irq_vectors.h: No
>>>> such file or directory /usr/include/linux/irq.h:72: error: `NR_IRQS'
>>>> undeclared here (not in a function) /usr/include/asm/hw_irq.h:28:
>>>> error: `NR_IRQ_VECTORS' undeclared here (not in a function)
>>>> 
>>>> I think those are the top most errors, so if i can fix those
>>>> hopefully the rest shall vanish!
>>> 
>>> Looks like a Makefile problem then.  Can you post the Makefile?
>>> Hopefully it is using a Makefile and not just an elaborate gcc command
>>> line.
>>> 
>>> [and please don't top-post]
>>> 
>>>> - George
>>>> 
>>>> 
>>>>> From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8 Apr 2006 
>>>>> 18:47:34 -0400 (EDT)
>>>>> 
>>>>>> Hey,
>>>>>> 
>>>>>> I have a kernel module that uses unregister_qdisc and 
>>>>>> register_qdisc, whenever i try to insert the module I get: 
>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved
>>>>>> symbol unregister_qdisc
>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved
>>>>>> symbol register_qdisc
>>>>>> 
>>>>>> Am i missing some sort of support in the kernel?
>>>>> 
>>>>> Make sure CONFIG_NET_SCHED is enabled and that you compiled your 
>>>>> module against that kernel.
>>>>> 
>>>>> Where does this sch_xcp come from?  It's not in the vanilla
>>>>> sources.
>>>>> 
>>>>> Also, please direct networking questions to the 
>>>>> netdev@vger.kernel.org mailing list which I have added to the
>>>>> CC:.
> 
> --- ~Randy
> 
> 

Sorry, I thought when you said top-post, I thought you were telling me about only posting the "top" most errors in my original e-mail, thats why i pasted full error output.


The thing is, it compiles successfully when CONFIG_NET_SCHED is not enabled in the kernel.  But when its not enabled, i get the external symbol errors.

As soon as I enable CONFIG_NET_SCHED ... it no longer compiles.

I will look into this, it is supposed to work... the code has been used by others before.

If you or anyone else come up with anything, please let me know

Thanks!
George

^ permalink raw reply

* [PATCH] bcm43xx-d80211: use pci_iomap() for convenience.
From: Michael Buesch @ 2006-04-10  0:05 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

This reduces codesize.

--- a/drivers/net/wireless/bcm43xx-d80211/bcm43xx.h
+++ b/drivers/net/wireless/bcm43xx-d80211/bcm43xx.h
@@ -639,7 +639,6 @@ struct bcm43xx_private {
 	unsigned int irq;
 
 	void __iomem *mmio_addr;
-	unsigned int mmio_len;
 
 	/* Do not use the lock directly. Use the bcm43xx_lock* helper
 	 * functions, to be MMIO-safe. */
--- a/drivers/net/wireless/bcm43xx-d80211/bcm43xx_debugfs.c
+++ b/drivers/net/wireless/bcm43xx-d80211/bcm43xx_debugfs.c
@@ -92,7 +92,7 @@ static ssize_t devinfo_read_file(struct 
 	fappend("subsystem_vendor: 0x%04x   subsystem_device: 0x%04x\n",
 		pci_dev->subsystem_vendor, pci_dev->subsystem_device);
 	fappend("IRQ: %d\n", bcm->irq);
-	fappend("mmio_addr: 0x%p   mmio_len: %u\n", bcm->mmio_addr, bcm->mmio_len);
+	fappend("mmio_addr: 0x%p\n", bcm->mmio_addr);
 	fappend("chip_id: 0x%04x   chip_rev: 0x%02x\n", bcm->chip_id, bcm->chip_rev);
 	if ((bcm->core_80211[0].rev >= 3) && (bcm43xx_read32(bcm, 0x0158) & (1 << 16)))
 		fappend("Radio disabled by hardware!\n");
--- a/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c
@@ -3770,8 +3770,7 @@ static void bcm43xx_detach_board(struct 
 
 	bcm43xx_chipset_detach(bcm);
 	/* Do _not_ access the chip, after it is detached. */
-	iounmap(bcm->mmio_addr);
-
+	pci_iounmap(pci_dev, bcm->mmio_addr);
 	pci_release_regions(pci_dev);
 	pci_disable_device(pci_dev);
 
@@ -3845,40 +3844,26 @@ static int bcm43xx_attach_board(struct b
 	struct net_device *net_dev = bcm->net_dev;
 	int err;
 	int i;
-	unsigned long mmio_start, mmio_flags, mmio_len;
 	u32 coremask;
 
 	err = pci_enable_device(pci_dev);
 	if (err) {
-		printk(KERN_ERR PFX "unable to wake up pci device (%i)\n", err);
+		printk(KERN_ERR PFX "pci_enable_device() failed\n");
 		goto out;
 	}
-	mmio_start = pci_resource_start(pci_dev, 0);
-	mmio_flags = pci_resource_flags(pci_dev, 0);
-	mmio_len = pci_resource_len(pci_dev, 0);
-	if (!(mmio_flags & IORESOURCE_MEM)) {
-		printk(KERN_ERR PFX
-		       "%s, region #0 not an MMIO resource, aborting\n",
-		       pci_name(pci_dev));
-		err = -ENODEV;
-		goto err_pci_disable;
-	}
 	err = pci_request_regions(pci_dev, KBUILD_MODNAME);
 	if (err) {
-		printk(KERN_ERR PFX
-		       "could not access PCI resources (%i)\n", err);
+		printk(KERN_ERR PFX "pci_request_regions() failed\n");
 		goto err_pci_disable;
 	}
 	/* enable PCI bus-mastering */
 	pci_set_master(pci_dev);
-	bcm->mmio_addr = ioremap(mmio_start, mmio_len);
+	bcm->mmio_addr = pci_iomap(pci_dev, 0, ~0UL);
 	if (!bcm->mmio_addr) {
-		printk(KERN_ERR PFX "%s: cannot remap MMIO, aborting\n",
-		       pci_name(pci_dev));
+		printk(KERN_ERR PFX "pci_iomap() failed\n");
 		err = -EIO;
 		goto err_pci_release;
 	}
-	bcm->mmio_len = mmio_len;
 	net_dev->base_addr = (unsigned long)bcm->mmio_addr;
 
 	bcm43xx_pci_read_config16(bcm, PCI_SUBSYSTEM_VENDOR_ID,
@@ -3969,7 +3954,7 @@ err_80211_unwind:
 err_chipset_detach:
 	bcm43xx_chipset_detach(bcm);
 err_iounmap:
-	iounmap(bcm->mmio_addr);
+	pci_iounmap(pci_dev, bcm->mmio_addr);
 err_pci_release:
 	pci_release_regions(pci_dev);
 err_pci_disable:

-- 
Greetings Michael.

^ permalink raw reply

* [PATCH] bcm43xx: use pci_iomap() for convenience.
From: Michael Buesch @ 2006-04-10  0:08 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

This reduces codesize.

--- a/drivers/net/wireless/bcm43xx/bcm43xx.h
+++ b/drivers/net/wireless/bcm43xx/bcm43xx.h
@@ -648,7 +648,6 @@ struct bcm43xx_private {
 	unsigned int irq;
 
 	void __iomem *mmio_addr;
-	unsigned int mmio_len;
 
 	/* Do not use the lock directly. Use the bcm43xx_lock* helper
 	 * functions, to be MMIO-safe. */
--- a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
@@ -92,7 +92,7 @@ static ssize_t devinfo_read_file(struct 
 	fappend("subsystem_vendor: 0x%04x   subsystem_device: 0x%04x\n",
 		pci_dev->subsystem_vendor, pci_dev->subsystem_device);
 	fappend("IRQ: %d\n", bcm->irq);
-	fappend("mmio_addr: 0x%p   mmio_len: %u\n", bcm->mmio_addr, bcm->mmio_len);
+	fappend("mmio_addr: 0x%p\n", bcm->mmio_addr);
 	fappend("chip_id: 0x%04x   chip_rev: 0x%02x\n", bcm->chip_id, bcm->chip_rev);
 	if ((bcm->core_80211[0].rev >= 3) && (bcm43xx_read32(bcm, 0x0158) & (1 << 16)))
 		fappend("Radio disabled by hardware!\n");
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -3287,8 +3287,7 @@ static void bcm43xx_detach_board(struct 
 
 	bcm43xx_chipset_detach(bcm);
 	/* Do _not_ access the chip, after it is detached. */
-	iounmap(bcm->mmio_addr);
-	
+	pci_iounmap(pci_dev, bcm->mmio_addr);
 	pci_release_regions(pci_dev);
 	pci_disable_device(pci_dev);
 
@@ -3378,40 +3377,26 @@ static int bcm43xx_attach_board(struct b
 	struct net_device *net_dev = bcm->net_dev;
 	int err;
 	int i;
-	unsigned long mmio_start, mmio_flags, mmio_len;
 	u32 coremask;
 
 	err = pci_enable_device(pci_dev);
 	if (err) {
-		printk(KERN_ERR PFX "unable to wake up pci device (%i)\n", err);
+		printk(KERN_ERR PFX "pci_enable_device() failed\n");
 		goto out;
 	}
-	mmio_start = pci_resource_start(pci_dev, 0);
-	mmio_flags = pci_resource_flags(pci_dev, 0);
-	mmio_len = pci_resource_len(pci_dev, 0);
-	if (!(mmio_flags & IORESOURCE_MEM)) {
-		printk(KERN_ERR PFX
-		       "%s, region #0 not an MMIO resource, aborting\n",
-		       pci_name(pci_dev));
-		err = -ENODEV;
-		goto err_pci_disable;
-	}
 	err = pci_request_regions(pci_dev, KBUILD_MODNAME);
 	if (err) {
-		printk(KERN_ERR PFX
-		       "could not access PCI resources (%i)\n", err);
+		printk(KERN_ERR PFX "pci_request_regions() failed\n");
 		goto err_pci_disable;
 	}
 	/* enable PCI bus-mastering */
 	pci_set_master(pci_dev);
-	bcm->mmio_addr = ioremap(mmio_start, mmio_len);
+	bcm->mmio_addr = pci_iomap(pci_dev, 0, ~0UL);
 	if (!bcm->mmio_addr) {
-		printk(KERN_ERR PFX "%s: cannot remap MMIO, aborting\n",
-		       pci_name(pci_dev));
+		printk(KERN_ERR PFX "pci_iomap() failed\n");
 		err = -EIO;
 		goto err_pci_release;
 	}
-	bcm->mmio_len = mmio_len;
 	net_dev->base_addr = (unsigned long)bcm->mmio_addr;
 
 	bcm43xx_pci_read_config16(bcm, PCI_SUBSYSTEM_VENDOR_ID,
@@ -3504,7 +3489,7 @@ err_80211_unwind:
 err_chipset_detach:
 	bcm43xx_chipset_detach(bcm);
 err_iounmap:
-	iounmap(bcm->mmio_addr);
+	pci_iounmap(pci_dev, bcm->mmio_addr);
 err_pci_release:
 	pci_release_regions(pci_dev);
 err_pci_disable:

-- 
Greetings Michael.

^ permalink raw reply

* bcm43xx symbol clash problems
From: Michael Buesch @ 2006-04-10  0:16 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

Hi,

I looked into the symbol clash problems between bcm43xx and bcm43xx-d80211
you mentioned at the wireless summit.
Well, IMHO it is pretty hard to find a good solution to this.
The situation is: We have several nonstatic functions in the bcm driver. These
functions have the same name in the softmac and dscape versions. It's quite a
lot of functions.
We can't make them static, because the driver is splitted over several files.
I would _really_ want to prevent renaming them all, because that is lots of work,
which will be thrown away anyway.
Does kbuild perhaps have some magic to handle that?

This needs to be solved soon, but I have no idea how.

I also wanna note that I am looking into using quilt for bcm43xx development.
git is not the perfect solution for bcm43xx development. Maybe quilt is.
Who knows... Let's try it.

-- 
Greetings Michael, who would like to have the namespace keyword in C.

^ permalink raw reply

* [PATCH] bcm43xx-d80211: protect tx_stat callback from uninitialized device
From: Michael Buesch @ 2006-04-10  0:25 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w,
	jbenc-AlSwsSmVLrQ

diff --git a/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c b/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c
index 043a5cf..f0f4f78 100644
--- a/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c
@@ -4128,15 +4128,19 @@ static int bcm43xx_net_get_tx_stats(stru
 {
 	struct bcm43xx_private *bcm = bcm43xx_priv(net_dev);
 	unsigned long flags;
+	int err = -ENODEV;
 
 	bcm43xx_lock(bcm, flags);
-	if (bcm43xx_using_pio(bcm))
-		bcm43xx_pio_get_tx_stats(bcm, stats);
-	else
-		bcm43xx_dma_get_tx_stats(bcm, stats);
+	if (likely(bcm->initialized)) {
+		if (bcm43xx_using_pio(bcm))
+			bcm43xx_pio_get_tx_stats(bcm, stats);
+		else
+			bcm43xx_dma_get_tx_stats(bcm, stats);
+		err = 0;
+	}
 	bcm43xx_unlock(bcm, flags);
 
-	return 0;
+	return err;
 }
 
 static int bcm43xx_net_get_stats(struct net_device *net_dev,

-- 
Greetings Michael.

^ permalink raw reply related

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: Randy.Dunlap @ 2006-04-10  2:29 UTC (permalink / raw)
  To: George P Nychis; +Cc: linux-kernel, netdev
In-Reply-To: <1949.128.2.140.234.1144634733.squirrel@128.2.140.234>

On Sun, 9 Apr 2006 22:05:33 -0400 (EDT) George P Nychis wrote:

> 
> > On Sun, 9 Apr 2006 13:37:25 -0400 (EDT) George P Nychis wrote:
> > 
> >> Thanks for the help.
> >> 
> >> Here is the makefile: http://rafb.net/paste/results/auchPH75.html
> >> 
> >> And here is the full errors I receive: 
> >> http://rafb.net/paste/results/Qplpqw74.html
> >> 
> >> Greatly appreciate it
> >> 
> >> - George
> > 
> > [repeat: please don't top-post]
> > 
> > I don't know how much I can help you.  It's been a long time since I've
> > built external modules on 2.4.x.
> > 
> > Problems that I see: - the Makefile does not use the expected 2.4 kernel
> > build infrastructure; - kernel Makefile uses -nostdinc to prevent use of
> > userspace headers; - Makefile is trying to include userspace headers
> > instead of kernel headers, e.g.: In file included from
> > /usr/include/linux/if_ether.h:107, from /usr/include/linux/netdevice.h:29,
> >  from sch_xcp.c:8: - this specified include directory is only in 2.6.x,
> > not 2.4.x: -I/lib/modules/`uname -r`/build/include/asm/mach-default
> > 
> > It's not clear to me how this makefile could work with 2.4.x at all. Is it
> > supposed to, or that's just what you want to see it do?
> > 
> > You could try to fix the Makefile based on makefile-changes articles at
> > lwn.net. E.g.: http://lwn.net/Articles/151784/ 
> > http://lwn.net/Articles/79984/ http://lwn.net/Articles/74767/ 
> > http://lwn.net/Articles/69148/ http://lwn.net/Articles/21823/
> > 
> > 
> > 
> >>> On Sat, 8 Apr 2006 19:18:47 -0400 (EDT) George P Nychis wrote:
> >>> 
> >>>> Yeah, this module is unfortunately not under the GPL, it was made
> >>>> for research and i am not the author, I was only given the code for
> >>>> my own research.
> >>>> 
> >>>> I enabled that support in the kernel, and then tried to recompile
> >>>> and get tons of errors/warnings... so maybe I am missing something
> >>>> else to be enabled in the kernel... here are a few examples of
> >>>> errors: /usr/include/linux/skbuff.h:30:26: net/checksum.h: No such
> >>>> file or directory /usr/include/asm/irq.h:16:25: irq_vectors.h: No
> >>>> such file or directory /usr/include/linux/irq.h:72: error: `NR_IRQS'
> >>>> undeclared here (not in a function) /usr/include/asm/hw_irq.h:28:
> >>>> error: `NR_IRQ_VECTORS' undeclared here (not in a function)
> >>>> 
> >>>> I think those are the top most errors, so if i can fix those
> >>>> hopefully the rest shall vanish!
> >>> 
> >>> Looks like a Makefile problem then.  Can you post the Makefile?
> >>> Hopefully it is using a Makefile and not just an elaborate gcc command
> >>> line.
> >>> 
> >>> [and please don't top-post]
> >>> 
> >>>> - George
> >>>> 
> >>>> 
> >>>>> From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8 Apr 2006 
> >>>>> 18:47:34 -0400 (EDT)
> >>>>> 
> >>>>>> Hey,
> >>>>>> 
> >>>>>> I have a kernel module that uses unregister_qdisc and 
> >>>>>> register_qdisc, whenever i try to insert the module I get: 
> >>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved
> >>>>>> symbol unregister_qdisc
> >>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved
> >>>>>> symbol register_qdisc
> >>>>>> 
> >>>>>> Am i missing some sort of support in the kernel?
> >>>>> 
> >>>>> Make sure CONFIG_NET_SCHED is enabled and that you compiled your 
> >>>>> module against that kernel.
> >>>>> 
> >>>>> Where does this sch_xcp come from?  It's not in the vanilla
> >>>>> sources.
> >>>>> 
> >>>>> Also, please direct networking questions to the 
> >>>>> netdev@vger.kernel.org mailing list which I have added to the
> >>>>> CC:.
> > 
> > --- ~Randy
> > 
> > 
> 
> By the way, if I add -I/usr/src/linux/include to the compile line, it successfully compiles, however, i am back to the start:
> lanthanum-ini src-1.0.1 # insmod sch_xcp
> Using /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o
> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol unregister_qdisc
> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol register_qdisc

Yet your 2.4.32 kernel image file does have those symbols in it?
Can you verify that by using 'nm' on the kernel image file?

If so, then I suppose that you'll need to make a small module test case
that exhibits this behavior, or just tell us where to get the sch_xcp files...

(re-added cc: for netdev)

---
~Randy

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: George P Nychis @ 2006-04-10  2:49 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-kernel, netdev
In-Reply-To: <20060409192929.28320c00.rdunlap@xenotime.net>


> On Sun, 9 Apr 2006 22:05:33 -0400 (EDT) George P Nychis wrote:
> 
>> 
>>> On Sun, 9 Apr 2006 13:37:25 -0400 (EDT) George P Nychis wrote:
>>> 
>>>> Thanks for the help.
>>>> 
>>>> Here is the makefile: http://rafb.net/paste/results/auchPH75.html
>>>> 
>>>> And here is the full errors I receive: 
>>>> http://rafb.net/paste/results/Qplpqw74.html
>>>> 
>>>> Greatly appreciate it
>>>> 
>>>> - George
>>> 
>>> [repeat: please don't top-post]
>>> 
>>> I don't know how much I can help you.  It's been a long time since
>>> I've built external modules on 2.4.x.
>>> 
>>> Problems that I see: - the Makefile does not use the expected 2.4
>>> kernel build infrastructure; - kernel Makefile uses -nostdinc to
>>> prevent use of userspace headers; - Makefile is trying to include
>>> userspace headers instead of kernel headers, e.g.: In file included
>>> from /usr/include/linux/if_ether.h:107, from
>>> /usr/include/linux/netdevice.h:29, from sch_xcp.c:8: - this specified
>>> include directory is only in 2.6.x, not 2.4.x: -I/lib/modules/`uname
>>> -r`/build/include/asm/mach-default
>>> 
>>> It's not clear to me how this makefile could work with 2.4.x at all.
>>> Is it supposed to, or that's just what you want to see it do?
>>> 
>>> You could try to fix the Makefile based on makefile-changes articles
>>> at lwn.net. E.g.: http://lwn.net/Articles/151784/ 
>>> http://lwn.net/Articles/79984/ http://lwn.net/Articles/74767/ 
>>> http://lwn.net/Articles/69148/ http://lwn.net/Articles/21823/
>>> 
>>> 
>>> 
>>>>> On Sat, 8 Apr 2006 19:18:47 -0400 (EDT) George P Nychis wrote:
>>>>> 
>>>>>> Yeah, this module is unfortunately not under the GPL, it was
>>>>>> made for research and i am not the author, I was only given the
>>>>>> code for my own research.
>>>>>> 
>>>>>> I enabled that support in the kernel, and then tried to
>>>>>> recompile and get tons of errors/warnings... so maybe I am
>>>>>> missing something else to be enabled in the kernel... here are a
>>>>>> few examples of errors: /usr/include/linux/skbuff.h:30:26:
>>>>>> net/checksum.h: No such file or directory
>>>>>> /usr/include/asm/irq.h:16:25: irq_vectors.h: No such file or
>>>>>> directory /usr/include/linux/irq.h:72: error: `NR_IRQS' 
>>>>>> undeclared here (not in a function)
>>>>>> /usr/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared
>>>>>> here (not in a function)
>>>>>> 
>>>>>> I think those are the top most errors, so if i can fix those 
>>>>>> hopefully the rest shall vanish!
>>>>> 
>>>>> Looks like a Makefile problem then.  Can you post the Makefile? 
>>>>> Hopefully it is using a Makefile and not just an elaborate gcc
>>>>> command line.
>>>>> 
>>>>> [and please don't top-post]
>>>>> 
>>>>>> - George
>>>>>> 
>>>>>> 
>>>>>>> From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8 Apr
>>>>>>> 2006 18:47:34 -0400 (EDT)
>>>>>>> 
>>>>>>>> Hey,
>>>>>>>> 
>>>>>>>> I have a kernel module that uses unregister_qdisc and 
>>>>>>>> register_qdisc, whenever i try to insert the module I get: 
>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved 
>>>>>>>> symbol unregister_qdisc 
>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved 
>>>>>>>> symbol register_qdisc
>>>>>>>> 
>>>>>>>> Am i missing some sort of support in the kernel?
>>>>>>> 
>>>>>>> Make sure CONFIG_NET_SCHED is enabled and that you compiled
>>>>>>> your module against that kernel.
>>>>>>> 
>>>>>>> Where does this sch_xcp come from?  It's not in the vanilla 
>>>>>>> sources.
>>>>>>> 
>>>>>>> Also, please direct networking questions to the 
>>>>>>> netdev@vger.kernel.org mailing list which I have added to the
>>>>>>>  CC:.
>>> 
>>> --- ~Randy
>>> 
>>> 
>> 
>> By the way, if I add -I/usr/src/linux/include to the compile line, it
>> successfully compiles, however, i am back to the start: lanthanum-ini
>> src-1.0.1 # insmod sch_xcp Using
>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o 
>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol
>> unregister_qdisc /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol
>> register_qdisc
> 
> Yet your 2.4.32 kernel image file does have those symbols in it? Can you
> verify that by using 'nm' on the kernel image file?
> 
> If so, then I suppose that you'll need to make a small module test case 
> that exhibits this behavior, or just tell us where to get the sch_xcp
> files...
> 
> (re-added cc: for netdev)
> 
> --- ~Randy
> 
> 

By kernel image, do you mean /usr/src/linux/vmlinux ?
if so,
lanthanum-ini linux # nm vmlinux | grep register_qdisc
c0399200 R __kstrtab_register_qdisc
c0399240 R __kstrtab_unregister_qdisc
c039ebc8 R __ksymtab_register_qdisc
c039ebd0 R __ksymtab_unregister_qdisc
c02eda40 T register_qdisc
c02edaf0 T unregister_qdisc

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: Randy.Dunlap @ 2006-04-10  2:59 UTC (permalink / raw)
  To: George P Nychis; +Cc: linux-kernel, netdev
In-Reply-To: <2474.128.2.140.234.1144637390.squirrel@128.2.140.234>

On Sun, 9 Apr 2006 22:49:50 -0400 (EDT) George P Nychis wrote:

> 
> > On Sun, 9 Apr 2006 22:05:33 -0400 (EDT) George P Nychis wrote:
> > 
> >> 
> >>> On Sun, 9 Apr 2006 13:37:25 -0400 (EDT) George P Nychis wrote:
> >>> 
> >>>> Thanks for the help.
> >>>> 
> >>>> Here is the makefile: http://rafb.net/paste/results/auchPH75.html
> >>>> 
> >>>> And here is the full errors I receive: 
> >>>> http://rafb.net/paste/results/Qplpqw74.html
> >>>> 
> >>>> Greatly appreciate it
> >>>> 
> >>>> - George
> >>> 
> >>> [repeat: please don't top-post]
> >>> 
> >>> I don't know how much I can help you.  It's been a long time since
> >>> I've built external modules on 2.4.x.
> >>> 
> >>> Problems that I see: - the Makefile does not use the expected 2.4
> >>> kernel build infrastructure; - kernel Makefile uses -nostdinc to
> >>> prevent use of userspace headers; - Makefile is trying to include
> >>> userspace headers instead of kernel headers, e.g.: In file included
> >>> from /usr/include/linux/if_ether.h:107, from
> >>> /usr/include/linux/netdevice.h:29, from sch_xcp.c:8: - this specified
> >>> include directory is only in 2.6.x, not 2.4.x: -I/lib/modules/`uname
> >>> -r`/build/include/asm/mach-default
> >>> 
> >>> It's not clear to me how this makefile could work with 2.4.x at all.
> >>> Is it supposed to, or that's just what you want to see it do?
> >>> 
> >>> You could try to fix the Makefile based on makefile-changes articles
> >>> at lwn.net. E.g.: http://lwn.net/Articles/151784/ 
> >>> http://lwn.net/Articles/79984/ http://lwn.net/Articles/74767/ 
> >>> http://lwn.net/Articles/69148/ http://lwn.net/Articles/21823/
> >>> 
> >>> 
> >>> 
> >>>>> On Sat, 8 Apr 2006 19:18:47 -0400 (EDT) George P Nychis wrote:
> >>>>> 
> >>>>>> Yeah, this module is unfortunately not under the GPL, it was
> >>>>>> made for research and i am not the author, I was only given the
> >>>>>> code for my own research.
> >>>>>> 
> >>>>>> I enabled that support in the kernel, and then tried to
> >>>>>> recompile and get tons of errors/warnings... so maybe I am
> >>>>>> missing something else to be enabled in the kernel... here are a
> >>>>>> few examples of errors: /usr/include/linux/skbuff.h:30:26:
> >>>>>> net/checksum.h: No such file or directory
> >>>>>> /usr/include/asm/irq.h:16:25: irq_vectors.h: No such file or
> >>>>>> directory /usr/include/linux/irq.h:72: error: `NR_IRQS' 
> >>>>>> undeclared here (not in a function)
> >>>>>> /usr/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared
> >>>>>> here (not in a function)
> >>>>>> 
> >>>>>> I think those are the top most errors, so if i can fix those 
> >>>>>> hopefully the rest shall vanish!
> >>>>> 
> >>>>> Looks like a Makefile problem then.  Can you post the Makefile? 
> >>>>> Hopefully it is using a Makefile and not just an elaborate gcc
> >>>>> command line.
> >>>>> 
> >>>>> [and please don't top-post]
> >>>>> 
> >>>>>> - George
> >>>>>> 
> >>>>>> 
> >>>>>>> From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8 Apr
> >>>>>>> 2006 18:47:34 -0400 (EDT)
> >>>>>>> 
> >>>>>>>> Hey,
> >>>>>>>> 
> >>>>>>>> I have a kernel module that uses unregister_qdisc and 
> >>>>>>>> register_qdisc, whenever i try to insert the module I get: 
> >>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved 
> >>>>>>>> symbol unregister_qdisc 
> >>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved 
> >>>>>>>> symbol register_qdisc
> >>>>>>>> 
> >>>>>>>> Am i missing some sort of support in the kernel?
> >>>>>>> 
> >>>>>>> Make sure CONFIG_NET_SCHED is enabled and that you compiled
> >>>>>>> your module against that kernel.
> >>>>>>> 
> >>>>>>> Where does this sch_xcp come from?  It's not in the vanilla 
> >>>>>>> sources.
> >>>>>>> 
> >>>>>>> Also, please direct networking questions to the 
> >>>>>>> netdev@vger.kernel.org mailing list which I have added to the
> >>>>>>>  CC:.
> >>> 
> >>> --- ~Randy
> >>> 
> >>> 
> >> 
> >> By the way, if I add -I/usr/src/linux/include to the compile line, it
> >> successfully compiles, however, i am back to the start: lanthanum-ini
> >> src-1.0.1 # insmod sch_xcp Using
> >> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o 
> >> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
> >> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol
> >> unregister_qdisc /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
> >> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol
> >> register_qdisc
> > 
> > Yet your 2.4.32 kernel image file does have those symbols in it? Can you
> > verify that by using 'nm' on the kernel image file?
> > 
> > If so, then I suppose that you'll need to make a small module test case 
> > that exhibits this behavior, or just tell us where to get the sch_xcp
> > files...
> > 
> > (re-added cc: for netdev)
> > 
> > --- ~Randy
> > 
> > 
> 
> By kernel image, do you mean /usr/src/linux/vmlinux ?
> if so,
> lanthanum-ini linux # nm vmlinux | grep register_qdisc
> c0399200 R __kstrtab_register_qdisc
> c0399240 R __kstrtab_unregister_qdisc
> c039ebc8 R __ksymtab_register_qdisc
> c039ebd0 R __ksymtab_unregister_qdisc
> c02eda40 T register_qdisc
> c02edaf0 T unregister_qdisc

Yes.  That's good, then.

---
~Randy

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: George P Nychis @ 2006-04-10  3:20 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-kernel, netdev
In-Reply-To: <20060409195906.77744b9b.rdunlap@xenotime.net>


> On Sun, 9 Apr 2006 22:49:50 -0400 (EDT) George P Nychis wrote:
> 
>> 
>>> On Sun, 9 Apr 2006 22:05:33 -0400 (EDT) George P Nychis wrote:
>>> 
>>>> 
>>>>> On Sun, 9 Apr 2006 13:37:25 -0400 (EDT) George P Nychis wrote:
>>>>> 
>>>>>> Thanks for the help.
>>>>>> 
>>>>>> Here is the makefile:
>>>>>> http://rafb.net/paste/results/auchPH75.html
>>>>>> 
>>>>>> And here is the full errors I receive: 
>>>>>> http://rafb.net/paste/results/Qplpqw74.html
>>>>>> 
>>>>>> Greatly appreciate it
>>>>>> 
>>>>>> - George
>>>>> 
>>>>> [repeat: please don't top-post]
>>>>> 
>>>>> I don't know how much I can help you.  It's been a long time
>>>>> since I've built external modules on 2.4.x.
>>>>> 
>>>>> Problems that I see: - the Makefile does not use the expected 2.4
>>>>>  kernel build infrastructure; - kernel Makefile uses -nostdinc to
>>>>>  prevent use of userspace headers; - Makefile is trying to
>>>>> include userspace headers instead of kernel headers, e.g.: In file
>>>>> included from /usr/include/linux/if_ether.h:107, from 
>>>>> /usr/include/linux/netdevice.h:29, from sch_xcp.c:8: - this
>>>>> specified include directory is only in 2.6.x, not 2.4.x:
>>>>> -I/lib/modules/`uname -r`/build/include/asm/mach-default
>>>>> 
>>>>> It's not clear to me how this makefile could work with 2.4.x at
>>>>> all. Is it supposed to, or that's just what you want to see it do?
>>>>> 
>>>>> 
>>>>> You could try to fix the Makefile based on makefile-changes
>>>>> articles at lwn.net. E.g.: http://lwn.net/Articles/151784/ 
>>>>> http://lwn.net/Articles/79984/ http://lwn.net/Articles/74767/ 
>>>>> http://lwn.net/Articles/69148/ http://lwn.net/Articles/21823/
>>>>> 
>>>>> 
>>>>> 
>>>>>>> On Sat, 8 Apr 2006 19:18:47 -0400 (EDT) George P Nychis
>>>>>>> wrote:
>>>>>>> 
>>>>>>>> Yeah, this module is unfortunately not under the GPL, it
>>>>>>>> was made for research and i am not the author, I was only
>>>>>>>> given the code for my own research.
>>>>>>>> 
>>>>>>>> I enabled that support in the kernel, and then tried to 
>>>>>>>> recompile and get tons of errors/warnings... so maybe I am 
>>>>>>>> missing something else to be enabled in the kernel... here
>>>>>>>> are a few examples of errors:
>>>>>>>> /usr/include/linux/skbuff.h:30:26: net/checksum.h: No such
>>>>>>>> file or directory /usr/include/asm/irq.h:16:25:
>>>>>>>> irq_vectors.h: No such file or directory
>>>>>>>> /usr/include/linux/irq.h:72: error: `NR_IRQS' undeclared
>>>>>>>> here (not in a function) /usr/include/asm/hw_irq.h:28:
>>>>>>>> error: `NR_IRQ_VECTORS' undeclared here (not in a function)
>>>>>>>> 
>>>>>>>> I think those are the top most errors, so if i can fix
>>>>>>>> those hopefully the rest shall vanish!
>>>>>>> 
>>>>>>> Looks like a Makefile problem then.  Can you post the
>>>>>>> Makefile? Hopefully it is using a Makefile and not just an
>>>>>>> elaborate gcc command line.
>>>>>>> 
>>>>>>> [and please don't top-post]
>>>>>>> 
>>>>>>>> - George
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8
>>>>>>>>> Apr 2006 18:47:34 -0400 (EDT)
>>>>>>>>> 
>>>>>>>>>> Hey,
>>>>>>>>>> 
>>>>>>>>>> I have a kernel module that uses unregister_qdisc and 
>>>>>>>>>> register_qdisc, whenever i try to insert the module I
>>>>>>>>>> get: /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
>>>>>>>>>> unresolved symbol unregister_qdisc 
>>>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
>>>>>>>>>> unresolved symbol register_qdisc
>>>>>>>>>> 
>>>>>>>>>> Am i missing some sort of support in the kernel?
>>>>>>>>> 
>>>>>>>>> Make sure CONFIG_NET_SCHED is enabled and that you
>>>>>>>>> compiled your module against that kernel.
>>>>>>>>> 
>>>>>>>>> Where does this sch_xcp come from?  It's not in the
>>>>>>>>> vanilla sources.
>>>>>>>>> 
>>>>>>>>> Also, please direct networking questions to the 
>>>>>>>>> netdev@vger.kernel.org mailing list which I have added to
>>>>>>>>> the CC:.
>>>>> 
>>>>> --- ~Randy
>>>>> 
>>>>> 
>>>> 
>>>> By the way, if I add -I/usr/src/linux/include to the compile line,
>>>> it successfully compiles, however, i am back to the start:
>>>> lanthanum-ini src-1.0.1 # insmod sch_xcp Using 
>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o 
>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol 
>>>> unregister_qdisc /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol 
>>>> register_qdisc
>>> 
>>> Yet your 2.4.32 kernel image file does have those symbols in it? Can
>>> you verify that by using 'nm' on the kernel image file?
>>> 
>>> If so, then I suppose that you'll need to make a small module test
>>> case that exhibits this behavior, or just tell us where to get the
>>> sch_xcp files...
>>> 
>>> (re-added cc: for netdev)
>>> 
>>> --- ~Randy
>>> 
>>> 
>> 
>> By kernel image, do you mean /usr/src/linux/vmlinux ? if so, 
>> lanthanum-ini linux # nm vmlinux | grep register_qdisc c0399200 R
>> __kstrtab_register_qdisc c0399240 R __kstrtab_unregister_qdisc c039ebc8 R
>> __ksymtab_register_qdisc c039ebd0 R __ksymtab_unregister_qdisc c02eda40 T
>> register_qdisc c02edaf0 T unregister_qdisc
> 
> Yes.  That's good, then.
> 
> --- ~Randy
> 
> 

*sigh* ... still getting the unresolved symbols, i totally don't get it, my /usr/src/linux/vmlinux says that the symbols exist, i install the kernel, reboot, and still get the same errors

Any other way of doing this or reason i can find out whats causing this?

thanks for your help

^ permalink raw reply

* Re: 2.4.32: unresolved symbol unregister_qdisc
From: Randy.Dunlap @ 2006-04-10  3:29 UTC (permalink / raw)
  To: George P Nychis; +Cc: linux-kernel, netdev
In-Reply-To: <2595.128.2.140.234.1144639201.squirrel@128.2.140.234>

On Sun, 9 Apr 2006 23:20:01 -0400 (EDT) George P Nychis wrote:

> 
> > On Sun, 9 Apr 2006 22:49:50 -0400 (EDT) George P Nychis wrote:
> > 
> >> 
> >>> On Sun, 9 Apr 2006 22:05:33 -0400 (EDT) George P Nychis wrote:
> >>> 
> >>>> 
> >>>>> On Sun, 9 Apr 2006 13:37:25 -0400 (EDT) George P Nychis wrote:
> >>>>> 
> >>>>>> Thanks for the help.
> >>>>>> 
> >>>>>> Here is the makefile:
> >>>>>> http://rafb.net/paste/results/auchPH75.html
> >>>>>> 
> >>>>>> And here is the full errors I receive: 
> >>>>>> http://rafb.net/paste/results/Qplpqw74.html
> >>>>>> 
> >>>>>> Greatly appreciate it
> >>>>>> 
> >>>>>> - George
> >>>>> 
> >>>>> [repeat: please don't top-post]
> >>>>> 
> >>>>> I don't know how much I can help you.  It's been a long time
> >>>>> since I've built external modules on 2.4.x.
> >>>>> 
> >>>>> Problems that I see: - the Makefile does not use the expected 2.4
> >>>>>  kernel build infrastructure; - kernel Makefile uses -nostdinc to
> >>>>>  prevent use of userspace headers; - Makefile is trying to
> >>>>> include userspace headers instead of kernel headers, e.g.: In file
> >>>>> included from /usr/include/linux/if_ether.h:107, from 
> >>>>> /usr/include/linux/netdevice.h:29, from sch_xcp.c:8: - this
> >>>>> specified include directory is only in 2.6.x, not 2.4.x:
> >>>>> -I/lib/modules/`uname -r`/build/include/asm/mach-default
> >>>>> 
> >>>>> It's not clear to me how this makefile could work with 2.4.x at
> >>>>> all. Is it supposed to, or that's just what you want to see it do?
> >>>>> 
> >>>>> 
> >>>>> You could try to fix the Makefile based on makefile-changes
> >>>>> articles at lwn.net. E.g.: http://lwn.net/Articles/151784/ 
> >>>>> http://lwn.net/Articles/79984/ http://lwn.net/Articles/74767/ 
> >>>>> http://lwn.net/Articles/69148/ http://lwn.net/Articles/21823/
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>>>> On Sat, 8 Apr 2006 19:18:47 -0400 (EDT) George P Nychis
> >>>>>>> wrote:
> >>>>>>> 
> >>>>>>>> Yeah, this module is unfortunately not under the GPL, it
> >>>>>>>> was made for research and i am not the author, I was only
> >>>>>>>> given the code for my own research.
> >>>>>>>> 
> >>>>>>>> I enabled that support in the kernel, and then tried to 
> >>>>>>>> recompile and get tons of errors/warnings... so maybe I am 
> >>>>>>>> missing something else to be enabled in the kernel... here
> >>>>>>>> are a few examples of errors:
> >>>>>>>> /usr/include/linux/skbuff.h:30:26: net/checksum.h: No such
> >>>>>>>> file or directory /usr/include/asm/irq.h:16:25:
> >>>>>>>> irq_vectors.h: No such file or directory
> >>>>>>>> /usr/include/linux/irq.h:72: error: `NR_IRQS' undeclared
> >>>>>>>> here (not in a function) /usr/include/asm/hw_irq.h:28:
> >>>>>>>> error: `NR_IRQ_VECTORS' undeclared here (not in a function)
> >>>>>>>> 
> >>>>>>>> I think those are the top most errors, so if i can fix
> >>>>>>>> those hopefully the rest shall vanish!
> >>>>>>> 
> >>>>>>> Looks like a Makefile problem then.  Can you post the
> >>>>>>> Makefile? Hopefully it is using a Makefile and not just an
> >>>>>>> elaborate gcc command line.
> >>>>>>> 
> >>>>>>> [and please don't top-post]
> >>>>>>> 
> >>>>>>>> - George
> >>>>>>>> 
> >>>>>>>> 
> >>>>>>>>> From: "George P Nychis" <gnychis@cmu.edu> Date: Sat, 8
> >>>>>>>>> Apr 2006 18:47:34 -0400 (EDT)
> >>>>>>>>> 
> >>>>>>>>>> Hey,
> >>>>>>>>>> 
> >>>>>>>>>> I have a kernel module that uses unregister_qdisc and 
> >>>>>>>>>> register_qdisc, whenever i try to insert the module I
> >>>>>>>>>> get: /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
> >>>>>>>>>> unresolved symbol unregister_qdisc 
> >>>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>>>>>>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o:
> >>>>>>>>>> unresolved symbol register_qdisc
> >>>>>>>>>> 
> >>>>>>>>>> Am i missing some sort of support in the kernel?
> >>>>>>>>> 
> >>>>>>>>> Make sure CONFIG_NET_SCHED is enabled and that you
> >>>>>>>>> compiled your module against that kernel.
> >>>>>>>>> 
> >>>>>>>>> Where does this sch_xcp come from?  It's not in the
> >>>>>>>>> vanilla sources.
> >>>>>>>>> 
> >>>>>>>>> Also, please direct networking questions to the 
> >>>>>>>>> netdev@vger.kernel.org mailing list which I have added to
> >>>>>>>>> the CC:.
> >>>>> 
> >>>>> --- ~Randy
> >>>>> 
> >>>>> 
> >>>> 
> >>>> By the way, if I add -I/usr/src/linux/include to the compile line,
> >>>> it successfully compiles, however, i am back to the start:
> >>>> lanthanum-ini src-1.0.1 # insmod sch_xcp Using 
> >>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o 
> >>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol 
> >>>> unregister_qdisc /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: 
> >>>> /lib/modules/2.4.32/kernel/net/sched/sch_xcp.o: unresolved symbol 
> >>>> register_qdisc
> >>> 
> >>> Yet your 2.4.32 kernel image file does have those symbols in it? Can
> >>> you verify that by using 'nm' on the kernel image file?
> >>> 
> >>> If so, then I suppose that you'll need to make a small module test
> >>> case that exhibits this behavior, or just tell us where to get the
> >>> sch_xcp files...
> >>> 
> >>> (re-added cc: for netdev)
> >>> 
> >>> --- ~Randy
> >>> 
> >>> 
> >> 
> >> By kernel image, do you mean /usr/src/linux/vmlinux ? if so, 
> >> lanthanum-ini linux # nm vmlinux | grep register_qdisc c0399200 R
> >> __kstrtab_register_qdisc c0399240 R __kstrtab_unregister_qdisc c039ebc8 R
> >> __ksymtab_register_qdisc c039ebd0 R __ksymtab_unregister_qdisc c02eda40 T
> >> register_qdisc c02edaf0 T unregister_qdisc
> > 
> > Yes.  That's good, then.
> > 
> > --- ~Randy
> > 
> > 
> 
> *sigh* ... still getting the unresolved symbols, i totally don't get it, my /usr/src/linux/vmlinux says that the symbols exist, i install the kernel, reboot, and still get the same errors

Yes, I understood that.

> Any other way of doing this or reason i can find out whats causing this?

Well, one of the makefile gods can step in and spot the problem, or you can
create a test case so that others can try to help out with it.  Or tell us
where to get the code that you are using.

> thanks for your help

---
~Randy

^ permalink raw reply

* [RFC/PATCH] remove unneeded check in bcm43xx
From: Benoit Boissinot @ 2006-04-10  4:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, bcm43xx-dev

Since the driver already sets the correct dma_mask, there is no reason
to bail there. In fact if you have an iommu, I think you can have a
address above 1G which will be ok for the device (if it isn't true then
the powerpc dma_alloc_coherent with iommu needs to be fixed because it
doesn't respect the the dma_mask).

Please comment or apply.

Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.fr>

Index: linux/drivers/net/wireless/bcm43xx/bcm43xx_dma.c
===================================================================
--- linux.orig/drivers/net/wireless/bcm43xx/bcm43xx_dma.c
+++ linux/drivers/net/wireless/bcm43xx/bcm43xx_dma.c
@@ -194,14 +194,6 @@ static int alloc_ringmemory(struct bcm43
 		printk(KERN_ERR PFX "DMA ringmemory allocation failed\n");
 		return -ENOMEM;
 	}
-	if (ring->dmabase + BCM43xx_DMA_RINGMEMSIZE > BCM43xx_DMA_BUSADDRMAX) {
-		printk(KERN_ERR PFX ">>>FATAL ERROR<<<  DMA RINGMEMORY >1G "
-				    "(0x%08x, len: %lu)\n",
-		       ring->dmabase, BCM43xx_DMA_RINGMEMSIZE);
-		dma_free_coherent(dev, BCM43xx_DMA_RINGMEMSIZE,
-				  ring->vbase, ring->dmabase);
-		return -ENOMEM;
-	}
 	assert(!(ring->dmabase & 0x000003FF));
 	memset(ring->vbase, 0, BCM43xx_DMA_RINGMEMSIZE);
 
@@ -303,14 +295,6 @@ static int setup_rx_descbuffer(struct bc
 	if (unlikely(!skb))
 		return -ENOMEM;
 	dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0);
-	if (unlikely(dmaaddr + ring->rx_buffersize > BCM43xx_DMA_BUSADDRMAX)) {
-		unmap_descbuffer(ring, dmaaddr, ring->rx_buffersize, 0);
-		dev_kfree_skb_any(skb);
-		printk(KERN_ERR PFX ">>>FATAL ERROR<<<  DMA RX SKB >1G "
-				    "(0x%08x, len: %u)\n",
-		       dmaaddr, ring->rx_buffersize);
-		return -ENOMEM;
-	}
 	meta->skb = skb;
 	meta->dmaaddr = dmaaddr;
 	skb->dev = ring->bcm->net_dev;
@@ -726,13 +710,6 @@ static int dma_tx_fragment(struct bcm43x
 
 	meta->skb = skb;
 	meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
-	if (unlikely(meta->dmaaddr + skb->len > BCM43xx_DMA_BUSADDRMAX)) {
-		return_slot(ring, slot);
-		printk(KERN_ERR PFX ">>>FATAL ERROR<<<  DMA TX SKB >1G "
-				    "(0x%08x, len: %u)\n",
-		       meta->dmaaddr, skb->len);
-		return -ENOMEM;
-	}
 
 	desc_addr = (u32)(meta->dmaaddr + ring->memoffset);
 	desc_ctl = BCM43xx_DMADTOR_FRAMESTART | BCM43xx_DMADTOR_FRAMEEND;

^ permalink raw reply

* Re: [RFC/PATCH] remove unneeded check in bcm43xx
From: Michael Buesch @ 2006-04-10  4:07 UTC (permalink / raw)
  To: Benoit Boissinot
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linville-2XuSBdqkA4R54TAoqtyWWQ,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r
In-Reply-To: <20060410040120.GA4860-vYW+cPY1g1pWj0EZb7rXcA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

On Monday 10 April 2006 06:01, you wrote:
> Since the driver already sets the correct dma_mask, there is no reason
> to bail there. In fact if you have an iommu, I think you can have a
> address above 1G which will be ok for the device (if it isn't true then
> the powerpc dma_alloc_coherent with iommu needs to be fixed because it
> doesn't respect the the dma_mask).
> 
> Please comment or apply.

NACK. Don't apply that patch.
I know it is odd, but people are actually hitting these messages.
Maybe benh can explain the issues. I don't know...

-- 
Greetings Michael.

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox