Re: Dynamic loading of network kernel modules?
David Horn wrote: > I made a minor change to ifconfig to try kldloading the interface name > specified on the create wlandev (ifconfig already tries for > normal invocations, just needed to try with the wlandev interface) > [...] > This works nicely, however at startup, I still do not get the > interface up, or the kernel module loaded, so a second patch is > needed. I don't understand why you have to patch anything. It seems to work for me out of the box. For example, with the following entries in /etc/rc.conf, all required KLD modules are loaded automatically, and the interfaces are up: ifconfig_bge0="up" cloned_interfaces="vlan103 vlan105" ifconfig_vlan103="inet 10.103.0.20/16 vlan 103 vlandev bge0" ifconfig_vlan105="inet 10.105.0.20/16 vlan 105 vlandev bge0" Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Unix gives you just enough rope to hang yourself -- and then a couple of more feet, just to be sure." -- Eric Allman ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: Dynamic loading of network kernel modules?
On Wed, Mar 18, 2009 at 5:37 AM, Oliver Fromme wrote: > David Horn wrote: > > I made a minor change to ifconfig to try kldloading the interface name > > specified on the create wlandev (ifconfig already tries for > > normal invocations, just needed to try with the wlandev interface) > > [...] > > This works nicely, however at startup, I still do not get the > > interface up, or the kernel module loaded, so a second patch is > > needed. > > I don't understand why you have to patch anything. It > seems to work for me out of the box. For example, with > the following entries in /etc/rc.conf, all required KLD > modules are loaded automatically, and the interfaces > are up: The first patch is required for dynamic kernel loading in the wlandev invocation of ifconfig. e.g.: ifconfig wlan create wlandev iwn0 This is part of the vaps changes, and ifconfig was not updated yet for this new kernel load case. > > ifconfig_bge0="up" > cloned_interfaces="vlan103 vlan105" > ifconfig_vlan103="inet 10.103.0.20/16 vlan 103 vlandev bge0" > ifconfig_vlan105="inet 10.105.0.20/16 vlan 105 vlandev bge0" Interesting. Are you certain that bge is a kernel module, and not statically built into your kernel ? Are you using /boot/loader.conf to load the module ? What does kldstat show ? I ran through all of the case scenarios I can find, and the rc.d scripts would not call ifconfig on an interface that did not already have a kernel module loaded. If you know something here that I do not, please share. :) --Thanks! --Dave H > > Best regards > Oliver > > -- > Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. > Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: > secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- > chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart > > FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd > > "Unix gives you just enough rope to hang yourself -- > and then a couple of more feet, just to be sure." > -- Eric Allman > ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: Dynamic loading of network kernel modules?
Oliver Fromme wrote: > ifconfig_bge0="up" > cloned_interfaces="vlan103 vlan105" > ifconfig_vlan103="inet 10.103.0.20/16 vlan 103 vlandev bge0" > ifconfig_vlan105="inet 10.105.0.20/16 vlan 105 vlandev bge0" Sorry, I forgot to paste one line: network_interfaces="bge0 lo0" That one is essential. :-) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "anyone new to programming should be kept as far from C++ as possible; actually showing the stuff should be considered a criminal offence" -- Jacek Generowicz ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: Dynamic loading of network kernel modules?
On Wed, Mar 18, 2009 at 11:50 AM, Oliver Fromme wrote: > Oliver Fromme wrote: > > ifconfig_bge0="up" > > cloned_interfaces="vlan103 vlan105" > > ifconfig_vlan103="inet 10.103.0.20/16 vlan 103 vlandev bge0" > > ifconfig_vlan105="inet 10.105.0.20/16 vlan 105 vlandev bge0" > > Sorry, I forgot to paste one line: > > network_interfaces="bge0 lo0" Ah. Ok, now I am understanding your scenario. I thought that using 'network_interfaces' with anything other than "AUTO" was in the process of being depreciated ? rc.conf man page: network_interfaces (str) Set to the list of network interfaces to configure on this host or ``AUTO'' (the default) for all current inter- faces. Setting the network_interfaces variable to anything other than the default is deprecated. Interfaces that the administrator wishes to store configuration for, but not start at boot should be configured with the ``NOAUTO'' key- word in their ifconfig_ variables as described below. An ifconfig_ variable is also assumed to exist for each value of interface. When an interface name contains any of the characters ``.-/+'' they are translated to ``_'' before lookup. The variable can contain arguments to ifconfig(8), as well as special case-insensitive keywords described below. Such keywords are removed before passing the value to ifconfig(8) while the order of the other argu- ments is preserved. --Thanks! --_Dave Horn > > That one is essential. :-) > > Best regards > Oliver > > > -- > Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. > Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: > secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- > chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart > > FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd > > "anyone new to programming should be kept as far from C++ as > possible; actually showing the stuff should be considered a > criminal offence" -- Jacek Generowicz > ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: netgraph modules won't unload after use
Ash Gokhale wrote: I'm developing a kernel module that will be doing inspection and needed access to raw network frames, so I turned to netgraph as the solution.However it seems that netgraph will not permit a module to unload once it's participated in a mkpeer/connect operation. Rebooting to remove a module is angrymaking (not like mtx/sleep crashes). This going into the kernel because my bpf based userland stuff is probably not going to hold up to the packet rate. Should I file a PR? Or is there magic in the documentation I havn't found? I've observed the trouble in 7.0 release, and tonight's 7_RELENG, with GENERIC + WITNESS/INVARIANTS The module code ( cobbled together from netgraph/ng_sample.c / ng_echo.c) http://pastebin.com/m31b6ece6 The module loads and unloads fine until connected to a netgraph hook: hmm they are supposed to, and they did in the past.. let me check... r...@trafmon1:kldload ng_ether r...@trafmon1:ifconfig bge0: flags=8843 metric 0 mtu 1500 options=9b ether 00:11:43:30:fb:8a inet 10.7.2.3 netmask 0xff00 broadcast 10.7.2.255 media: Ethernet autoselect (100baseTX ) status: active bge1: flags=8802 metric 0 mtu 1500 options=9b ether 00:11:43:30:fb:8b media: Ethernet autoselect (none) status: no carrier fxp0: flags=8843 metric 0 mtu 1500 options=b ether 00:0e:0c:62:aa:14 inet 10.7.0.101 netmask 0xff00 broadcast 10.7.0.255 media: Ethernet autoselect (100baseTX ) status: active lo0: flags=8049 metric 0 mtu 16384 inet 127.0.0.1 netmask 0xff00 r...@trafmon1:ngctl + list There are 4 total nodes: Name: bge0Type: ether ID: 0002 Num hooks: 0 Name: bge1Type: ether ID: 0003 Num hooks: 0 Name: ngctl4252 Type: socket ID: 0005 Num hooks: 0 Name: fxp0Type: ether ID: 0004 Num hooks: 0 + mkpeer bge0: hole lower hook + list There are 5 total nodes: Name:Type: holeID: 0006 Num hooks: 1 Name: bge0Type: ether ID: 0002 Num hooks: 1 Name: bge1Type: ether ID: 0003 Num hooks: 0 Name: ngctl4252 Type: socket ID: 0005 Num hooks: 0 Name: fxp0Type: ether ID: 0004 Num hooks: 0 + shutdown [6]: + list There are 4 total nodes: Name: bge0Type: ether ID: 0002 Num hooks: 0 Name: bge1Type: ether ID: 0003 Num hooks: 0 Name: ngctl4252 Type: socket ID: 0005 Num hooks: 0 Name: fxp0Type: ether ID: 0004 Num hooks: 0 + quit r...@trafmon1:kldstat -v Id Refs AddressSize Name 1 36 0xc040 6a9c28 kernel (/boot/kernel/kernel) [...] 71 0xccb16000 4000 ng_ether.ko (/boot/kernel/ng_ether.ko) Contains modules: Id Name 246 ng_ether 81 0xccb1b000 2000 ng_hole.ko (/boot/kernel/ng_hole.ko) Contains modules: Id Name 247 ng_hole r...@trafmon1:klunload ng_hole klunload: Command not found. r...@trafmon1:kldunload ng_hole r...@trafmon1:kldunload ng_ether kldunload: can't unload file: Device busy r...@trafmon1:kldstat -v Id Refs AddressSize Name 1 36 0xc040 6a9c28 kernel (/boot/kernel/kernel) [...] 71 0xccb16000 4000 ng_ether.ko (/boot/kernel/ng_ether.ko) Contains modules: Id Name 246 ng_ether r...@trafmon1: this is expected. ng-ether is not unloadable as the connections are too complicated to unwind easily.. one day r...@trafmon1: Stop in /root/tmp/food.ko. Exit 1 #Mar 18 03:14:31 kernel: quiesced :ro:~/tmp/food.ko:3:14:31:32 Mar 18 03:14:31 kernel: foodmod unloaded Seems that I can't unload some of the other netgraph types either ( it's not just me): #kldunload ng_ether :ro:~/tmp/food.ko:3:24:07:41 kldunload: can't unload file: Device busy Exit 1 try unloading a node that IS unloadable.. see the following comment in ng_ehter.c: /* * Note that the base code won't try to unload us until * all nodes have been removed, and that can't happen * until all Ethernet interfaces are removed. In any * case, we know there are no nodes left if the action * is MOD_UNLOAD, so there's no need to detach any nodes. */ so we can't run this unless you have removeable ethernet interfaces, and have removed them. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org" ___ freebsd-net@freebsd.org mailing list http://lists.freeb
Re: Dynamic loading of network kernel modules?
David Horn wrote: > Oliver Fromme wrote: > > > > network_interfaces="bge0 lo0" > > Ah. Ok, now I am understanding your scenario. > > I thought that using 'network_interfaces' with anything other than > "AUTO" was in the process of being depreciated ? Well, the manual page says so, but I think that is a mistake. There are cases where you have to specify the list of interfaces explicitly. The situation described in this thread is one such case. My opinion is that it is good to have the ability to let things be done automatically, but it is bad to remove the ability to do things manually. This is UNIX, after all. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "The ITU has offered the IETF formal alignment with its corresponding technology, Penguins, but that won't fly." -- RFC 2549 ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: Dynamic loading of network kernel modules?
Oliver Fromme wrote: David Horn wrote: > Oliver Fromme wrote: > > > > network_interfaces="bge0 lo0" > > Ah. Ok, now I am understanding your scenario. > > I thought that using 'network_interfaces' with anything other than > "AUTO" was in the process of being depreciated ? Well, the manual page says so, but I think that is a mistake. There are cases where you have to specify the list of interfaces explicitly. The situation described in this thread is one such case. My opinion is that it is good to have the ability to let things be done automatically, but it is bad to remove the ability to do things manually. This is UNIX, after all. I personally hate the auto-magic-loading of modules that ifconfig does. Remember that we tried to yank it once before but had to bring it back for compatibility. If one argues that ifconfig should be consistent in it's treatment of module loading then the patch is fine and should go in. Otherwise... Sam ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: ae(4) Wake-on-Lan MFC
Pyun YongHyeon wrote: Do you have ae(4) hardware? I'm not sure why stas@ removed WOL part in the MFC but it could be lack of testing(CCed to stas@). I've attached diff that includes WOL support from HEAD. Thanks. I tested this OK on the EeePC 701 so I've committed it! cheers BMS ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: Dynamic loading of network kernel modules?
On Wed, Mar 18, 2009 at 12:26 PM, Oliver Fromme wrote: > David Horn wrote: > > Oliver Fromme wrote: > > > > > > network_interfaces="bge0 lo0" > > > > Ah. Ok, now I am understanding your scenario. > > > > I thought that using 'network_interfaces' with anything other than > > "AUTO" was in the process of being depreciated ? > > Well, the manual page says so, but I think that is a > mistake. There are cases where you have to specify the > list of interfaces explicitly. The situation described > in this thread is one such case. Good point. > > My opinion is that it is good to have the ability to let > things be done automatically, but it is bad to remove the > ability to do things manually. This is UNIX, after all. Exactly. Both scenarios should probably be supported, but I guess we would need to ask brooks for some history on the depreciated warning for network_interfaces. = src/etc/network.subr Revision 1.185: download - view: text, markup, annotated - [selected for diffs] Wed Apr 30 16:29:15 2008 UTC (10 months, 2 weeks ago) by brooks Branches: MAIN Diff to: previous 1.184: preferred, colored Changes since revision 1.184: +4 -0 lines Emit a warning when the network_interfaces variable is not set to AUTO. MFC after: 3 days == --Thanks! -_Dave H > > Best regards > Oliver > > -- > Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. > Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: > secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- > chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart > > FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd > > "The ITU has offered the IETF formal alignment with its > corresponding technology, Penguins, but that won't fly." > -- RFC 2549 > ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: kern/131153: [iwi] iwi doesn't see a wireless network
The following reply was made to PR kern/131153; it has been noted by GNATS. From: Rui Paulo To: bug-follo...@freebsd.org, ad...@voicenet.com Cc: Subject: Re: kern/131153: [iwi] iwi doesn't see a wireless network Date: Wed, 18 Mar 2009 22:58:10 + This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-10--735631158 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Please include the result of the following command: wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0 -dd Thanks. --Apple-Mail-10--735631158 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAknBfIIACgkQfD8M/ASTygIScACdG3Vq1VaZ/+hB259pIWmwLVuX p98AoNhqHBex14lagyuoMP2OoBKxUpqU =3wfU -END PGP SIGNATURE- --Apple-Mail-10--735631158-- ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: ae(4) Wake-on-Lan MFC
On Wed, Mar 18, 2009 at 05:15:05PM +, Bruce Simpson wrote: > Pyun YongHyeon wrote: > >Do you have ae(4) hardware? I'm not sure why stas@ removed WOL part > >in the MFC but it could be lack of testing(CCed to stas@). I've > >attached diff that includes WOL support from HEAD. > > > > > > Thanks. I tested this OK on the EeePC 701 so I've committed it! > Great! Thanks. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: kern/123890: [ppp] [panic] crash & reboot on work with PPP low-speed connection
Synopsis: [ppp] [panic] crash & reboot on work with PPP low-speed connection Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Thu Mar 19 04:35:24 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=123890 ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"