Re: howto determine network device unit number? device.hints?
Yony Yossef wrote: Thanks for the explanation. So there's no way to determine this in advance.. I must build a script that contains my own mapping between MAC addresses and the wanted interface names and run it after each driver load, rename the interfaces if necessary. It seems quite wrong, don't you agree? And how come the unit number is given an arbitrary value? Is there a good reason for that? Normally the PCI probe runs in the opposite direction from that of Linux. It's largely to do with how the NEWBUS code walks the PCI bus. From a systems management point of view, yeah, it's irritating, however it would probably take more effort (i.e. kernel code) to try to patch it to work differently, and not everyone has free time to sit down and patch the kernel. That and (unlike Solaris) there is no *direct* mapping between the card's driver number on the bus and its network driver number. In your case I'm not sure why your two cards would flip order. Could it be how your BIOS and hardware set up the PCI IDSEL lines at boot? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: howto determine network device unit number? device.hints?
Yony, Bruce M. Simpson wrote: And how come the unit number is given an arbitrary value? Is there a good reason for that? ... In your case I'm not sure why your two cards would flip order. Could it be how your BIOS and hardware set up the PCI IDSEL lines at boot? If this is the case on your system, then you really need to provide more data about your hardware, i.e. motherboard, BIOS, vendor information etc. as others point out. Based on the data you've provided about the issue to date, my best guess is that something in the above is different on your system (which is why I mentioned IDSEL lines -- the mechanism PCI uses to actually assign bus numbers electrically). Normally the behaviour of FreeBSD's bus probes is well known -- nexus is walked for child buses, then these buses are plumbed into NEWBUS, e.g. cpu0...cpuN on nexus itself, PCI buses, and PCI subordinate buses in that order. * You mention you don't encounter the issue with Linux, but you may already be aware that udev can tie driver instance number(s) to specific MAC addresses, although this process isn't fully automatic and any given distro may or may not create the persistent udev rules on a first run -- so this is comparing apples with oranges. * [PCI-Express is a special case though, and I've had to sit down and do some work with commercial clients to make sure their appliance was able to detect devices being in particular slot numbers. Again, though, it's just as subject to the PCI enumeration order further up on the bus hierarchy as non-PCI-Express drivers.] So your issue may not be a simple matter of this seems wrong, this doesn't work, though I am sorry to hear it isn't working for you right now. There are a lot of dynamic factors in the overall picture of the system, and what seems to work as expected for many users, may not be working for you, and we really need basic hardware information, when folk see things like this happening, for any volunteer(s) out there to come up with the right solution, let alone the true picture of what's actually going on in your specific case. thanks BMS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: howto determine network device unit number? device.hints?
Eygene Ryabinkin wrote: ... I wanted to stress only one point: simple 'kldunload driver' and 'kldload driver' makes devices to flip for Yony's case. This means that unless some PCI hotplug stuff is here (which I don't believe to be present, because no physical cards are touched and there is actually a small amount of PCI hotplug support in FreeBSD), no physical PCI devices get added or removed from the PCI child tree. It looks like that something goes wrong during the PCI tree reprobe on the driver module loading. BTW: Thanks for looking further at the software layer first. VIM is a wee bit easier to use than a bus analyzer. Most motherboards don't support PCI geographical addressing, so... I wager it's the network driver code which may be the source of the problem, based on your analysis! If this code just doing a blind bump of an instance count and using that as a unit number... well, that's OK and expected for software virtual devices, but is counter-intuitive for something like hardware. But I don't have any mtnic source, so this is pure speculation on my part. Correct me if I am wrong, but pci_driver_added from /sys/pci/pci.c will invoke device_get_children() to get the list of the attached devices, and for PCI case the list should be static. Yup, that's right. I guess that when Yony will enable verbose boot and will show us kernel messages from two successive kldunload/kldload sequences, we will get some additional information about what's going on. Hopefully he will chime in... [bms does some google searching *before* he thinks about throwing his toys out of the pram at the Orignal.Poster.] ding :-) [a light bulb above bms' head] So... Yony. you're writing a driver. Maybe there's a bug in it? That's cool, dude. Hope it's a nice card and you plan on sharing the sweets with the rest of the class. ;-) But seriously, please mention that you are writing a driver in general questions you might ask about the whole system, otherwise, FreeBSD volunteers will run around going Is core code broken? and that's not so good for community stress levels as a whole. with lemonade, BMS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Freeing an mbuf cluster
Yony Yossef wrote: Hi All, I'm trying to manually build an mbuf chain with clusters in various sizes. I'm doing it using the MGETHDR and MEXTADD macros, it works fine. Now I'm looking for the simplest way to free an mbuf cluster, since I want to free the clusters seperately. This function will be given as a parameter to MEXTADD. Is there a simple command like 'free(buf)' to free an mbuf cluster? You don't specify if you are trying to add the external storage from a pool you manage, in which case, you're on your own. m_free() for a cluster or mbuf should just do the right thing. Since the UMA cleanup there are destructor functions which should free the mbuf or cluster using the right pool. m_freem() works on chains, of course. cheers BMS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Relayd (former hoststated) status for freebsd 7.0RC1
Alexandre Vieira wrote: Hello all, I remember that there was a port (net/hoststated) where I could install hoststated to use with PF. Anyone can shed a light on what is the status of this software implementation on 7.0? Perhaps ports/net/ifstated is the answer? BMS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: PXEboot fails at kernel (text) loading
Rob wrote: Is it OK to have a double kernel read at the last two lines? Any idea what's wrong here or what I could do to further test what the actual problem is? Argh. I had this same problem as recently as October, but I can't remember exactly what caused this. When I went back and re-did things according to 'man diskless' (and what Doug White told me in the first place), it all worked. Regards, BMS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Connecting My ADSL MODEM To My FreeBSD Pc.
On Tue, Jun 21, 2005 at 08:59:38AM -0400, Stephan Weaver wrote: My Isp Uses PPPoA, i used the instructions from the handbook; Using 'mpd'. I set the ADSL router in 'bridge' mode and connect the Ethernet cable from the Dsl Router/Modem to my FreeBSD Firewall. ON the Interface vr0. But i have little success getting the results i want. [The Firewall doesn't connect to my ISP] I don't think the SpeedTouch modems support bridging from PPPoA to Ethernet to the best of my knowledge -- I only know of one very specific model of D-Link ADSL modem which will do this (DSL-500G+ I think). You'll probably have more luck using a native ATM card hooked up to the ATM-25 passthrough port on the SpeedTouch and using userland PPP to get PPPoA encapsulation through to the BSD box. We don't support PPPoA in Netgraph [yet], I have a paper design for such a thing I haven't had any free time to implement. BMS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Status of high-speed usb drivers
On Mon, Oct 18, 2004 at 09:43:13AM -0500, Davon Shire wrote: That said, I'd very much like to know where on the horizon do USB 2.0 highspeed drivers sit? I've seen that current is now into 6.0 but from what I've read USB functionality is not even on the agenda. Short answer: It doesn't work [right now]. Long answer: I don't see this getting fixed overnight, given the complexity of the USB drivers, and it's beyond my ken, so unless someone is willing to step up and fix it, it will lag. I have a USB2 drive enclosure. I have tried both an ATAPI CDRW drive and a recent Seagate drive in it. Under ehci, lots of failures, and indeed the occasional panic. Under uhci, it's rock solid, but slow and restricted to USB1.1 speeds. Workaround: The only way to disable ehci is to neither compile it nor load it into the kernel right now (for 4.x, 5.x and CURRENT). Regards, BMS pgpTwTxyDVQrV.pgp Description: PGP signature
Re: Get multicast addresses from interface
On Thu, Oct 14, 2004 at 08:01:49AM -0700, Brooks Davis wrote: On Thu, Oct 14, 2004 at 05:44:57PM +0400, Grigory Klyuchnikov wrote: How can a user process get IPv6 multicast addresses of ethernet interfaces? I have FreeBSD 5.2.1 and get interface addresses via ioctl(SIOCGIFCONF) or sysctl(witch NET_RT_IFLIST), but all returned addresses are unicast. getifaddrs(3) and getifmaddrs(3) may do what you want. See http://people.freebsd.org/~bms/dump/mcastlist/ for the original code (harti@ submitted most of the kernel bits). I didn't specifically set out to test getifmaddrs(3) with AF_INET6 addresses when I wrote it, but I seem to recall that it should work with them, from testing. If not, please feel free to submit a PR with a patch. Thanks, BMS pgpfeYl0of2Ky.pgp Description: PGP signature
Re: AMD64 vs i386 for FreeBSD
On Tue, Jun 29, 2004 at 02:36:27PM +0200, Arne Schwabe wrote: You can't change the cpu speed while running at the Moment, I don't see any other iusses at the Moment with my Notebook (IBM T40). I too have an IBM T40. It gives me much love, daily. BMS ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
mail/mutt-devel and S/MIME?
Hi, Can someone point me at a concise set of instructions which enables me to get the mutt-devel port to verify/decipher S/MIME signed/encrypted email messages? Please reply to me directly as I am not subscribed to -questions. Many thanks. BMS ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Why is PCE not set in CR4?
On Wed, Oct 01, 2003 at 11:39:36AM +0200, Grumble wrote: However, I am not allowed to use the RDPMC instruction from ring 3 because the PCE (Performance-monitoring Counters Enable) bit is not set. You can do it with /dev/perfmon. man 4 perfmon. I have read the perfmon documentation and source code. For several reasons, I do not think it is totally adequate in my situation. [snip] Hi, Eat this. Diff attached. Test this and I'll commit it to -CURRENT if you're happy with it. If you can tell me more about what perfmon needs I'll give it love too. This is an extension to the i386_vm86() syscall which will let you turn PCE on and off if you're the superuser. BMS Generated by diffcoll on Wed 1 Oct 2003 12:39:07 BST diff -uN src/lib/libc/i386/sys/i386_vm86.2.orig src/lib/libc/i386/sys/i386_vm86.2 --- /usr/src/lib/libc/i386/sys/i386_vm86.2.orig Wed Oct 1 12:13:50 2003 +++ /usr/src/lib/libc/i386/sys/i386_vm86.2 Wed Oct 1 12:36:44 2003 @@ -112,6 +112,26 @@ .Fa state will contain the state of the VME flag on return. .\ .It Dv VM86_SET_VME +.It Dv VM86_GET_PCE +This is used to retrieve the current state of the Pentium(r) processor's +PCE (Performance Counter Enable) flag, which is bit 8 of CR4. +.Bd -literal +struct vm86_pce_args { + int state; /* status */ +}; +.Ed +.Pp +.Fa state +will contain the state of the VME flag on return. +.It Dv VM86_SET_PCE +This is used to set the current state of the PCE flag. +Enabling this bit allows any code to execute the +.Li RDPMC +instruction. +Disabling this bit will allow only code running at protection level 0 to +execute this instruction. +Because this bit has system-wide granularity, it may only be enabled by +the superuser. .El .Pp vm86 mode is entered by calling @@ -133,6 +153,13 @@ .It Bq Er ENOMEM There is not enough memory to initialize the kernel data structures. .El +.Sh BUGS +The +.Dv VM86_SETPCE +and +.Dv VM86_GETPCE +functions are only guaranteed to work for uniprocessor kernels; their +results on SMP systems are undefined. .Sh AUTHORS .An -nosplit This man page was written by diff -uN src/sys/i386/i386/vm86.c.orig src/sys/i386/i386/vm86.c --- /usr/src/sys/i386/i386/vm86.c.orig Wed Oct 1 12:16:23 2003 +++ /usr/src/sys/i386/i386/vm86.c Wed Oct 1 12:39:01 2003 @@ -734,6 +734,29 @@ } break; + case VM86_SET_PCE: { + struct vm86_pce_args sa; + + if ((error = suser(td))) + return (error); + if (!(cpu_feature CPUID_TSC) || !(cpu_feature CPUID_MMX)) + return (ENODEV); + if ((error = copyin(ua.sub_args, sa, sizeof(sa + return (error); + if (sa.state) + load_cr4(rcr4() | CR4_PCE); + else + load_cr4(rcr4() ~CR4_PCE); + } + break; + + case VM86_GET_PCE: { + struct vm86_pce_args sa; + + sa.state = (rcr4() CR4_PCE ? 1 : 0); + error = copyout(sa, ua.sub_args, sizeof(sa)); + } + default: error = EINVAL; } diff -uN src/sys/i386/include/vm86.h.orig src/sys/i386/include/vm86.h --- /usr/src/sys/i386/include/vm86.h.orig Wed Oct 1 12:22:53 2003 +++ /usr/src/sys/i386/include/vm86.hWed Oct 1 12:37:56 2003 @@ -128,6 +128,8 @@ #define VM86_SET_VME 2 #define VM86_GET_VME 3 #define VM86_INTCALL 4 +#define VM86_SET_PCE 5 +#define VM86_GET_PCE 6 struct vm86_init_args { int debug; /* debug flag */ @@ -136,6 +138,10 @@ }; struct vm86_vme_args { + int state; /* status */ +}; + +struct vm86_pce_args { int state; /* status */ }; ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Losing routes !!
Hi, On Wed, Sep 24, 2003 at 11:30:23AM -0700, Mike Hogsett wrote: Any suggestions? This is my backup server. I would like to resolve this as soon as possible. I don't want to have to re-install to 4.8-RELEASE. Please send me the output of the following commands ASAP:- netstat -arn ifconfig -a The machine was running 4.8-RELEASE-p3 fine last week (and not 4.8-RELEASE as I indicated below). Is it possible to blow away /usr/src and cvsup to 4.8-RELEASE-p3 rather than 4.8-RELEASE-p8? Yes, if you cvsup using a date and not a tag. Set the date to before the correction date and you should get sources from before the fix was applied. BMS pgp0.pgp Description: PGP signature
Re: IPFW2
[Redirected to -questions] On Mon, Sep 22, 2003 at 08:07:13PM +0200, Uwe Klann wrote: From the Log file IPFW:- Sep 22 00:24:13 muc /kernel: ipfw: 3300 Accept TCP 217.10.213.30:4418 217.9.121.209:21 in via fxp0 How can I extend on FreeBSD 4.8 (ipfw2) the log contens to see the tranfered data File and the amount of bytes went out? Thank you in advance for your help. It isn't ipfw's job to do this. Configure logging on your ftp daemon by reading the appropriate manual pages. If you need a logging ftp proxy for some other reason check the ports tree. BMS ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: USB - PS/2
On Sat, Aug 30, 2003 at 01:51:27PM +0200, Walter C. Pelissero wrote: I just bought a USB - PS/2 keyboard and mouse converter for my laptop. It's a Sitecom brand and it gets recognised as MCT Corp. I had similar problems with a Tangtop USB-PS/2 k+m adapter. In the end it turned out that this device was causing uhci to report an error, even though the movement data coming in looked fine. I never got round to fixing it. Perhaps you could try throwing all the debug switches on in the usb drivers and usbd and seeing if you get similar behaviour? Thanks for the patch, this was the other thing that needed fixing! BMS ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: PKI
I'm working on a port of OpenCA which is almost ready. Hopefully within the next week (I'm ill at the moment.) :( www.openca.org BMS On Fri, Sep 27, 2002 at 12:42:10PM +0300, Ivailo Tanusheff wrote: Do you know if there is any Certificate server available for FreeBSD? I need to issue certificates to our customers. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message