summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add initial support for booting from ZFS on sparc64. At least on Sun Firemarius2012-05-019-43/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | V100, the firmware is known to be broken and not allowing to simultaneously open disk devices, causing attempts to boot from a mirror or RAIDZ to cause a crash. This will be worked around later. The firmwares of newer sun4u models don't seem to exhibit this problem though. Steps for ZFS booting: 1. create VTOC8 label # gpart create -s vtoc8 da0 2. add partitions, f.e.: # gpart add -t freebsd-zfs -s 60g da0 # gpart add -t freebsd-swap da0 resulting in something like: # gpart show => 0 143331930 da0 VTOC8 (68G) 0 125821080 1 freebsd-zfs (60G) 125821080 17510850 2 freebsd-swap (8.4G) 3. create zpool # zpool create bunker da0a or for mirror/RAIDZ (after preparing additional disks as in steps 1. + 2.): # zpool create bunker mirror da0a da1a # zpool create bunker raidz da0a da1a da2a ... 4. set bootfs # zpool set bootfs=bunker bunker 5. install zfsboot # zpool export bunker # gpart bootcode -p /boot/zfsboot da0 6. write zfsloader to the ZFS Boot Block (so far, there's no dedicated tool for this, so dd(1) has to be used for this purpose) When using mirror/RAIDZ, step 4. and the dd(1) invocation should be repeated for the additional disks in order to be able to boot from another disk in case of failure. # sysctl kern.geom.debugflags=0x10 # dd if=/boot/zfsloader of=/dev/da0a bs=512 oseek=1024 conv=notrunc # zpool import bunker 7. install system on ZFS filesystem Don't forget to set 'zfs_load="YES"' and vfs.root.mountfrom="zfs:bunker" in loader.conf as well as 'zfs_enable="YES"'in rc.conf. 8. copy zpool.cache to the ZFS filesystem cp -p /boot/zfs/zpool.cache /bunker/boot/zfs/zpool.cache 9. set mountpoint # zfs set mountpoint=/ bunker 10. Now, given that aliases for all disks in the zpool exists (check with the `devalias` command on the boot monitor prompt) and disk0 corresponds to da0 (likewise for additional disks), the system can be booted from the ZFS with: {1} ok boot disk0 PR: 165025 Submitted by: Gavin Mu
* Add a command for showing the heap usage.marius2012-05-011-0/+12
| | | | | | PR: 165025 Submitted by: Gavin Mu MFC after: 1 week
* Update HWMP Proactive code and mesh route flags.monthadar2012-05-011-20/+10
| | | | | | | | | | | | | * Modified hwmp_recv_preq: o cleaned up code, removed rootmac variable because preq->origaddr is the root when we recevie a Proactive PREQ; o Modified so that a PREP in response of a Proactive PREQ is unicast, a PREP is ALWAYS unicast; * Modified hwmp_recv_prep: o Before we mark a route to be valid we should remove the discovery flag and then mark it valid in such a way we wont lose the isgate flag; Approved by: adrian
* * Modified ifconfig to show the IEEE80211_MESHRT_FLAGS_DISCOVER flag with a 'D';monthadar2012-05-011-0/+2
| | | | Approved by: adrian
* PREQ discovery update.monthadar2012-05-014-17/+82
| | | | | | | | | | | | | | * Added a new discovery flag IEEE80211_MESHRT_FLAGS_DISCOVER; * Modified ieee80211_ioctl.h to include IEEE80211_MESHRT_FLAGS_DISCOVER; * Added hwmp_rediscover_cb, which will be called by a timeout to do rediscovery if we have not reach max number of preq discovery; * Modified hwmp_discover to setup a callout for path rediscovery; * Added to ieee80211req_mesh_route to have a back pointer to ieee80211vap for the discovery callout context; * Modified mesh_rt_add_locked arguemnt from ieee80211_mesh_state to ieee80211vap, this because we have to initialize the above back pointer; Approved by: adrian
* * Added new command to ifconfig to activate Mesh Gate Announcement calledmonthadar2012-05-012-0/+20
| | | | | | meshgate with corresponding explanation; Approved by: adrian
* Net80211s update: Mesh Gate Announcement and removal of Portal Announcement.monthadar2012-05-015-25/+27
| | | | | | | | | | | | | | | * Renamed IEEE80211_ELEMID_MESHPANN to IEEE80211_ELEMID_MESHGANN according to amendment; * Added IEEE80211_IOC_MESH_GATE that controls whether Mesh Gate Announcement is activated or not; * Renamed all flags from Portal to Gate in HWMP frames; * Removed IEEE80211_ACTION_MESHPANN enum cause its part of the Mesh Action category now as per amendment; * Renamed IEEE80211_MESHFLAGS_PORTAL to IEEE80211_MESHFLAGS_GATE in ieee80211_mesh_state flags; * Modified ieee80211_hwmp.c/ieee80211_mesh.c to use new GATE flags; Approved by: adrian
* RANN updatemonthadar2012-05-012-18/+83
| | | | | | | | | * Introduced a new HWMP sysctl, Root Confirmation Interval; * Added hr_lastrootconf to hwmp_route, is for ratecheck for a specific ROOT; * We missed reading RANN.interval subfield from a RANN frame before; * Updated hwmp_recv_rann according to amendment, see comments; Approved by: adrian
* PERR update to be called from mesh code.monthadar2012-05-013-2/+76
| | | | | | | | | | | | * Added mpp_senderror for Mesh Path Selection protocol; * Added hwmp_senderror that will send an HWMP PERR according to the supplied reason code; * Call mpp_senderror when deleting a route with correct reason code for whether the route is marked proxy or not; * Call mpp_senderror when trying to forward an individually addressed frame and there is no forwarding information; Approved by: adrian
* * Modified PERR acceptance criteria according to amendment;monthadar2012-05-011-25/+82
| | | | | | * Modified how PERR is handled and propagated according to amendment; Approved by: adrian
* Updated PREQ propagation code;monthadar2012-05-011-74/+65
| | | | | | | | | * When receiving a Proactive PREQ dont return after processing it but propagate; * When we propagate we should not enforce ratechecking; * Added checking for multiple pred ID detection; * Storing proxy orig address when PREQ is not for us; Approved by: adrian
* * PREQ acceptance criteria updated to check for proxy condition as in amendment;monthadar2012-05-011-6/+9
| | | | Approved by: adrian
* * Proactive PREQ (original transmission) must also setmonthadar2012-05-011-1/+2
| | | | | | IEEE80211_MESHPREQ_TFLAGS_USN flag in target_flag field; Approved by: adrian
* * Fixed hwmp_discover code to populate a PREQ packet correctly;monthadar2012-05-012-12/+3
| | | | | | | * Removed IEEE80211_MESHPREQ_TFLAGS_RF which is no longer part of the amendment spec; Approved by: adrian
* * Fixed PREQ flag field Adressing mode subfiled according to amendment specs;monthadar2012-05-012-5/+5
| | | | Approved by: adria
* * Added a mesh max PREQ retires sysctl that governous how many timesmonthadar2012-05-011-2/+38
| | | | | | | | we try to discover an address; * Added a mesh net travelse time across an MBSS, which is used to enforce discovery rate check; Approved by: adrian
* Change how we enforce PREQ minimum interval.monthadar2012-05-011-24/+33
| | | | | | | | | | | * Moved hs_lastpreq to be hr_lastpreq cause this rate check should be per target mesh STA according to amendment (NB: not applicable for PERR); * Modified hwmp_send_preq to use two extra arguments for last sent PREQ and minimum PREQ interval; * hwmp_send_preq is called with last two arguments equal to NULL when sending Proactive PREQs cause the call back task enforces the rate check; Approved by: adrian
* PREP updatemonthadar2012-05-012-65/+62
| | | | | | | | | | | | | | | | | | | | * Added assertion in mesh_rt_update; * Fixed some prep propagation that where multicast, ALL PREPS ARE UNICAST; * Fixed PREP acceptance criteria; * Fixed some PREP debug messages; * HWMP intermediate reply (PREP) should only be sent if we have newer forwarding infomration (FI) about target; * Fixed PREP propagation condition and PREP w/ AE handling; * Ignore PREPs that have unknown originator. * Removed old code inside PREP that was for proactive path building to root mesh; Other errors include: * use seq number of target and not orig mesh STA; * Metric is what we have stored in our FI; * Error in amendment, Hop count is not 0 but equals FI hopcount for target; Approved by: adrian
* * MeshForwarding update mesh_recv_indiv_data_to_fwrd to silently discardmonthadar2012-05-011-1/+13
| | | | | | unknown meshDA instead of panic, which is allowed per amendment spec; Approved by: adrian
* Added route lifetime update for destination and source mesh along a mesh path;monthadar2012-05-011-4/+33
| | | | | | | | | | * In mesh_recv_indiv_data_to_fwd update route entry for both meshDA and meshSA; * In mesh_recv_indiv_data_to_me update route entry for meshSA; * in ieee80211_mesh_rt_update put code so that a proxy entry that is gated by us (number of hops == 0) is never invalidated; * Fixed so that we always call ieee80211_mesh_rt_update with lifetime in ms; Approved by: adrian
* Mesh forwarding with proxy support.monthadar2012-05-014-149/+398
| | | | | | | | | | | | | | | | | | | | | | * Modified HWMP PREP/PREQ to contain a proxy entry and also changed PREP frame processing according to amendment as following: o Fixed PREP to always update/create if acceptance criteria is meet; o PREQ processing to reply if request is for a proxy entry that is proxied by us; o Removed hwmp_discover call from PREQ, because sending a PREP will build the forward path, and by receving and accepting a PREQ we have already built the reverse path (non-proactive code); * Disabled code for pro-active in PREP for now (will make a separate patch for pro-active HWMP routing later) * Added proxy information for a Mesh route, mesh gate to use and proxy seqno; * Modified ieee80211_encap according to amendment; * Introduced Mesh control address extension enum and removed unused struct, also rename some structure element names. * Modified mesh_input and added mesh_recv_* that should verify and process mesh data frames according to 9.32 Mesh forwarding framework in amendment; * Modified mesh_decap accordingly to changes done in mesh control AE struct; Approved by: adrian
* Implemented so that Mesh forwarding information lifetime is dynamic.monthadar2012-05-014-33/+120
| | | | | | | | | | | | | | | * Introduced ieee80211_mesh_rt_update that updates a route with the maximum(lifetime left, new lifetime); * Modified ieee80211_mesh_route struct by adding a lock that will be used by both ieee80211_mesh_rt_update and precursor code (added in future commit); * Modified in ieee80211_hwmp.c HWMP code to use new ieee80211_mesh_rt_update; * Modified mesh_rt_flush_invalid to use new ieee80211_mesh_rt_update; * mesh_rt_flush also checks that lifetime == 0, this gives route discovery a change to complete; * Modified mesh_recv_mgmt case IEEE80211_FC0_SUBTYPE_BEACON: when ever we received a beacon from a neighbor we update route lifetime; Approved by: adrian
* Fixed some MPM reason codes and max number of neighbors checkmonthadar2012-05-012-32/+94
| | | | | | | | | | | * Added IEEE80211_MESH_MAX_NEIGHBORS and it is set to 15, same as before; * Modified mesh_parse_meshpeering_action to verify MPM frame and send correct reason code for when a frame is rejected according to standard spec; * Modified mesh_recv_action_meshpeering_* according to the standard spec; * Modified mesh_peer_timeout_cb to always send CLOSE frame when in CONFIRMRCV state according to the standard spec; Approved by: adrian
* Modified structure and code that handles Mesh peering management.monthadar2012-05-012-42/+56
| | | | | | | | | | | | | | | * Old struct ieee80211_meshpeer_ie had wrong peer_proto field size; * Added IEEE80211_MPM_* size macros; * Created an enum for the Mesh Peering Protocol Identifier field according to the standard spec and removed old defines; * Abbreviated Handshake Protocol is not used by the standard anymore; * Modified mesh_verify_meshpeer to use IEEE80211_MPM_* macros for verification; * Modified mesh_parse_meshpeering_action to parse complete frame, also to parse it according to the standard spec; * Modified ieee80211_add_meshpeer to construct correct MPM frames according to the standard spec; Approved by: adrian
* Added Self-protected action category (including MPM).monthadar2012-05-015-52/+66
| | | | | | | | | | | | | * Added new action category IEEE80211_ACTION_CAT_SELF_PROT which is used by 11s for Mesh Peering Management; * Updated Self protected enum Action codes to start from 1 instead of 0 according to the standard spec; * Removed old and wrong action categories IEEE80211_ACTION_CAT_MESHPEERING; * Modified ieee80211_mesh.c and ieee80211_action.c to use the new action category code; * Added earlier verification code in ieee80211_input; Approved by: adrian
* Change the MIB cycle count API to return HAL_BOOL, rather than uint32_t,adrian2012-05-0115-15/+83
| | | | | | | to return whether it was successful. Add placeholder (blank) methods for previous chips, for both it and the 11n extension channel busy call.
* - close the open file after fetchingbapt2012-05-011-3/+27
| | | | | | - create a default /usr/local/etc/pkg.conf Approved by: des (mentor)
* Implement volume deletion if disk has more then one partition.mav2012-05-011-30/+37
|
* Improve DDF metadata writing.mav2012-05-011-54/+92
|
* - fixed a vnode lock hang-up issue.daichi2012-05-013-115/+213
| | | | | | | | | | | - fixed an incorrect lock status issue. - fixed an incorrect lock issue of unionfs root vnode removed. (pointed out by keith) - fixed an infinity loop issue. (pointed out by dumbbell) - changed to do LK_RELEASE expressly when unlocked. Submitted by: ozawa@ongs.co.jp
* Fix make depend.uqs2012-05-011-1/+1
|
* Convert AP96 to use the mdioproxy and ARGE_MDIO option.adrian2012-05-012-0/+22
| | | | | | arge1 still works (it's the standalone PHY) but arge0 and the other switch ports don't work. They're enumerated though, demonstrating that the mdiobus abstraction is correctly working.
* Break out the arge MDIO bus code into an optional argemdio device.adrian2012-05-014-115/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is only done if the ARGE_MDIO option is included. * Shuffle the arge MDIO bus into a separate device, that needs to be probed early (use hint.argemdio.X.order=0) * hint.arge.X.mdio now specifies which miiproxy to rendezvous with. * Call MAC/MDIO bus init during MDIO attach, not arge attach. This is done regardless: * Shift the arge MAC and MDIO bus reset code into separate functions and call it early during MDIO bus attach. It's required for correct MDIO bus IO to occur on AR71xx/AR91xx devices. * Remove the AR71xx/AR91xx centric assumption that there's only one MDIO bus. The initial code mapped miibus0(arge0) and miibus1(arge1) MII register operations to the MII0 (arge0) register space. The AR724x (and later, upcoming chipsets) have two MDIO busses and the second is very much in use. TODO: * since the multiphy behaviour has changed (where now a phymask of >1 PHY will still be enumerated), multiphy setups may be quite wrong. I'll go and fix these so they still have a chance of working, at least. until the switch PHY support appears in -HEAD. Submitted by: Stefan Bethke <stb@lassitu.de>
* Bring over the first part of the etherswitch framework - an MDIO bus andadrian2012-05-017-1/+662
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDIO/MII rendezvous proxy. * Add an 'mdio' bus, which is the "IO" side of an MII bus (but by design can be anything which implements the underlying register access API.) * Add 'miiproxy' and 'mdioproxy', which provides a rendezvous mechanism for MII busses to appear hanging off arbitrary busses (ie, that aren't necessarily a traditional looking MII bus.) MII busses can now hang off anything that implements an mdiobus. For the AR71xx SoC, there's one MDIO bus but two MII busses. So to properly support two or more real PHYs, this can be done: # arge0 MDIO bus - there's no arge1 MDIO bus for AR71xx hint.argemdio.0.at="nexus0" hint.argemdio.0.maddr=0x19000000 hint.argemdio.0.msize=0x1000 hint.argemdio.0.order=0 # Create two mdioproxy instances hint.mdioproxy.0.at="mdio0" hint.mdioproxy.1.at="mdio0" # .. and with a follow-up patch hint.arge.0.mdio=mdioproxy0 hint.arge.1.mdio=mdioproxy0 TODO: * Do a sweep or two and add appropriate locking in mdio/mdioproxy/miiproxy. Submitted by: Stefan Bethke <stb@lassitu.de> Reviewed by: ray
* Teach ubldr(8) about simple MBR partitioning.kientzle2012-05-013-2/+103
|
* Migrate ARGE_DEBUG to opt_arge.h.adrian2012-05-012-1/+3
| | | | Submitted by: Stefan Bethke <stb@lassitu.de>
* Add myself to this file - it didn't exist last time.jwd2012-05-011-0/+4
| | | | Approved by: rmacklem (mentor)
* GNU/kFreeBSD portability fix. This glue <stdlib.h> overrides header protectionrmh2012-04-301-2/+2
| | | | | | | | | | | | in the system-wide version of <stdlib.h> by wrapping the #include_next <stdlib.h> within the scope of its own header protection. On FreeBSD this has no effect, since both header protections are equivalent. However the GNU version of <stdlib.h> implements a special header protection mechanism which allows it to be included multiple times (in different modes). Simply by moving the #include_next off the header protection, we allow system-wide <stdlib.h> to implement its own protection policy, whichever that may be.
* Unbreak jemalloc build with MALLOC_PRODUCTION set. New jemalloc versiongonzo2012-04-301-2/+26
| | | | | | | | uncovered MIPS-related gcc bug described in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256 The patch was obtained from r128198 in gcc-4_1-branch, which is GPLv2, so it's OK to merge it.
* Import m4 regression tests from OpenBSDbapt2012-04-3047-43/+1076
| | | | | Obtained from: OpenBSD Approved by: des (mentor)
* Add two special directives to libmap.conf:bapt2012-04-302-31/+154
| | | | | | | | | | | | | | | include <file>: Parse the contents of file before continuing with the current file. includedir <dir>: Parse the contents of every file in dir that ends in .conf before continuing with the current file. Any file or directory encountered while processing include or includedir directives will be parsed exactly once, even if it is encountered multiple times. Reviewed by: kib, des Approved by: des (mentor) MFC after: 1 month
* Respect mathematical operation order piority with the exponent gnu extensionbapt2012-04-301-2/+2
| | | | | Obtained from: OpenBSD Approved by: des (mentor)
* Add to GEOM RAID class module, supporting the DDF metadata format, asmav2012-04-305-2/+3261
| | | | | | | | | | | | | | | defined by the SNIA Common RAID Disk Data Format Specification v2.0. Supports multiple volumes per array and multiple partitions per disk. Supports standard big-endian and Adaptec's little-endian byte ordering. Supports all single-layer RAID levels. Dual-layer RAID levels except RAID10 are not supported now because of GEOM RAID design limitations. Some work is still to be done, but the present code already manages basic interoperation with RAID BIOS of the Adaptec 1430SA SATA RAID controller. MFC after: 1 month Sponsored by: iXsystems, Inc.
* Add myself.dumbbell2012-04-301-0/+2
|
* Improve growfs(8) in a few ways; unfortunately, it's somewhat hard to untangletrasz2012-04-303-186/+263
| | | | | | | | | | | | | | | | | | | | them and commit separately. 1. Rewrite the way growfs(8) finds the device and mount point. This makes it possible to use e.g. "growfs /mnt"; it's also used to display more helpful messages. 2. Be more user-friendly, using descriptive messages, like this: OK to grow filesystem on /dev/md0, mounted on /mnt, from 9.8GB to 20GB? [Yes/No]" 3. Allow to specify the size (-s option) just like with mdconfig(8), i.e. with postfixes ("mdconfig -s 10g"). 4. Reload read-only filesystem after growing. Reviewed by: kib, mckusick (earlier version) Sponsored by: The FreeBSD Foundation
* Add GNU hash support for rtld.kib2012-04-309-19/+163
| | | | | | | Based on dragonflybsd support for GNU hash by John Marino <draco marino st> Reviewed by: kan Tested by: bapt MFC after: 2 weeks
* Split the symlook_obj1 into a loop iterating over the ELF object symbolkib2012-04-302-95/+116
| | | | | | | | | | hash elements, and a helper matched_symbol() which match the given hash entry and request, performing needed type and version checks. Based on dragonflybsd support for GNU hash by John Marino <draco marino st> Reviewed by: kan Tested by: bapt MFC after: 2 weeks
* Don't reuse credentials if redirected to a different host.des2012-04-301-1/+3
| | | | | Submitted by: Niels Heinen <heinenn@google.com> MFC after: 3 weeks
* Since the socket is non-blocking, it is necessary to use select(2) evendes2012-04-301-17/+13
| | | | | | | | | when there is no timeout, because read(2) will return immediately if there is no data waiting in the TCP buffer, causing fetch_read() to busy-loop on slow connections. MFC after: 3 weeks Noticed by: Yanhui Shen <shen.elf@gmail.com>
* Remove incorrect __restrict qualifier on several pointersdumbbell2012-04-302-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typical case was: static __inline int convert_ccl(FILE *fp, char * __restrict p, [...]) { [...] if (p == SUPPRESS_PTR) { [...] } else { [...] } [...] } This qualifier says that the pointer is the only one at that time pointing to the resource. Here, clang considers that "p" will never match "SUPPRESS_PTR" and optimize the if{} block out. This leads to segfaults in programs calling vfscanf(3) and vfwscanf(3) with just the format string (no arguments following it). The following softwares were reported to abort with segmentation fault and this patch fixes it: o cmake o smartd o devel/ORBit2 dim@ opened an LLVM PR to discuss this clang optimization: http://llvm.org/bugs/show_bug.cgi?id=12656 Tested by: bsam@
OpenPOWER on IntegriCloud