]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoChange tablearg value to be 0 (try #2).
Alexander V. Chernikov [Tue, 12 Aug 2014 15:51:48 +0000 (15:51 +0000)]
Change tablearg value to be 0 (try #2).
Most of the tablearg-supported opcodes does not accept 0 as valid value:
 O_TAG, O_TAGGED, O_PIPE, O_QUEUE, O_DIVERT, O_TEE, O_SKIPTO, O_CALLRET,
 O_NETGRAPH, O_NGTEE, O_NAT treats 0 as invalid input.

The rest are O_SETDSCP and O_SETFIB.
'Fix' them by adding high-order bit (0x8000) set for non-tablearg values.
Do translation in kernel for old clients (import_rule0 / export_rule0),
teach current ipfw(8) binary to add/remove given bit.

This change does not affect handling SETDSCP values, but limit
O_SETFIB values to 32767 instead of 65k. Since currently we have either
old (16) or new (2^32) max fibs, this should not be a big deal:
we're definitely OK for former and have to add another opcode to deal
with latter, regardless of tablearg value.

10 years agoDo not use index 0 for tables.
Alexander V. Chernikov [Tue, 12 Aug 2014 14:19:45 +0000 (14:19 +0000)]
Do not use index 0 for tables.

10 years ago* Rename has_space to need_modify to be consistent with 0 as return values.
Alexander V. Chernikov [Tue, 12 Aug 2014 14:09:15 +0000 (14:09 +0000)]
* Rename has_space to need_modify to be consistent with 0 as return values.
* document all callbacks supported by algorithms code.

10 years agoNo functional changes, do better functions grouping.
Alexander V. Chernikov [Tue, 12 Aug 2014 10:22:46 +0000 (10:22 +0000)]
No functional changes, do better functions grouping.

10 years agoSimplify table auto-creation for old userland users.
Alexander V. Chernikov [Tue, 12 Aug 2014 09:48:54 +0000 (09:48 +0000)]
Simplify table auto-creation for old userland users.

10 years agoSimplify add/del_table_entry() by making their common pieces
Alexander V. Chernikov [Mon, 11 Aug 2014 22:38:13 +0000 (22:38 +0000)]
Simplify add/del_table_entry() by making their common pieces
common functions.

10 years agoUpdate functions descriptions.
Alexander V. Chernikov [Mon, 11 Aug 2014 20:00:51 +0000 (20:00 +0000)]
Update functions descriptions.

10 years ago* Add the abilify to lock/unlock given table from changes.
Alexander V. Chernikov [Mon, 11 Aug 2014 18:09:37 +0000 (18:09 +0000)]
* Add the abilify to lock/unlock given table from changes.

Example:

# ipfw table si lock
# ipfw table si info
+++ table(si), set(0) +++
 kindex: 0, type: cidr, locked
 valtype: number, references: 0
 algorithm: cidr:radix
 items: 0, size: 288
# ipfw table si add 4.5.6.7
ignored: 4.5.6.7/32 0
ipfw: Adding record failed: table is locked
# ipfw table si unlock
# ipfw table si add 4.5.6.7
added: 4.5.6.7/32 0
# ipfw table si lock
# ipfw table si delete 4.5.6.7
ignored: 4.5.6.7/32 0
ipfw: Deleting record failed: table is locked
# ipfw table si unlock
# ipfw table si delete 4.5.6.7
deleted: 4.5.6.7/32 0

10 years ago* Add support for batched add/delete for ipfw tables
Alexander V. Chernikov [Mon, 11 Aug 2014 17:34:25 +0000 (17:34 +0000)]
* Add support for batched add/delete for ipfw tables
* Add support for atomic batches add (all or none).
* Fix panic on deleting non-existing entry in radix algo.

Examples:

# si is empty
# ipfw table si add 1.1.1.1/32 1111 2.2.2.2/32 2222
added: 1.1.1.1/32 1111
added: 2.2.2.2/32 2222
# ipfw table si add 2.2.2.2/32 2200 4.4.4.4/32 4444
exists: 2.2.2.2/32 2200
added: 4.4.4.4/32 4444
ipfw: Adding record failed: record already exists
^^^^^ Returns error but keeps inserted items
# ipfw table si list
+++ table(si), set(0) +++
1.1.1.1/32 1111
2.2.2.2/32 2222
4.4.4.4/32 4444
# ipfw table si atomic add 3.3.3.3/32 3333 4.4.4.4/32 4400 5.5.5.5/32 5555
added(reverted): 3.3.3.3/32 3333
exists: 4.4.4.4/32 4400
ignored: 5.5.5.5/32 5555
ipfw: Adding record failed: record already exists
^^^^^ Returns error and reverts added records
# ipfw table si list
+++ table(si), set(0) +++
1.1.1.1/32 1111
2.2.2.2/32 2222
4.4.4.4/32 4444

10 years ago* Use 2 32-bits field inside rule instead of 2 pointer to save skipto state.
Alexander V. Chernikov [Sat, 9 Aug 2014 09:11:26 +0000 (09:11 +0000)]
* Use 2 32-bits field inside rule instead of 2 pointer to save skipto state.
* Introduce ipfw_reap_add() to unify unlinking rules/adding it to reap queue
* Unbreak FreeBSD7 export format.

10 years agoKernel changes:
Alexander V. Chernikov [Fri, 8 Aug 2014 21:09:22 +0000 (21:09 +0000)]
Kernel changes:
* Fix buffer calculation for table dumps
* Fix IPv6 radix entiries addition broken in r269371.

Userland changes:
* Fix bug in retrieving statric ruleset
* Fix several bugs in retrieving table list

10 years agoPartially revert previous commit:
Alexander V. Chernikov [Fri, 8 Aug 2014 15:33:26 +0000 (15:33 +0000)]
Partially revert previous commit:
"0" value is perfectly valid for O_SETFIB and O_SETDSCP,
  so tablearg remains to be 655535 for now.

10 years ago* Switch tablearg value from 65535 to 0.
Alexander V. Chernikov [Fri, 8 Aug 2014 14:23:20 +0000 (14:23 +0000)]
* Switch tablearg value from 65535 to 0.
* Use u16 table kidx instead of integer on for iface opcode.
* Provide compability layer for old clients.

10 years ago* Add IP_FW_TABLE_XMODIFY opcode
Alexander V. Chernikov [Fri, 8 Aug 2014 09:27:49 +0000 (09:27 +0000)]
* Add IP_FW_TABLE_XMODIFY opcode
* Since there seems to be lack of consensus on strict value typing,
  remove non-default value types. Use userland-only "value format type"
  to print values.

Kernel changes:
* Add IP_FW_XMODIFY to permit table run-time modifications.
  Currently we support changing limit and value format type.

Userland changes:
* Support IP_FW_XMODIFY opcode.
* Support specifying value format type (ftype) in tablble create/modify req
* Fine-print value type/value format type.

10 years agoRemove IP_FW_TABLES_XGETSIZE opcode.
Alexander V. Chernikov [Fri, 8 Aug 2014 06:36:26 +0000 (06:36 +0000)]
Remove IP_FW_TABLES_XGETSIZE opcode.
It is superseded by IP_FW_TABLES_XLIST.

10 years agoSince all of base IP_FW opcodes has been converted to IP_FW3,
Alexander V. Chernikov [Thu, 7 Aug 2014 22:08:43 +0000 (22:08 +0000)]
Since all of base IP_FW opcodes has been converted to IP_FW3,
switch default sopt handler to ipfw_clt3.
Add some comments for ipfw_get_sopt* api.

10 years agoKernel changes:
Alexander V. Chernikov [Thu, 7 Aug 2014 21:37:31 +0000 (21:37 +0000)]
Kernel changes:
* Implement proper checks for switching between global and set-aware tables
* Split IP_FW_DEL mess into the following opcodes:
  * IP_FW_XDEL (del rules matching pattern)
  * IP_FW_XMOVE (move rules matching pattern to another set)
  * IP_FW_SET_SWAP (swap between 2 sets)
  * IP_FW_SET_MOVE (move one set to another one)
  * IP_FW_SET_ENABLE (enable/disable sets)
* Add IP_FW_XZERO / IP_FW_XRESETLOG to finish IP_FW3 migration.
* Use unified ipfw_range_tlv as range description for all of the above.
* Check dynamic states IFF there was non-zero number of deleted dyn rules,
* Del relevant dynamic states with singe traversal instead of per-rule one.

Userland changes:
* Switch ipfw(8) to use new opcodes.

10 years agoImplement atomic ipfw table swap.
Alexander V. Chernikov [Sun, 3 Aug 2014 21:37:12 +0000 (21:37 +0000)]
Implement atomic ipfw table swap.

Kernel changes:
* Add opcode IP_FW_TABLE_XSWAP
* Add support for swapping 2 tables with the same type/ftype/vtype.
* Make skipto cache init after ipfw locks init.

Userland changes:
* Add "table X swap Y" command.

10 years ago* Move "talist" and "iflist" cmds into newly-create "internal" ipfw(8) cmd.
Alexander V. Chernikov [Sun, 3 Aug 2014 16:22:14 +0000 (16:22 +0000)]
* Move "talist" and "iflist" cmds into newly-create "internal" ipfw(8) cmd.
* Add "table X detail" cmd and show detailed algo info there instead
  of "info".

10 years agoImplement O(1) skipto using indexed array.
Alexander V. Chernikov [Sun, 3 Aug 2014 15:49:03 +0000 (15:49 +0000)]
Implement O(1) skipto using indexed array.
This adds 512K (2 * sizeof(u32) * 65k) bytes to the memory footprint.
This feature is optionaly and may be turned on in any time
(however it starts immediately in this commit. This will be changed.)

10 years agoShow algorithm-specific data in "table info" output.
Alexander V. Chernikov [Sun, 3 Aug 2014 12:19:45 +0000 (12:19 +0000)]
Show algorithm-specific data in "table info" output.

10 years agoBe consistent on cidr:radix function naming: use algo name instead
Alexander V. Chernikov [Sun, 3 Aug 2014 09:53:34 +0000 (09:53 +0000)]
Be consistent on cidr:radix function naming: use algo name instead
  of "cidr".

10 years agoRemove unneded headers.
Alexander V. Chernikov [Sun, 3 Aug 2014 09:48:54 +0000 (09:48 +0000)]
Remove unneded headers.

10 years agoWhitespace changes.
Alexander V. Chernikov [Sun, 3 Aug 2014 09:40:50 +0000 (09:40 +0000)]
Whitespace changes.

10 years ago* Move all algo-specific structures to the top of algo definition.
Alexander V. Chernikov [Sun, 3 Aug 2014 09:04:36 +0000 (09:04 +0000)]
* Move all algo-specific structures to the top of algo definition.
* Be consistent on naming variables in different algos.
* Use exponential array grow in iface:array and number:array.

10 years agoStore entry value back in @tei on entry update/deletion as another step
Alexander V. Chernikov [Sun, 3 Aug 2014 08:32:54 +0000 (08:32 +0000)]
Store entry value back in @tei on entry update/deletion as another step
  to batched atomic updates.

10 years ago* Fix case when returning more that 4096 bytes of data
Alexander V. Chernikov [Sat, 2 Aug 2014 17:18:47 +0000 (17:18 +0000)]
* Fix case when returning more that 4096 bytes of data
* Use different approach to ensure algo has enough space to store N elements:
  - explicitly ask algo (under UH_WLOCK) before/after insertion.  This (along
    with existing reallocation callbacks) really guarantees us that it is safe
    to insert N elements at once while holding UH_WLOCK+WLOCK.
  - remove old aflags/flags approach

10 years ago* Permit limiting number of items in table.
Alexander V. Chernikov [Fri, 1 Aug 2014 15:17:46 +0000 (15:17 +0000)]
* Permit limiting number of items in table.

Kernel changes:
* Add TEI_FLAGS_DONTADD entry flag to indicate that insert is not possible
* Support given flag in all algorithms
* Add "limit" field to ipfw_xtable_info
* Add actual limiting code into add_table_entry()

Userland changes:
* Add "limit" option as "create" table sub-option. Limit modification
  is currently impossible.
* Print human-readable errors in table enry addition/deletion code.

10 years agoDo not perform memset() on ta_buf in algo callbacks:
Alexander V. Chernikov [Fri, 1 Aug 2014 08:39:47 +0000 (08:39 +0000)]
Do not perform memset() on ta_buf in algo callbacks:
  it is already zeroed by base code.

10 years agoSimplify radix operations: use unified tei_to_sockaddr_ent() to generate
Alexander V. Chernikov [Fri, 1 Aug 2014 08:28:18 +0000 (08:28 +0000)]
Simplify radix operations: use unified tei_to_sockaddr_ent() to generate
  keys for add/delete calls.

10 years ago* Use TA_FLAG_DEFAULT for default algorithm selection instead of
Alexander V. Chernikov [Fri, 1 Aug 2014 07:35:17 +0000 (07:35 +0000)]
* Use TA_FLAG_DEFAULT for default algorithm selection instead of
  exporting algorithm structures directly.

* Pass needed state buffer size in algo structures as preparation
  for tables add/del requests batching.

10 years ago* Add new "flow" table type to support N=1..5-tuple lookups
Alexander V. Chernikov [Thu, 31 Jul 2014 20:08:19 +0000 (20:08 +0000)]
* Add new "flow" table type to support N=1..5-tuple lookups
* Add "flow:hash" algorithm

Kernel changes:
* Add O_IP_FLOW_LOOKUP opcode to support "flow" lookups
* Add IPFW_TABLE_FLOW table type
* Add "struct tflow_entry" as strage for 6-tuple flows
* Add "flow:hash" algorithm. Basically it is auto-growing chained hash table.
  Additionally, we store mask of fields we need to compare in each instance/

* Increase ipfw_obj_tentry size by adding struct tflow_entry
* Add per-algorithm stat (ifpw_ta_tinfo) to ipfw_xtable_info
* Increase algoname length: 32 -> 64 (algo options passed there as string)
* Assume every table type can be customized by flags, use u8 to store "tflags" field.
* Simplify ipfw_find_table_entry() by providing @tentry directly to algo callback.
* Fix bug in cidr:chash resize procedure.

Userland changes:
* add "flow table(NAME)" syntax to support n-tuple checking tables.
* make fill_flags() separate function to ease working with _s_x arrays
* change "table info" output to reflect longer "type" fields

Syntax:
ipfw table fl2 create type flow:[src-ip][,proto][,src-port][,dst-ip][dst-port] [algo flow:hash]

Examples:

0:02 [2] zfscurr0# ipfw table fl2 create type flow:src-ip,proto,dst-port algo flow:hash
0:02 [2] zfscurr0# ipfw table fl2 info
+++ table(fl2), set(0) +++
 kindex: 0, type: flow:src-ip,proto,dst-port
 valtype: number, references: 0
 algorithm: flow:hash
 items: 0, size: 280
0:02 [2] zfscurr0# ipfw table fl2 add 2a02:6b8::333,tcp,443 45000
0:02 [2] zfscurr0# ipfw table fl2 add 10.0.0.92,tcp,80 22000
0:02 [2] zfscurr0# ipfw table fl2 list
+++ table(fl2), set(0) +++
2a02:6b8::333,6,443 45000
10.0.0.92,6,80 22000
0:02 [2] zfscurr0# ipfw add 200 count tcp from me to 78.46.89.105 80 flow 'table(fl2)'
00200 count tcp from me to 78.46.89.105 dst-port 80 flow table(fl2)
0:03 [2] zfscurr0# ipfw show
00200   0     0 count tcp from me to 78.46.89.105 dst-port 80 flow table(fl2)
65535 617 59416 allow ip from any to any
0:03 [2] zfscurr0# telnet -s 10.0.0.92 78.46.89.105 80
Trying 78.46.89.105...
..
0:04 [2] zfscurr0# ipfw show
00200   5   272 count tcp from me to 78.46.89.105 dst-port 80 flow table(fl2)
65535 682 66733 allow ip from any to any

10 years agoImprove "ipfw talist" readability.
Alexander V. Chernikov [Wed, 30 Jul 2014 15:01:32 +0000 (15:01 +0000)]
Improve "ipfw talist" readability.

10 years ago* Add number:array algorithm lookup method.
Alexander V. Chernikov [Wed, 30 Jul 2014 14:52:26 +0000 (14:52 +0000)]
* Add number:array algorithm lookup method.

Kernel changes:
* s/IPFW_TABLE_U32/IPFW_TABLE_NUMBER/
* Force "lookup <port|uid|gid|jid>" to be IPFW_TABLE_NUMBER
* Support "lookup" method for number tables
* Add number:array algorihm (i32 as key, auto-growing).

Userland changes:
* Support named tables in "lookup <tag> Table"
* Fix handling of "table(NAME,val)" case
* Support printing "number" table data.

10 years ago* Add "lookup" method for cidr:hash algorithm type.
Alexander V. Chernikov [Wed, 30 Jul 2014 12:39:49 +0000 (12:39 +0000)]
* Add "lookup" method for cidr:hash algorithm type.
* Add auoto-grow ability to cidr:hash type.
* Fix some bugs / simplify implementation for cidr:hash.

10 years agoFix "flush" cmd for algorithms wih non-default parameters.
Alexander V. Chernikov [Wed, 30 Jul 2014 09:17:40 +0000 (09:17 +0000)]
Fix "flush" cmd for algorithms wih non-default parameters.

10 years ago* Introduce ipfw_ctl3() handler and move all IP_FW3 opcodes there.
Alexander V. Chernikov [Tue, 29 Jul 2014 23:06:06 +0000 (23:06 +0000)]
* Introduce ipfw_ctl3() handler and move all IP_FW3 opcodes there.
 The long-term goal is to switch remaining opcodes to IP_FW3 versions
 and use ipfw_ctl3() as default handler simplifying ipfw(4) interaction
 with external world.

10 years ago* Dump available table algorithms via "ipfw talist" cmd.
Alexander V. Chernikov [Tue, 29 Jul 2014 22:44:26 +0000 (22:44 +0000)]
* Dump available table algorithms via "ipfw talist" cmd.

Kernel changes:
* Add type/refcount fields to table algo instances.
* Add IP_FW_TABLES_ALIST opcode to export available algorihms to userland.

Userland changes:
* Fix cores on empty input inside "ipfw table" handler.
* Add "ipfw talist" cmd to print availabled kernel algorithms.
* Change "table info" output to reflect long algorithm config lines.

10 years ago* Copy ta structures to stable storage to ease future extension.
Alexander V. Chernikov [Tue, 29 Jul 2014 21:38:06 +0000 (21:38 +0000)]
* Copy ta structures to stable storage to ease future extension.
* Remove algo .lookup field since table lookup function is set by algo code.

10 years ago* Add new ipfw cidr algorihm: hash table.
Alexander V. Chernikov [Tue, 29 Jul 2014 19:49:38 +0000 (19:49 +0000)]
* Add new ipfw cidr algorihm: hash table.
Algorithm works with both IPv4 and IPv6 prefixes, /32 and /128
ranges are assumed by default.
It works the following way: input IP address is masked to specified
mask, hashed and searched inside hash bucket.

Current implementation does not support "lookup" method and hash auto-resize.
This will be changed soon.

some examples:

ipfw table mi_test2 create type cidr algo cidr:hash
ipfw table mi_test create type cidr algo "cidr:hash masks=/30,/64"

ipfw table mi_test2 info
+++ table(mi_test2), set(0) +++
 type: cidr, kindex: 7
 valtype: number, references: 0
 algorithm: cidr:hash
 items: 0, size: 220

ipfw table mi_test info
+++ table(mi_test), set(0) +++
 type: cidr, kindex: 6
 valtype: number, references: 0
 algorithm: cidr:hash masks=/30,/64
 items: 0, size: 220

ipfw table mi_test add 10.0.0.5/30
ipfw table mi_test add 10.0.0.8/30
ipfw table mi_test add 2a02:6b8:b010::1/64 25

ipfw table mi_test list
+++ table(mi_test), set(0) +++
10.0.0.4/30 0
10.0.0.8/30 0
2a02:6b8:b010::/64 25

10 years ago* Change algorthm names to "type:algo" (e.g. "iface:array", "cidr:radix") format.
Alexander V. Chernikov [Tue, 29 Jul 2014 08:00:13 +0000 (08:00 +0000)]
* Change algorthm names to "type:algo" (e.g. "iface:array", "cidr:radix") format.
* Pass number of items changed in add/del hooks to permit adding/deleting
  multiple values at once.

10 years ago* Add generic ipfw interface tracking API
Alexander V. Chernikov [Mon, 28 Jul 2014 19:01:25 +0000 (19:01 +0000)]
* Add generic ipfw interface tracking API
* Rewrite interface tables to use interface indexes

Kernel changes:
* Add generic interface tracking API:
 - ipfw_iface_ref (must call unlocked, performs lazy init if needed, allocates
  state & bumps ref)
 - ipfw_iface_add_ntfy(UH_WLOCK+WLOCK, links comsumer & runs its callback to
  update ifindex)
 - ipfw_iface_del_ntfy(UH_WLOCK+WLOCK, unlinks consumer)
 - ipfw_iface_unref(unlocked, drops reference)
Additionally, consumer callbacks are called in interface withdrawal/departure.

* Rewrite interface tables to use iface tracking API. Currently tables are
  implemented the following way:
  runtime data is stored as sorted array of {ifidx, val} for existing interfaces
  full data is stored inside namedobj instance (chained hashed table).

* Add IP_FW_XIFLIST opcode to dump status of tracked interfaces

* Pass @chain ptr to most non-locked algorithm callbacks:
  (prepare_add, prepare_del, flush_entry ..). This may be needed for better
  interaction of given algorithm an other ipfw subsystems

* Add optional "change_ti" algorithm handler to permit updating of
  cached table_info pointer (happens in case of table_max resize)

* Fix small bug in ipfw_list_tables()
* Add badd (insert into sorted array) and bdel (remove from sorted array) funcs

Userland changes:
* Add "iflist" cmd to print status of currently tracked interface
* Add stringnum_cmp for better interface/table names sorting

10 years ago* Require explicit table creation before use on kernel side.
Alexander V. Chernikov [Sat, 26 Jul 2014 13:37:25 +0000 (13:37 +0000)]
* Require explicit table creation before use on kernel side.
* Add resize callbacks for upcoming table-based algorithms.

Kernel changes:
* s/ipfw_modify_table/ipfw_manage_table_ent/
* Simplify add_table_entry(): make table creation a separate piece of code.
  Do not perform creation if not in "compat" mode.
* Add ability to perform modification of algorithm state (like table resize).
  The following callbacks were added:
 - prepare_mod (allocate new state, without locks)
 - fill_mod (UH_WLOCK, copy old state to new one)
 - modify (UH_WLOCK + WLOCK, switch state)
 - flush_mod (no locks, flushes allocated data)
 Given callbacks are called if table modification has been requested by add or
   delete callbacks. Additional u64 tc->'flags' field was added to pass these
   requests.
* Change add/del table ent format: permit adding/removing multiple entries
   at once (only 1 supported at the moment).

Userland changes:
* Auto-create tables with warning

10 years ago* Reduce size of ipfw table entries for cidr/iface:
Alexander V. Chernikov [Wed, 9 Jul 2014 18:52:12 +0000 (18:52 +0000)]
* Reduce size of ipfw table entries for cidr/iface:

Since old structures had _value as the last field,
every table match required 3 cache lines instead of 2.
Fix this by
- using the fact that supplied masks are suplicated inside radix
- using lightweigth sa_in6 structure as key for IPv6

Before (amd64):
  sizeof(table_entry): 136
  sizeof(table_xentry): 160
After (amd64):
  sizeof(radix_cidr_entry): 120
  sizeof(radix_cidr_xentry): 128
  sizeof(radix_iface): 128

* Fix memory leak for table entry update
* Do some more sanity checks while deleting entry
* Do not store masks for host routes

Sponsored by: Yandex LLC

10 years ago* Use different rule structures in kernel/userland.
Alexander V. Chernikov [Tue, 8 Jul 2014 23:11:15 +0000 (23:11 +0000)]
* Use different rule structures in kernel/userland.
* Switch kernel to use per-cpu counters for rules.
* Keep ABI/API.

Kernel changes:
* Each rules is now exported as TLV with optional extenable
  counter block (ip_fW_bcounter for base one) and
  ip_fw_rule for rule&cmd data.
* Counters needs to be explicitly requested by IPFW_CFG_GET_COUNTERS flag.
* Separate counters from rules in kernel and clean up ip_fw a bit.
* Pack each rule in IPFW_TLV_RULE_ENT tlv to ease parsing.
* Introduce versioning in container TLV (may be needed in future).
* Fix ipfw_cfg_lheader broken u64 alignment.

Userland changes:
* Use set_mask from cfg header when requesting config
* Fix incorrect read accouting in ipfw_show_config()
* Use IPFW_RULE_NOOPT flag instead of playing with _pad
* Fix "ipfw -d list": do not print counters for dynamic states
* Some small fixes

10 years ago* Prepare to pass other dynamic states via ipfw_dump_config()
Alexander V. Chernikov [Sun, 6 Jul 2014 23:26:34 +0000 (23:26 +0000)]
* Prepare to pass other dynamic states via ipfw_dump_config()

Kernel changes:
* Change dump format for dynamic states:
  each state is now stored inside ipfw_obj_dyntlv
  last dynamic state is indicated by IPFW_DF_LAST flag
* Do not perform sooptcopyout() for !SOPT_GET requests.

Userland changes:
* Introduce foreach_state() function handler to ease work
  with different states passed by ipfw_dump_config().

10 years ago* Add "lookup" table functionality to permit userland entry lookups.
Alexander V. Chernikov [Sun, 6 Jul 2014 18:16:04 +0000 (18:16 +0000)]
* Add "lookup" table functionality to permit userland entry lookups.
* Bump table dump format preserving old ABI.

Kernel size:
* Add IP_FW_TABLE_XFIND to handle "lookup" request from userland.
* Add ta_find_tentry() algorithm callbacks/handlers to support lookups.
* Fully switch to ipfw_obj_tentry for various table dumps:
  algorithms are now required to support the latest (ipfw_obj_tentry) entry
    dump format, the rest is handled by generic dump code.
  IP_FW_TABLE_XLIST opcode version bumped (0 -> 1).
* Eliminate legacy ta_dump_entry algo handler:
  dump_table_entry() converts data from current to legacy format.

Userland side:
* Add "lookup" table parameter.
* Change the way table type is guessed: call table_get_info() first,
  and check value for IPv4/IPv6 type IFF table does not exist.
* Fix table_get_list(): do more tries if supplied buffer is not enough.
* Sparate table_show_entry() from table_show_list().

10 years ago* Issue warning while requesting ruleset with new tables via legacy binary.
Alexander V. Chernikov [Fri, 4 Jul 2014 07:02:11 +0000 (07:02 +0000)]
* Issue warning while requesting ruleset with new tables via legacy binary.
  Convert each unresolved table as table 65535 (which cannot be used normally).
* Perform s/^ipfw_// for add_table_entry, del_table_entry and flush_table since
  these are internal functions exported to keep legacy interface.
* Remove macro TABLE_SET. Operations with tables can be done in any set, the only
  thing net.inet.ip.fw.tables_sets affects is the set in which tables are looked
  up while binding them to the rule.

10 years agoFully switch to named tables:
Alexander V. Chernikov [Thu, 3 Jul 2014 22:25:59 +0000 (22:25 +0000)]
Fully switch to named tables:

Kernel changes:
* Introduce ipfw_obj_tentry table entry structure to force u64 alignment.
* Support "update-on-existing-key" "add" bahavior (TEI_FLAGS_UPDATED).
* Use "subtype" field to distingush between IPv4 and IPv6 table records
  instead of previous hack.
* Add value type (vtype) field for kernel tables. Current types are
  number,ip and dscp
* Fix sets mask retrieval for old binaries
* Fix crash while using interface tables

Userland changes:
* Switch ipfw_table_handler() to use named-only tables.
* Add "table NAME create [type {cidr|iface|u32} [valtype {number|ip|dscp}] ..."
* Switch ipfw_table_handler to match_token()-based parser.
* Switch ipfw_sets_handler to use new ipfw_get_config() for mask  retrieval.
* Allow ipfw set X table ... syntax to permit using per-set table namespaces.

10 years ago* Add new IP_FW_XADD opcode which permits to
Alexander V. Chernikov [Sun, 29 Jun 2014 22:35:47 +0000 (22:35 +0000)]
* Add new IP_FW_XADD opcode which permits to
  a) specify table ids as names
  b) add multiple rules at once.
Partially convert current code for atomic addition of multiple rules.

10 years agoEnable kernel-side rule filtering based on user request.
Alexander V. Chernikov [Sun, 29 Jun 2014 09:29:27 +0000 (09:29 +0000)]
Enable kernel-side rule filtering based on user request.
Make do_get3() function return real error.

10 years agoSuppord showing named tables in ipfw(8) rule listing.
Alexander V. Chernikov [Sat, 28 Jun 2014 23:20:24 +0000 (23:20 +0000)]
Suppord showing named tables in ipfw(8) rule listing.

Kernel changes:
* change base TLV header to be u64 (so size can be u32).
* Introduce ipfw_obj_ctlv generc container TLV.
* Add IP_FW_XGET opcode which is now used for atomic configuration
  retrieval. One can specify needed configuration pieces to retrieve
  via flags field. Currently supported are
  IPFW_CFG_GET_STATIC (static rules) and
  IPFW_CFG_GET_STATES (dynamic states).
  Other configuration pieces (tables, pipes, etc..) support is planned.

Userland changes:
* Switch ipfw(8) to use new IP_FW_XGET for rule listing.
* Split rule listing code get and show pieces.
* Make several steps forward towards libipfw:
  permit printing states and rules(paritally) to supplied buffer.
  do not die on malloc/kernel failure inside given printing functions.
  stop assuming cmdline_opts is global symbol.

10 years agoUse different approach for filling large datasets to userspace:
Alexander V. Chernikov [Fri, 27 Jun 2014 10:07:00 +0000 (10:07 +0000)]
Use different approach for filling large datasets to userspace:

Instead of trying to allocate bing contiguous chunk of memory,
use intermediate-sized (page size) buffer as sliding window
reducing number of sooptcopyout() calls to perform.

This reduces dump functions complexity and provides additional
layer of abstraction.

User-visible api consists of 2 functions:
ipfw_get_sopt_space() - gets contigious amount of storage (or NULL)
and
ipfw_get_sopt_header() - the same, but zeroes the rest of the buffer.

10 years ago* Add IP_FW_TABLE_XCREATE / IP_FW_TABLE_XMODIFY opcodes.
Alexander V. Chernikov [Mon, 16 Jun 2014 13:05:07 +0000 (13:05 +0000)]
* Add IP_FW_TABLE_XCREATE / IP_FW_TABLE_XMODIFY opcodes.
* Add 'algoname' string to ipfw_xtable_info permitting to specify lookup
algoritm with parameters.
* Rework part of ipfw_rewrite_table_uidx()

Sponsored by: Yandex LLC

10 years agoRemove unused ipfw_dump_xtable().
Alexander V. Chernikov [Sun, 15 Jun 2014 13:43:44 +0000 (13:43 +0000)]
Remove unused ipfw_dump_xtable().

10 years agoSimplify opcode handling.
Alexander V. Chernikov [Sun, 15 Jun 2014 13:40:27 +0000 (13:40 +0000)]
Simplify opcode handling.

* Use one u16 from op3 header to implement opcode versioning.
* IP_FW_TABLE_XLIST has now 2 handlers, for ver.0 (old) and ver.1 (current).
* Every getsockopt request is now handled in ip_fw_table.c
* Rename new opcodes:
IP_FW_OBJ_DEL -> IP_FW_TABLE_XDESTROY
IP_FW_OBJ_LISTSIZE -> IP_FW_TABLES_XGETSIZE
IP_FW_OBJ_LIST -> IP_FW_TABLES_XLIST
IP_FW_OBJ_INFO -> IP_FW_TABLE_XINFO
IP_FW_OBJ_INFO -> IP_FW_TABLE_XFLUSH

* Add some docs about using given opcodes.
* Group some legacy opcode/handlers.

10 years agoMove further to eliminate next pieces of number-assuming code inside tables.
Alexander V. Chernikov [Sat, 14 Jun 2014 22:47:25 +0000 (22:47 +0000)]
Move further to eliminate next pieces of number-assuming code inside tables.

Kernel changes:
* Add IP_FW_OBJ_FLUSH opcode (flush table based on its name/set)
* Add IP_FW_OBJ_DUMP opcode (dumps table data based on its names/set)
* Add IP_FW_OBJ_LISTSIZE / IP_FW_OBJ_LIST opcodes (get list of kernel tables)

Userland changes:
* move tables code to separate tables.c file
* get rid of tables_max
* switch "all"/list handling to new opcodes

10 years agoMove most of external table structures/functions to separate ip_fw_table.h
Alexander V. Chernikov [Sat, 14 Jun 2014 11:13:02 +0000 (11:13 +0000)]
Move most of external table structures/functions to separate ip_fw_table.h

10 years agoAdd ip_fw_algo.c to ipfw Makefile.
Alexander V. Chernikov [Sat, 14 Jun 2014 11:02:55 +0000 (11:02 +0000)]
Add ip_fw_algo.c to ipfw Makefile.

10 years agoAdd API to ease adding new algorithms/new tabletypes to ipfw.
Alexander V. Chernikov [Sat, 14 Jun 2014 10:58:39 +0000 (10:58 +0000)]
Add API to ease adding new algorithms/new tabletypes to ipfw.

Kernel-side changelog:
* Split general tables code and algorithm-specific table data.
  Current algorithms (IPv4/IPv6 radix and interface tables radix) moved to
  new ip_fw_table_algo.c file.
  Tables code now supports any algorithm implementing the following callbacks:
+struct table_algo {
+       char            name[64];
+       int             idx;
+       ta_init         *init;
+       ta_destroy      *destroy;
+       table_lookup_t  *lookup;
+       ta_prepare_add  *prepare_add;
+       ta_prepare_del  *prepare_del;
+       ta_add          *add;
+       ta_del          *del;
+       ta_flush_entry  *flush_entry;
+       ta_foreach      *foreach;
+       ta_dump_entry   *dump_entry;
+       ta_dump_xentry  *dump_xentry;
+};

* Change ->state, ->xstate, ->tabletype fields of ip_fw_chain to
   ->tablestate pointer (array of 32 bytes structures necessary for
   runtime lookups (can be probably shrinked to 16 bytes later):

   +struct table_info {
   +       table_lookup_t  *lookup;        /* Lookup function */
   +       void            *state;         /* Lookup radix/other structure */
   +       void            *xstate;        /* eXtended state */
   +       u_long          data;           /* Hints for given func */
   +};

* Add count method for namedobj instance to ease size calculations
* Bump ip_fw3 buffer in ipfw_clt 128->256 bytes.
* Improve bitmask resizing on tables_max change.
* Remove table numbers checking from most places.
* Fix wrong nesting in ipfw_rewrite_table_uidx().

* Add IP_FW_OBJ_LIST opcode (list all objects of given type, currently
    implemented for IPFW_OBJTYPE_TABLE).
* Add IP_FW_OBJ_LISTSIZE (get buffer size to hold IP_FW_OBJ_LIST data,
    currenly implemented for IPFW_OBJTYPE_TABLE).
* Add IP_FW_OBJ_INFO (requests info for one object of given type).

Some name changes:
s/ipfw_xtable_tlv/ipfw_obj_tlv/ (no table specifics)
s/ipfw_xtable_ntlv/ipfw_obj_ntlv/ (no table specifics)

Userland changes:
* Add do_set3() cmd to ipfw2 to ease dealing with op3-embeded opcodes.
* Add/improve support for destroy/info cmds.

10 years agoMake ipfw tables use names as used-level identifier internally:
Alexander V. Chernikov [Thu, 12 Jun 2014 09:59:11 +0000 (09:59 +0000)]
Make ipfw tables use names as used-level identifier internally:

* Add namedobject set-aware api capable of searching/allocation objects by their name/idx.
* Switch tables code to use string ids for configuration tasks.
* Change locking model: most configuration changes are protected with UH lock, runtime-visible are protected with both locks.
* Reduce number of arguments passed to ipfw_table_add/del by using separate structure.
* Add internal V_fw_tables_sets tunable (set to 0) to prepare for set-aware tables (requires opcodes/client support)
* Implement typed table referencing (and tables are implicitly allocated with all state like radix ptrs on reference)
* Add "destroy" ipfw(8) using new IP_FW_DELOBJ opcode

Namedobj more detailed:
* Blackbox api providing methods to add/del/search/enumerate objects
* Statically-sized hashes for names/indexes
* Per-set bitmask to indicate free indexes
* Separate methods for index alloc/delete/resize

Basically, there should not be any user-visible changes except the following:
* reducing table_max is not supported
* flush & add change table type won't work if table is referenced

Sponsored by: Yandex LLC

10 years agoFix path for zlib examples, this have no runtime effect and was
Xin LI [Wed, 11 Jun 2014 20:48:40 +0000 (20:48 +0000)]
Fix path for zlib examples, this have no runtime effect and was
overlooked when I was doing zlib update.

MFC after: 2 weeks

10 years ago- Unmap static DMA buffers allocated via bus_dmemem_alloc() before
John Baldwin [Wed, 11 Jun 2014 20:46:23 +0000 (20:46 +0000)]
- Unmap static DMA buffers allocated via bus_dmemem_alloc() before
  freeing them instead of after.
- Check the bus address of a static DMA buffer to decide if the associated
  map should be unloaded.
- Don't try to destroy bus dma maps for static DMA buffers.

Reviewed by: davidcs

10 years agoAdd a zlib pkg-config file (more and more ports requires it)
Baptiste Daroussin [Wed, 11 Jun 2014 20:44:54 +0000 (20:44 +0000)]
Add a zlib pkg-config file (more and more ports requires it)

Approved by: delphij
MFC after: 1 week

10 years agoUnload maps for DMA buffers allocated via bus_dmamem_alloc() before
John Baldwin [Wed, 11 Jun 2014 20:44:02 +0000 (20:44 +0000)]
Unload maps for DMA buffers allocated via bus_dmamem_alloc() before
freeing the buffers.

Reviewed by: davidcs

10 years agoFix decoding of near CALL when address-size prefix (67h) is present.
Xin LI [Wed, 11 Jun 2014 20:38:14 +0000 (20:38 +0000)]
Fix decoding of near CALL when address-size prefix (67h) is present.

Submitted by: Wolf Ramovsky <wolf.ramovsky gmail.com>
via core (peter)
MFC after: 2 weeks

10 years agoFix decoding of LEA when address-size prefix (67h) is present.
Xin LI [Wed, 11 Jun 2014 20:31:41 +0000 (20:31 +0000)]
Fix decoding of LEA when address-size prefix (67h) is present.

This is loosly based on Xorg changeset f57bc0e by Christian
Zander.

Submitted by: Wolf Ramovsky <wolf.ramovsky gmail.com>
via core (peter)
MFC after: 2 weeks

10 years agoFix decoding of MOVSX.
Xin LI [Wed, 11 Jun 2014 20:22:14 +0000 (20:22 +0000)]
Fix decoding of MOVSX.

Submitted by: Wolf Ramovsky <wolf.ramovsky gmail.com>
via core (peter)
MFC after: 2 weeks

10 years agoUse Mt macro to properly format mailto links (patch from Franco Fichtner <franco...
Baptiste Daroussin [Wed, 11 Jun 2014 20:20:14 +0000 (20:20 +0000)]
Use Mt macro to properly format mailto links (patch from Franco Fichtner <franco@lastsummer.de> for Dragonfly)

Reviewed by: des
Approved by: des
Obtained from: Dragonfly
MFC after: 1 week

10 years agoApply vendor fixes to the High Point drivers:
Xin LI [Wed, 11 Jun 2014 18:24:51 +0000 (18:24 +0000)]
Apply vendor fixes to the High Point drivers:

 - Don't call xpt_free_path() in os_query_remove_device() and
   always return TRUE.
 - Update os_buildsgl() to support build logical SG table which
   will be used by lower RAID module.
 - Return CAM_SEL_TIMEOUTstatus for SCSIcommand failed as target
   missing.

Many thanks to HighPoint for providing this driver update.

Submitted by: Steve Chang
Reviewed by: mav
MFC after: 3 days

10 years agoAvoid leaking file pointer on error
Ed Maste [Wed, 11 Jun 2014 17:19:57 +0000 (17:19 +0000)]
Avoid leaking file pointer on error

CID: 12225061222505

10 years agoFix a few more drivers that were explicitly destroying the bus_dma
John Baldwin [Wed, 11 Jun 2014 17:03:14 +0000 (17:03 +0000)]
Fix a few more drivers that were explicitly destroying the bus_dma
map created by bus_dmamem_alloc().

10 years agoCorrect a bug in the management of the population map on big-endian
Alan Cox [Wed, 11 Jun 2014 16:11:12 +0000 (16:11 +0000)]
Correct a bug in the management of the population map on big-endian
machines.  Specifically, there was a mismatch between how the routine
allocation and deallocation operations accessed the population map
and how the aggressively optimized reservation-breaking operation
accessed it.  So, problems only occurred when reservations were broken.
This change makes the routine operations access the population map in
the same way as the reservation breaking operation.

This bug was introduced in r259999.

PR: 187080
Tested by: jmg (on an "armeb" machine)
Sponsored by: EMC / Isilon Storage Division

10 years agoFix various NIC drivers to properly cleanup static DMA resources.
John Baldwin [Wed, 11 Jun 2014 14:53:58 +0000 (14:53 +0000)]
Fix various NIC drivers to properly cleanup static DMA resources.
In particular, don't check the value of the bus_dma map against NULL
to determine if either bus_dmamem_alloc() or bus_dmamap_load() succeeded.
Instead, assume that bus_dmamap_load() succeeeded (and thus that
bus_dmamap_unload() should be called) if the bus address for a resource
is non-zero, and assume that bus_dmamem_alloc() succeeded (and thus
that bus_dmamem_free() should be called) if the virtual address for a
resource is not NULL.

In many cases these bugs could result in leaks when a driver was detached.

Reviewed by: yongari
MFC after: 2 weeks

10 years agoRemove unneeded mountlist_mtx acquisition from sync_fsync().
Alexander Motin [Wed, 11 Jun 2014 12:56:49 +0000 (12:56 +0000)]
Remove unneeded mountlist_mtx acquisition from sync_fsync().

All struct mount fields accessed by sync_fsync() are protected by MNT_MTX.

10 years agoImprove logic besides net.bpf.optimize_writers.
Alexander V. Chernikov [Wed, 11 Jun 2014 11:27:44 +0000 (11:27 +0000)]
Improve logic besides net.bpf.optimize_writers.
Direct bpf(4) consumers should now work fine with this tunable turned on.
In fact, the only case when optimized_writers can change program
behavior is direct bpf(4) consumer setting its read filter to
catch-all one.

MFC after: 2 weeks
Sponsored by: Yandex LLC

10 years agoAdd disklabel64 support
Andrey V. Elsukov [Wed, 11 Jun 2014 10:48:11 +0000 (10:48 +0000)]
Add disklabel64 support

MFC after: 2 weeks

10 years agoAdd disklabel64 support to GEOM_PART class.
Andrey V. Elsukov [Wed, 11 Jun 2014 10:42:34 +0000 (10:42 +0000)]
Add disklabel64 support to GEOM_PART class.

This partitioning scheme is used in DragonFlyBSD. It is similar to
BSD disklabel, but has the following improvements:
* metadata has own dedicated place and isn't accessible through partitions;
* all offsets are 64-bit;
* supports 16 partitions by default (has reserved place for more);
* has reserved place for backup label (but not yet implemented);
* has UUIDs for partitions and partition types;

No objections from: geom
MFC after: 2 weeks
Relnotes: yes

10 years agoAllow swapping to DragonFlyBSD's swap partition.
Andrey V. Elsukov [Wed, 11 Jun 2014 10:23:49 +0000 (10:23 +0000)]
Allow swapping to DragonFlyBSD's swap partition.

MFC after: 2 weeks

10 years agoAdd aliases for DragonFlyBSD's partition types.
Andrey V. Elsukov [Wed, 11 Jun 2014 10:19:11 +0000 (10:19 +0000)]
Add aliases for DragonFlyBSD's partition types.

MFC after: 2 weeks

10 years agoAdd DragonFlyBSD's Hammer FS types and type names.
Andrey V. Elsukov [Wed, 11 Jun 2014 10:14:40 +0000 (10:14 +0000)]
Add DragonFlyBSD's Hammer FS types and type names.

MFC after: 2 weeks

10 years agoAdd UUIDs for DragonFlyBSD's partition types.
Andrey V. Elsukov [Wed, 11 Jun 2014 10:13:08 +0000 (10:13 +0000)]
Add UUIDs for DragonFlyBSD's partition types.

MFC after: 2 weeks

10 years agoAdd a driver for Serial Peripheral Interface (SPI).
Ruslan Bukin [Wed, 11 Jun 2014 10:03:06 +0000 (10:03 +0000)]
Add a driver for Serial Peripheral Interface (SPI).

10 years agoMove root_mount_hold() functionality to separate mutex.
Alexander Motin [Wed, 11 Jun 2014 08:14:08 +0000 (08:14 +0000)]
Move root_mount_hold() functionality to separate mutex.

It has nothing to share with mutex protecting list of mounted file systems.

10 years agoUse bitwise OR instead of logical OR when constructing value for
Jim Harris [Tue, 10 Jun 2014 21:40:43 +0000 (21:40 +0000)]
Use bitwise OR instead of logical OR when constructing value for
SET_FEATURES/NUMBER_OF_QUEUES command.

Sponsored by: Intel
MFC after: 3 days

10 years agoDon't destroy bus_dma maps created by bus_dmamem_alloc(). In some cases,
John Baldwin [Tue, 10 Jun 2014 20:25:45 +0000 (20:25 +0000)]
Don't destroy bus_dma maps created by bus_dmamem_alloc().  In some cases,
don't create a map before calling bus_dmamem_alloc() (such maps were
leaked).  It is believed that the extra destroy of the map was generally
harmless since bus_dmamem_alloc() often uses special maps for which
bus_dmamap_destroy() is a no-op (e.g. on x86).

Reviewed by: scottl

10 years agoReplace enum forward declarations with complete definitions.
Tycho Nightingale [Tue, 10 Jun 2014 18:46:00 +0000 (18:46 +0000)]
Replace enum forward declarations with complete definitions.

Reviewed by: neel

10 years agovt fontcvt: move to usr.bin/vtfontcvt
Ed Maste [Tue, 10 Jun 2014 18:29:45 +0000 (18:29 +0000)]
vt fontcvt: move to usr.bin/vtfontcvt

vtfontcvt is useful for end users to convert arbitrary bitmap fonts
for use by vt(4).  It can also be used as a build tool, allowing us
to keep the source font data in the src tree rather than uuencoded
binaries.

Reviewed by: ray, wblock (D183)
Sponsored by: The FreeBSD Foundation

10 years agoPF_BLUETOOTH protocols: skip initialization of non-virtualized globals
Mikolaj Golub [Tue, 10 Jun 2014 18:21:37 +0000 (18:21 +0000)]
PF_BLUETOOTH protocols: skip initialization of non-virtualized globals
for non-default VNET instances.

This fixes panic on a vnet initialization when ng_btsocket is loaded.

MFC after: 1 week

10 years agoIn some scenarios, when generating llvm/clang .inc.h files, multiple
Dimitry Andric [Tue, 10 Jun 2014 17:54:24 +0000 (17:54 +0000)]
In some scenarios, when generating llvm/clang .inc.h files, multiple
source files could be passed to tblgen or clang-tblgen, leading to a
"Too many positional arguments specified" error message.  Fix this by
replacing the too-generic ${.ALLSRC} sources with explicit paths.

Reported by: rysto32@gmail.com, rodrigc
MFC after: 3 days

10 years agoStrip out the test suite from the installation media.
Julio Merino [Tue, 10 Jun 2014 17:05:41 +0000 (17:05 +0000)]
Strip out the test suite from the installation media.

This affects the disc1.iso, dvd1.iso and bootonly.iso files.

Obtained from: gjb

10 years agoPut the test suite in its own tests.txz distribution file.
Julio Merino [Tue, 10 Jun 2014 17:04:30 +0000 (17:04 +0000)]
Put the test suite in its own tests.txz distribution file.

Force all the contents of /usr/tests to go into a separate distribution
file so that users of binary releases can easily choose to not install it.

To make this possible, we need two fixes:
- bsd.subdir.mk needs to properly honor NO_SUBDIR in all cases so that we
  do not recurse into 'tests' subdirectories when we needn't.  Otherwise,
  we end up with some Kyuafiles in base.txz.
- etc/Makefile needs to skip installing tests in its 'distribute' target
  so that a Kyuafile doesn't leak into base.txz.

Approved by: gjb

10 years agoAdd helper functions to populate VM exit information for rendezvous and
Neel Natu [Tue, 10 Jun 2014 16:45:58 +0000 (16:45 +0000)]
Add helper functions to populate VM exit information for rendezvous and
astpending exits. This is to reduce code duplication between VT-x and
SVM implementations.

10 years agoAdd support for the SCTP_LOCAL_TRACE_BUF options.
Michael Tuexen [Tue, 10 Jun 2014 16:11:20 +0000 (16:11 +0000)]
Add support for the SCTP_LOCAL_TRACE_BUF options.
While there, fix some whitespaces.

MFC after: 1 week

10 years agochange the netmap mbuf destructor so the same code works also on FreeBSD 9.
Luigi Rizzo [Tue, 10 Jun 2014 16:06:59 +0000 (16:06 +0000)]
change the netmap mbuf destructor so the same code works also on FreeBSD 9.
For head and 10 this change has no effect, but on stable/9 it would cause
panics when using emulated netmap on top of a standard device driver.

10 years agoFix indentation level.
Glen Barber [Tue, 10 Jun 2014 15:20:41 +0000 (15:20 +0000)]
Fix indentation level.

MFC after: 3 days
X-MFC-With: r267326
Sponsored by: The FreeBSD Foundation

10 years agoAdd empty pkg-stage file to CLEANFILES if WITH_DVD=1.
Glen Barber [Tue, 10 Jun 2014 15:19:28 +0000 (15:19 +0000)]
Add empty pkg-stage file to CLEANFILES if WITH_DVD=1.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agovt fontcvt: handle failure writing output font
Ed Maste [Tue, 10 Jun 2014 12:59:56 +0000 (12:59 +0000)]
vt fontcvt: handle failure writing output font

10 years agoAvoid the USB device disconnected and controller shutdown clutter on system
Marius Strobl [Tue, 10 Jun 2014 08:20:00 +0000 (08:20 +0000)]
Avoid the USB device disconnected and controller shutdown clutter on system
shutdown by putting the former under !rebooting and turning the latter into
debug messages.

Reviewed by: hps
MFC after: 1 week
Sponsored by: Bally Wulff Games & Entertainment GmbH

10 years agoacpiconf(8): tell users not to use -k
Eitan Adler [Tue, 10 Jun 2014 08:15:41 +0000 (08:15 +0000)]
acpiconf(8): tell users not to use -k
Add language from jhb

Requested by: jhb, jkim