Re: can't compile kernel without bpf
Ivan Doleal wrote: As for kernel compilation (wireless does need bpf), this was it! The new 802.11 layer (device wlan) and some WiFi device drivers (ath and wi) uses the bpfattach2() function call. The bpfattach2() implementation has no stub counterpart in non-bpf section of net/bpf.c, so the kernel can't be succesfully linked without BPF support. It's the immediate cause why we need bpf in kernel now. The question is - is presence of bpf mandatory for functionality of 802.11 devices ? I think the correct answer is NO, so it's bug and stub bpfattach2() should be added to apropriate place of net/bpf.c. But I'm not sure. Someone who know should decide and send PR ... Dan ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Added volume stepping to mixer
[EMAIL PROTECTED] wrote, On 01/06/03 18:53: Last week I modified the mixer to support volume stepping. Having a Sample usage: Increasing: [daren@wee mixer]$mixer -i 5:5 Increasing the mixer vol from 40:40 to 45:45. [daren@wee mixer]$ Decreasing: [daren@wee mixer]$mixer -d vol 10 Decreasing the mixer vol from 45:45 to 35:35. [daren@wee mixer]$ Mixer can change volume for more than one device within one invocation. So, what about more generic way to implement stepping ? You may want to increase volume on one input simultaneously decreasing the volume on another input. Your can't do it in one step. Let's implement stepping according to followint example: [dan@~]$mixer vol 40:40 line1 +15:+15 line2 -10 Set volume for 'vol' to absolute value 40:40, increase line1's volume by 15 and decreasing line2's volume by 10 (both channel). It seems to be more generic way to me ... The change is backward compatible with current command line format. The patch for manual page should be reviewed by someone with better knowledge of english. The patch can be applied to stable also. Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] *** mixer.c.ORIGTue Aug 7 20:15:10 2001 --- mixer.c Tue Jan 7 10:48:06 2003 *** *** 23,41 #include stdlib.h #include unistd.h #include sys/soundcard.h const char *names[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES; void usage(int devmask, int recmask); int res_name(const char *name, int mask); void print_recsrc(int recsrc); void usage(int devmask, int recmask) { int i, n; ! printf(usage: mixer [-f device] [-s] [[dev [voll[:volr]] | recsrc | {^|+|-|=}rec recdev] ... ]\n); printf( devices: ); for (i = 0, n = 0; i SOUND_MIXER_NRDEVICES; i++) if ((1 i) devmask) { --- 23,43 #include stdlib.h #include unistd.h #include sys/soundcard.h + #include ctype.h const char *names[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES; void usage(int devmask, int recmask); int res_name(const char *name, int mask); void print_recsrc(int recsrc); + int get_vol(char *string, int *l, int *r, int *dl, int *dr); void usage(int devmask, int recmask) { int i, n; ! printf(usage: mixer [-f device] [-s] [[dev [[+|-]voll[:[+|-]volr]] | recsrc | {^|+|-|=}rec recdev] ... ]\n); printf( devices: ); for (i = 0, n = 0; i SOUND_MIXER_NRDEVICES; i++) if ((1 i) devmask) { *** *** 84,96 fprintf(stderr, \n); } int main(int argc, char *argv[]) { int foo, bar, baz, dev; int devmask = 0, recmask = 0, recsrc = 0, orecsrc; int dusage = 0, drecsrc = 0, shortflag = 0; ! int l = 0, r = 0, t = 0; char ch; char *name; --- 86,158 fprintf(stderr, \n); } + #define PLUSSIGN '+' + #define MINUSSIGN '-' + #define DELIMITER ':' + int + get_vol(char *string, int *l, int *r, int *dl, int *dr) + { + char *sptr = string; + char *endptr; + long int value; + + while(isspace(*sptr)) + sptr++; + + /* if dl==NULL revert to old (non [+|-]) syntax */ + if (dl != NULL) { + if (*sptr == PLUSSIGN) { + *dl = 1; + sptr++; + } else if (*sptr == MINUSSIGN) { + *dl = -1; + sptr++; + } else + *dl = 0; + } + /* catch strings like '+-10' '++3' or '+ 2'*/ + if (!isdigit(*sptr)) + return(0); + value=strtol(sptr, endptr, 10); + if (*endptr != '\0' *endptr != DELIMITER !isspace(*endptr)) + return(0); + + *l=(int)value; + sptr=endptr; + + if (*sptr!=DELIMITER) + return(1); + + sptr++; + if (dr != NULL) { + if (*sptr == PLUSSIGN) { + *dr = 1; + sptr++; + } else if (*sptr == MINUSSIGN) { + *dr = -1; + sptr++; + } else + *dr = 0; + } + /* catch strings like '+-10' '++3' or '+ 2'*/ + if (!isdigit(*sptr)) + return(1); + value=strtol(sptr, endptr, 10); + if (*endptr != '\0' !isspace(*endptr)) + return(1); + + *r=(int)value; + + return(2); + } + int main(int argc, char *argv[]) { int foo, bar, baz, dev; int devmask = 0, recmask = 0, recsrc = 0, orecsrc; int dusage = 0, drecsrc = 0, shortflag = 0; ! int l = 0, r = 0, t = 0, dl = 0, dr = 0; char ch; char *name; *** *** 181,187
Re: VLAN v.s. NIC with VLAN hardware support bug.
Hiten Pandya wrote: On Sat, Dec 21, 2002 at 02:42:30AM +0100, Dan Lukes wrote the words in effect of: Dan, I believe you submitted a PR about this [1], what does patch try to solve, regarding VLAN hardware support? [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/46405 Hi. May be, I'm doesn't understand fully what you are asked for - my english isn't as good as should be. The problem: NIC with hardware VLAN support pass whole TAG to vlan_input(_tag). The TAG has the following structure: TAG 0x8000 - CFI (TAG 0x7000)13 - priority TAG 0x0FFF - VLAN ID The vlan_input(_tag) doesn't extract the VLAN ID from tag, it tried match the whole tag to configured VLAN's. It work - unless CFI or an priority bit has nonzero value. An example: you have configured VLAN 256 on your FreeBSD. The arrived packed has TAG 0x0100 (=256). For this packet it works, as TAG matched configured VLAN. Lets another packet has TAG 0x4100 (=16640). It's dropped because there are no configured vlan with ID 16640 - but should not be dropped, as it IS packed for VLAN 256 with priority 4. In short - vlan_input(_tag) doesn't extract the correct bits from TAG, so it drop packets that shouldn't be dropped. It's the bug fixed by my patches. I tested it on 4.7. The patch for CURRENT isn't tested, but it's simple to analyse that there are the same problem. It's the sufficient answer to your question ? Please note (it's mentioned in my PR also), the vlan code doesn't correctly handle the VLAN ID of zero which has special meaning . My patches doesn't solve it. Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
VLAN v.s. NIC with VLAN hardware support bug.
If there somebody failing to configure vlans on a nic with vlan-hardware support - read the PR 46405 (patch attached). It's apply to both current and stable. Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: VLAN v.s. NIC with VLAN hardware support bug.
Daniel C. Sobral wrote, On 12/21/02 00:31: Dan Lukes wrote: If there somebody failing to configure vlans on a nic with vlan-hardware support - read the PR 46405 (patch attached). It's apply to both current and stable. Does fxp have hardware support for vlans? I use vlans extensively and never noticed a problem. IFAIK no. I tried it also during debug of my problem. But it doesn't support 1000BaseTX, so it isn't decision for my purpose. The only cards with HW vlan support on STABLE are nge, bge, txp, gx, em, ti (ti aren't affected by reported bug as it strips the priority bits at driver level). Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: VLAN v.s. NIC with VLAN hardware support bug.
At 10:22 PM 20/12/2002 +0100, Dan Lukes wrote: If there somebody failing to configure vlans on a nic with vlan-hardware support - read the PR 46405 (patch attached). Mike Tancsa wrote, On 12/20/02 22:46: Does this bug show up in the trunk ports statistics as runt packets ? Did you mean the statistics on switch ? No, it doesn't affect the switch statistic because bug is in receive part of FreeBSD driver - it doesn't affect packets sent out to switch. Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: ipfw userland breaks again.
[EMAIL PROTECTED] wrote, On 12/14/02 23:13: I have a patch here which makes the IPFIREWALL_DEFAULT_TO_ACCEPT tunable at module load time using a kernel environment variable. Looks to me that it would do what you want. Should we think about kldload logic change ? Loading modules giving them a parameter string parsed on MOD_LOAD event seems to be most generic way to do the things (not only with ipfw) ... The syscall allow arbitrary string as parameter, so it's not limited to filename only, event routine declaration already has the void *data variable, so the necesarry changes doesn't hit the userland (kldload) nor modules code (unless they decide to parse the parameters). Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Creating bootsector file for W2k boot menu
[EMAIL PROTECTED] wrote, On 12/05/02 17:06: On 2002-12-05 00:22, Tomi Vainio - Sun Finland - wrote: I've used Windows NT boot menu for years to boot FreeBSD from the second disk on my machines. I've used bootpart DOS program to do this but now I can't find correct way to do FreeBSD boot block for it. Earlier there was a diskid definition in some Makefile to change. How should I do this now? ... # dd if=/dev/ad0s1 of=/root/bsdboot.bin bs=512 count=1 Then copy bsdboot.bin to a Windows partition, say in C:\BSDBOOT.BIN and add the following to the C:\BOOT.INI file: C:\BSDBOOT.BIN=FreeBSD on ad0s1 That should be all... Just use /boot/boot1 ( NOT /boot/boot0 !) instead of extracting this file by dd ... Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: buildworld fails on x86
On Friday 22 November 2002 09.03, David Holm wrote: Hi, I've tried to build world since yesterday, doing cvsup's inbetween hopi= ng for a fix. But it always fails on bin/cat with a bunch of unresolvable pthread symbols at linking. I have cleared out my old /usr/obj. cat cat.o /usr/obj/usr/src/i386/usr/lib/libc.a(atexit.o): In function `atexit': atexit.o(.text+0xc7): undefined reference to `_pthread_mutex_unlock' atexit.o(.text+0xd8): undefined reference to `_pthread_mutex_lock' atexit.o(.text+0xe8): undefined reference to `_pthread_mutex_unlock' atexit.o(.text+0x109): undefined reference to `_pthread_mutex_lock' atexit.o(.text+0x11a): undefined reference to [EMAIL PROTECTED] wrote, On 11/22/02 11:52: Ok, found it. I forgot to disable my CFLAGS for ports ;). Well, we shouldn't use optimisation (-O3) during buildworlds as it's not recommended. On the oposite side, we should try to produce the optimisable source code. The problem you hit is that the pthread stub functions as declared within src/lib/libc/gen/_pthread_stubs.c are optimized-out by -O3 causing undefined symbol errors later during build. I don't know if it is gcc's optimiser bug or there is something wrong with _pthread_stubs.c code, but someone who knows should report and/or repair it. Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: SMP stability ? [was Re: more info from panic from running
[EMAIL PROTECTED] wrote, On 11/17/02 18:34: I haven't been able to complete a full buildworld with an SMP on a Abit BP6 (bi-celeron) board for two weeks (the kernel config is just a full GENERIC with SMP and APICIO options enabled). I also am running a BP6. IS ANYONE successfully running an ABIT BP6 motherboard on a SMP kernel with -current? What BIOS version are running? I'm one version behind I think, so I'm going to upgrade and see if that makes any difference. Yes, I am. The BIOS is the latest -RU revision (if I remembered correctly) with custom patch (original HPT366 part of BIOS replaced by version 1.28-beta) - but I think this patch has no effecto to FreeBSD. No ACPI is enabled in BIOS configuration, KERNEL is custom. The -current environment isn't used for any work, just for periodic cvsup makeworld installworld The SMP kernels are unable to run several weeks due a problem with Giant lock, but it is working now. The only current -current's problem known to me is that linc is broken when compilled with -O3 as some pthread stubs functions is optimized-out from resulting library (e.g. you can't sucessfully link other programs, also dynamically linked binaries doesn't load and run due unresolved symbols). Even make -j1 buildworld with the SMP kernel ends with a complete freeze of the machine (the kernel does not go to a panic where I could try a backtrace) Exactly! Hard Lock, no panic, no keyboard, no choices other than = reset. NAK. My BP6 did it with no problem. Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: boot0cfg -B
[EMAIL PROTECTED] wrote, On 11/18/02 07:52: Any reason why this doesn't work ? sheelsudo boot0cfg -B ad0 boot0cfg: /dev/ad0: Operation not permitted securelevel too high ? Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message