Björn Döbel | 1 Mar 18:33
Picon
Favicon

Re: Problem with starting ORe


Hi,

bad news: it works for me on my e1000 test machine and on Qemu.

Can you try to run your setup in Qemu (-net nic,model=e1000,vlan=0 -net
tap,vlan=0)?

 Bjoern
Alexander Valitov | 2 Mar 17:16
Picon

Re: Problem with starting ORe


Hi,

Björn Döbel wrote:
> 
> bad news: it works for me on my e1000 test machine and on Qemu.
> 

I'm sure it does as my binary ORe module works with another e1000 series
network card. It don't work with only one particular NIC type 8086:1076
(VendorID:DeviceID).

good news: I manage to get it running. It looks like problem was due to bug
in DDE library.

let's look at function ioremap() in file
/l4/pkg/dde/linux26/lib/src/arch/l4/res.c (revision 433):

void __iomem * ioremap(unsigned long phys_addr, unsigned long size)
{
	struct list_head *pos, *head;
	head = &dde_mem_regions;

	list_for_each(pos, head) {
		struct dde_mem_region *mreg = list_entry(pos, struct dde_mem_region,
		                                         list);
		if (mreg->pa >= phys_addr && mreg->pa + mreg->size > phys_addr)
			return (void *)(mreg->va + (phys_addr - mreg->pa));
	}

(Continue reading)

Björn Döbel | 3 Mar 08:48
Picon
Favicon

Re: Problem with starting ORe


Hi,

> good news: I manage to get it running. It looks like problem was due to bug
> in DDE library.

Ack. Patch applied. Thanks for finding this.

Bjoern
Alexander Valitov | 3 Mar 15:29
Picon

Possible bug in e1000 driver from ORe package


Hi,

There is possible bug in e1000 driver from ORe package.
The heart of the problem is that e1000_probe() function in
/trunk/l4/pkg/ore/server/lib26/net/e1000/e1000_main.c file does NOT set
'irq' field in 'net_device' structure (e.g. with assignment netdev->irq =
pdev->irq;). Instead it stores pointer to pci_device structure and uses its
'irq' field value (like this adapter->pdev->irq).

As a result ORe always outputs message like this one (because it uses
netdev->irq value):

ore     | Device =   lo, IRQ =  0, MAC = 00:00:00:00:00:00
ore     | Device = eth0, IRQ = 0, MAC = 00:30:18:49:F9:DA
ore     | Device = eth1, IRQ = 0, MAC = 00:30:18:49:F9:DB

And when I try to boot L4Linux with ORe stub driver, the driver fails to
init device due to wrong irq number:

eth0: Overwriting IRQ type for IRQ 0 with l4ore type!
eth0: request_irq(0, ...)

EBUSY is returned.

Solution is obvious but unfortunately it changes original e1000 Linux
driver. That's why I'm not sure that it is proper way to fix the problem.
Here is.
===================================================================
--- e1000_main.c        (revision 433)
(Continue reading)

Alexander Valitov | 3 Mar 16:22
Picon

Problem with L4Linux ORe stub driver


Hi,

I'm trying to run L4Linux with ORe. I can successfully run L4Linux without
ORe and can run ORe without L4Linux (arping works). But when I try to run
L4Linux with ORe, boot process hangs up after message from stub driver:

eth0: Overwriting IRQ type for IRQ 10 with l4ore type!
eth0: request_irq(10, ...)
l4lx    | l4x_ore_irq_startup
l4lx    | l4lx_thread_create: Created thread 10.0b (L4OreRcv)
eth0: interface up.

After some time a following message (with some additional info - see it in a
boot log given at the end of letter) appears:

BUG: soft lockup - CPU#0 stuck for 61s! [pump:92]

I guess it caused by the ORe stub driver but it's only guess.
What could it be? What could I try to do?

Here is my 'L4Linux cfg file' and 'boot log':

L4Linux cfg file:

task "vmlinuz4" "earlyprintk=yes mem=64M load_ramdisk=1 ramdisk_size=16384
root=/dev/ram l4env_rd=drops.rd"
  all_sects_writable
  allow_vga
  allow_cli
(Continue reading)

Björn Döbel | 3 Mar 17:05
Picon
Favicon

Re: Possible bug in e1000 driver from ORe package


Hi,

> There is possible bug in e1000 driver from ORe package.
> The heart of the problem is that e1000_probe() function in
> /trunk/l4/pkg/ore/server/lib26/net/e1000/e1000_main.c file does NOT set
> 'irq' field in 'net_device' structure (e.g. with assignment netdev->irq =
> pdev->irq;). Instead it stores pointer to pci_device structure and uses its
> 'irq' field value (like this adapter->pdev->irq).
> 
> As a result ORe always outputs message like this one (because it uses
> netdev->irq value):
> 
> ore     | Device =   lo, IRQ =  0, MAC = 00:00:00:00:00:00
> ore     | Device = eth0, IRQ = 0, MAC = 00:30:18:49:F9:DA
> ore     | Device = eth1, IRQ = 0, MAC = 00:30:18:49:F9:DB
> 
> And when I try to boot L4Linux with ORe stub driver, the driver fails to
> init device due to wrong irq number:
> 
> eth0: Overwriting IRQ type for IRQ 0 with l4ore type!
> eth0: request_irq(0, ...)
> 
> EBUSY is returned.

Hmm. In this case, this would be a bug in Linux' 2.6.20.19 e1000 driver.
Do you know if (and how) this has been fixed in some recent version? If
so, a future update will fix this bug and you should use your workaround
until then.

(Continue reading)

Alexander Valitov | 4 Mar 09:04
Picon

Re: Possible bug in e1000 driver from ORe package


Hi,

Björn Döbel wrote:
> 
> 
> Hmm. In this case, this would be a bug in Linux' 2.6.20.19 e1000 driver.
> Do you know if (and how) this has been fixed in some recent version? If
> so, a future update will fix this bug and you should use your workaround
> until then.
> 
> 

I’ve performed short investigation. It looks like the issue isn’t fixed in
Linux 2.6.28.7 yet. But problem is known. It was reported to driver
developers in maillist
http://www.mail-archive.com/e1000-devel <at> lists.sourceforge.net/msg00496.html.
Unfortunately from mentioned thread it is not clear was the patch accepted
by developers or not. So additionally I’ve checked is the patch applied to
working kernel branch in git repo. It is not. So there is strong possibility
that the patch was rejected.
In this case I forced to use my patched version of e1000 driver.

Regards, Alexander Valitov
--

-- 
View this message in context: http://www.nabble.com/Possible-bug-in-e1000-driver-from-ORe-package-tp22309613p22325327.html
Sent from the L4 mailing list archive at Nabble.com.

_______________________________________________
l4-hackers mailing list
(Continue reading)

Björn Döbel | 4 Mar 10:06
Picon
Favicon

Re: Possible bug in e1000 driver from ORe package


Hi,

> I’ve performed short investigation. It looks like the issue isn’t fixed in
> Linux 2.6.28.7 yet. But problem is known. It was reported to driver
> developers in maillist
> http://www.mail-archive.com/e1000-devel <at> lists.sourceforge.net/msg00496.html.
> Unfortunately from mentioned thread it is not clear was the patch accepted
> by developers or not. So additionally I’ve checked is the patch applied to
> working kernel branch in git repo. It is not. So there is strong possibility
> that the patch was rejected.
> In this case I forced to use my patched version of e1000 driver.

Sure, go ahead and use it. And thanks for pointing this out so that
others may use this patch if they bash into this issue.

I won't apply this patch to ORe, though, exactly because we don't want
to mess with the imported drivers.

Cheers,
Bjoern
Björn Döbel | 4 Mar 10:07
Picon
Favicon

Re: Problem with L4Linux ORe stub driver


Hi,

I'll try to reproduce this, but this will probably take some time. :/

Bjoern
Alexander Valitov | 4 Mar 10:14
Picon

Question about ORs stub driver behavior


Hi,

When ORe stub driver initializes virtual interface in l4x_ore_init_device()
function, It tries to allocate hardware MAC address for all devices EXCEPT
"lo" device:

if (strcmp(devname, "lo"))
	priv->config.ro_keep_device_mac = 1;
else
	priv->config.ro_keep_device_mac = 0;

Here if devname=="lo" then strcmp() returns 0 and we tries to get virtual
MAC for "lo".
Is it intended behavior?
Why do we need HW MAC for HW NIC and virtual one for "lo"?
How in this case several Linux instances will use the same HW MAC?

Best Regards, Alexander Valitov
--

-- 
View this message in context: http://www.nabble.com/Question-about-ORs-stub-driver-behavior-tp22326115p22326115.html
Sent from the L4 mailing list archive at Nabble.com.

Gmane