Skip to contentSkip to conversation

dvbnet not working anymore with 2.6.25

linux-dvb Francesco Schiavarelli 1 participant 4 messages May 11, 2008 – Oct 6, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hello,

I'm using debian/testing and dvbnet included in dvb-utils with in-kernel v4l/dvb modules.
I am able to receive IP datagrams with stock kernel 2.6.22-3-686. After upgrading to 2.6.25-1-686 I have an error message whenever I try to bring up the dvb virtual network interface.
Here is what I try:

# dvbnet -p 775

DVB Network Interface Manager
Version 1.1.0-TVF (Build Mon Aug 06 21:44:42 2007) Copyright (C) 2003, TV Files S.p.A

Device: /dev/dvb/adapter0/net0
Status: device dvb0_0 for pid 775 created successfully.

# ifconfig dvb0_0 up
SIOCSIFFLAGS: Cannot assign requested address

and RX bytes stays to zero:

# ifconfig dvb0_0
dvb0_0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
           BROADCAST NOARP MULTICAST  MTU:4096  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
           Base address:0x307

Even if I assign an IP address ther result is the same. Using dvb_net_debug=1 with dvb-core didn't give me any useful message.

Any help would be appreciated.

thanks,
Francesco

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#1 lore raw

I've done a bit of testing and seems like the problem it's related to kernel version and not v4l-dvb.
I've managed to compile actual v4l-dvb (rev7901) against debian kernel 2.6.18-4-486 and everything works.
Next step is checking every kernel between 2.6.22-3 and 2.6.25-1 trying to isolate the problem.

Anyone guessing which change in the kernel tree may have broken dvbnet? Suggestions are more than welcome.

Francesco

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#2 lore raw

I've narrowed down the problem to kernel version 2.6.24. This is the output with

# strace ifconfig dvb0_0 10.0.0.1 promisc up

(WORKING)
...

Quoted 11 lines

open("/usr/share/locale/en_US/LC_MESSAGES/net-tools.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/net-tools.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
ioctl(4, SIOCSIFADDR, 0xbfc8e968) = 0
ioctl(4, SIOCGIFFLAGS, {ifr_name="dvb0_0", ifr_flags=IFF_BROADCAST|IFF_NOARP|IFF_MULTICAST}) = 0
ioctl(4, SIOCSIFFLAGS, 0xbfc8e85c) = 0
ioctl(4, SIOCGIFFLAGS, {ifr_name="dvb0_0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_NOARP|IFF_MULTICAST}) = 0
ioctl(4, SIOCSIFFLAGS, 0xbfc8e85c) = 0
ioctl(4, SIOCGIFFLAGS, {ifr_name="dvb0_0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_NOARP|IFF_PROMISC|IFF_MULTICAST}) = 0
ioctl(4, SIOCSIFFLAGS, 0xbfc8e85c) = 0
exit_group(0) = ?
Process 24330 detached

(NOT WORKING)
...

Quoted 27 lines

open("/usr/share/locale/en_US/LC_MESSAGES/net-tools.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/net-tools.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
ioctl(4, SIOCSIFADDR, 0xbfc59138) = 0
ioctl(4, SIOCGIFFLAGS, {ifr_name="dvb0_0", ifr_flags=IFF_BROADCAST|IFF_NOARP|IFF_MULTICAST}) = 0

ioctl(4, SIOCSIFFLAGS, 0xbfc5902c)      = -1 EADDRNOTAVAIL (Cannot assign requested address)
dup(2)                                  = 5
fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)

fstat64(5, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f3c000
_llseek(5, 0, 0xbfc58a88, SEEK_CUR) = -1 ESPIPE (Illegal seek)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) write(5, "SIOCSIFFLAGS: Cannot assign requ"..., 46SIOCSIFFLAGS: Cannot assign requested address ) = 46
close(5) = 0
munmap(0xb7f3c000, 4096) = 0
ioctl(4, SIOCGIFFLAGS, {ifr_name="dvb0_0", ifr_flags=IFF_BROADCAST|IFF_NOARP|IFF_MULTICAST}) = 0
ioctl(4, SIOCSIFFLAGS, 0xbfc5902c) = 0
ioctl(4, SIOCGIFFLAGS, {ifr_name="dvb0_0", ifr_flags=IFF_BROADCAST|IFF_NOARP|IFF_PROMISC|IFF_MULTICAST}) = 0

ioctl(4, SIOCSIFFLAGS, 0xbfc5902c)      = -1 EADDRNOTAVAIL (Cannot assign requested address)
dup(2)                                  = 5
fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)

fstat64(5, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f3c000
_llseek(5, 0, 0xbfc58a88, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "SIOCSIFFLAGS: Cannot assign requ"..., 46SIOCSIFFLAGS: Cannot assign requested address ) = 46

Quoted 4 lines
close(5)                                = 0
munmap(0xb7f3c000, 4096)                = 0
exit_group(-1)                          = ?

Process 2778 detached

Not being a kernel hacker I was not able to investigate deeply the problem. Can it be related to new NAPI in /net/core/dev.c? I don't have a clue. Also no answers on this ml, so probably I'm alone with this problem.

thanks,
Francesco

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#3 lore raw
In reply to Francesco Schiavarelli
Quoted 11 lines · Francesco Schiavarelli

I've done a bit of testing and seems like the problem it's related to kernel version and not v4l-dvb.
I've managed to compile actual v4l-dvb (rev7901) against debian kernel 2.6.18-4-486 and everything works.
Next step is checking every kernel between 2.6.22-3 and 2.6.25-1 trying to isolate the problem.

Anyone guessing which change in the kernel tree may have broken dvbnet? Suggestions are more than welcome.

Francesco

OK, now I have an update on the subject.
With older kernels (<2.6.24) ifconfig was happy even if the mac address of dvb0_0 was all zero.
With never kernel you need to supply the mac address explicitly, like this:

dvbnet -p 1909
ifconfig dvb0_0 hw ether 00:30:1D:01:02:01
ifconfig dvb0_0 10.0.0.1 netmask 255.255.255.255 promisc up allmulti

and then everything works again as expected.
Many thanks to ChengHsin Hsu for the fix.

Francesco

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb