Commit Graph

151089 Commits

Author SHA1 Message Date
Gavin Atkinson
f9e27ffac5 Merge r204165 from head:
Add a "-x" option to chown(8)/chgrp(1) similar to the same option in
  du(1), cp(1) etc, to prevent the crossing of mountpoints whilst using the
  commands recursively.

PR:		bin/130855
Submitted by:	keramida
2010-03-25 12:56:20 +00:00
Ed Schouten
4ae65fe952 MFC r205008 and 205009:
Make script(1) a little less broken.

  Close the file descriptor to the TTY. There is no reason why the parent
  process should keep track of the descriptor. This ensures that the
  application inside properly drains the TTY during exit(2).

  Reported by:  alfred
2010-03-25 08:33:56 +00:00
Maxim Sobolev
934f51ed85 MFC: Allow comment in the middle of the line. 2010-03-25 02:14:04 +00:00
Luigi Rizzo
8c5156f3ef fix handling of "ipfw set N ..."
Submitted by:	Marcin Wisnicki
2010-03-24 23:08:25 +00:00
Luigi Rizzo
51aa112a4c typo... 2010-03-24 19:20:49 +00:00
Luigi Rizzo
f818fb9969 make the module loadable
Submitted by:	Marcin Wisnicki
2010-03-24 18:37:58 +00:00
Pyun YongHyeon
5c55bc1bf1 MFC r205161:
It seems PCI_OUR_REG_[1-5] registers are not mapped on PCI
  configuration space on Yukon Ultra(88E8056) such that accesses to
  these registers were NOPs which in turn make msk(4) instable on
  this controller. Use indirect access method to access
  PCI_OUR_REG_[1-5] registers. This should fix a long standing
  instability bug which prevented msk(4) working on Yukon Ultra.
  Special thanks to koitsu who gave me remote access to his system.

  PR:	kern/114631, kern/116853
2010-03-24 17:36:56 +00:00
Pyun YongHyeon
f305cd92af MFC r204975,204978-204979,204981:
r204975:
  Enable hardware fixes for BCM5704 B0 as recommended by data sheet.
r204978:
  Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
  Also disable relaxed ordering as recommended by data sheet for
  PCI-X devices. For PCI-X BCM5704, set maximum outstanding split
  transactions to 0 as indicated by data sheet.
  For BCM5703 in PCI-X mode, DMA read watermark should be less than
  or equal to maximum read byte count configuration. Enforce this
  limitation in DMA read watermark configuration.
r204979:
  Fix typo in r204975.
r204981:
  Fix typo in r204978.
2010-03-24 17:29:32 +00:00
Pyun YongHyeon
51e48a8ee4 MFC r204545:
Remove taskqueue based interrupt handling. After r204541 msk(4)
  does not generate excessive interrupts any more so we don't need
  to have two copies of interrupt handler.
  While I'm here remove two STAT_PUT_IDX register accesses in LE
  status event handler. After r204539 msk(4) always sync status LEs
  so there is no need to resort to reading STAT_PUT_IDX register to
  know the end of status LE processing. Just trust status LE's
  ownership bit.
2010-03-24 17:18:44 +00:00
Pyun YongHyeon
0f6d584c9b MFC r204543:
Document newly added loader tunable and sysctl variable dev.mskc.%d.int_holdoff
2010-03-24 17:15:04 +00:00
Pyun YongHyeon
51574f1152 MFC r204541:
Implement rudimentary interrupt moderation with programmable
  countdown timer register. The timer resolution may vary among
  controllers but the value would be represented by core clock
  cycles. msk(4) will automatically computes number of required clock
  cycles from given micro-seconds unit.
  The default interrupt holdoff timer value is 100us which will
  ensure less than 10k interrupts under load. The timer value can be
  changed with dev.mskc.0.int_holdoff sysctl node.

  Note, the interrupt moderation is shared resource on dual-port
  controllers so you can't use separate interrupt moderation value
  for each port. This means we can't stop interrupt moderation in
  driver stop routine. Also have msk_tick() reclaim transmitted Tx
  buffers as safety belt. With this change there is no need to check
  missing Tx completion interrupt in watchdog handler, so remove it.
2010-03-24 17:11:01 +00:00
Luigi Rizzo
7da98b8ab6 MFC 205602:
Honor ip.fw.one_pass when a packet comes out of a pipe without being delayed.
I forgot to handle this case when i did the mtag cleanup three months ago.

I am merging immediately because this bugfix is important for
people using RELENG_8.

PR:           145004
2010-03-24 15:19:47 +00:00
Luigi Rizzo
183fd3c950 MFC r200636, list all files needed to build the ipfw module
Submitted by:	Alexander Wittig
2010-03-24 15:11:10 +00:00
Konstantin Belousov
9e211e5715 MFC r204475:
Mark msdosfs as mpsafe.
2010-03-24 14:56:56 +00:00
Konstantin Belousov
3d9ee8abe2 MFC r204589:
Do not leak vnode lock when msdosfs mount is updated and specified
device is different from the device used to the original mount.
2010-03-24 14:53:28 +00:00
Konstantin Belousov
a8428ad0f1 MFC r204474:
Fix the race between dotdot lookup and forced unmount, by using
msdosfs-specific variant of vn_vget_ino(), msdosfs_deget_dotdot().

As was done for UFS, relookup the dotdot denode after the call to
msdosfs_deget_dotdot(), because vnode lock is dropped and directory
might be moved.

MFC r204675:
When returning error from msdosfs_lookup(), make sure that *vpp is NULL.
2010-03-24 14:50:04 +00:00
Konstantin Belousov
7825951721 MFC r204473:
Use pm_fatlock to protect per-filesystem rb tree used to allocate fileno
on the large FAT volumes.
2010-03-24 14:45:50 +00:00
Konstantin Belousov
255ca65791 MFC r204472:
Add assertions for FAT bitmap state.
2010-03-24 14:43:19 +00:00
Konstantin Belousov
05ecce0c28 MFC r204471:
Use pm_fatlock to protect fat bitmap.
2010-03-24 14:37:17 +00:00
Konstantin Belousov
3a141f45c5 MFC r204470:
Add per-mountpoint lockmgr lock for msdosfs.

MFC r204576:
Only destroy pm_fatlock on error if it was initialized.
2010-03-24 14:25:15 +00:00
Konstantin Belousov
670baf9dfe MFC r204469:
In msdosfs deget(), properly handle the case when the vnode is found in hash.
2010-03-24 14:18:10 +00:00
Konstantin Belousov
ac8743bcd3 MFC r204468:
In msdosfs_inactive(), reclaim the vnodes both for SLOT_DELETED and
SLOT_EMPTY deName[0] values.
2010-03-24 14:15:46 +00:00
Konstantin Belousov
b2c1c014b3 MFC r204467:
Remove seemingly unneeded unlock/relock of the dvp in msdosfs_rmdir,
causing LOR.
2010-03-24 14:13:27 +00:00
Konstantin Belousov
1a07617f97 MFC r204466:
Assert that the msdosfs vnode is (e)locked in several places.
Change the check and return on impossible condition into KASSERT().
2010-03-24 14:10:08 +00:00
Konstantin Belousov
99cb1f2430 MFC r204465:
Remove unused global statistic about fat cache usage.
2010-03-24 14:08:01 +00:00
Ed Schouten
63f82f9410 MFC r205329 and r205335:
Don't add the atrun-line to the crontab when MK_AT is set.

  This prevents spurious calls to sendmail every 5 minutes.
2010-03-24 12:14:59 +00:00
Ed Schouten
be24350167 MFC r205296:
Properly progress through the list of IPv6 addresses using in6_addr size.

  Right now if a jail has multiple IPv6 addresses, it will print them
  shifting only 4 bytes at a time. Example:

        2001:4dd0:ff41::b23f:a9
        2001:4dd0:ff41::b23f:aa

  Becomes:

        2001:4dd0:ff41::b23f:a9
        ff41::b23f:a9:2001:4dd0

  By casting to in6_addr, it uses the correct offsets.
2010-03-24 12:11:59 +00:00
Konstantin Belousov
2dec7615c6 MFC r204957:
Fall back to wbinvd when region for CLFLUSH is >= 2MB.

MFC r205334 (by avg):
Fix a typo in a comment.
2010-03-24 09:45:17 +00:00
Konstantin Belousov
3770189a65 MFC r205416:
Correct the type for uio_resid.
2010-03-24 09:27:12 +00:00
Jilles Tjoelker
135346b2c1 MFC r205398: Do not create *.gmon files for PIE executables on i386.
Scrt1_c.o was accidentally compiled with -DGCRT (profiling), like gcrt1_c.o.
This problem is i386-specific, the other architectures are OK.

If you have problems with PIE executables such as samba and cups leaving
behind gmon files, rebuild them after installing this change.

PR:		ports/143924
2010-03-23 23:25:17 +00:00
Pyun YongHyeon
065ee77712 MFC r204378:
Add TSO support on VLANs. While I'm here remove unnecessary check
  of VLAN hardware checksum offloading. vlan(4) already takes care of
  this.
2010-03-23 22:22:26 +00:00
Pyun YongHyeon
14b52a7e1c MFC r204377:
Add TSO support on VLANs. While I'm here remove unnecessary check
  of VLAN hardware checksum offloading. vlan(4) already takes care of
  this.
2010-03-23 22:19:27 +00:00
Pyun YongHyeon
7b575694a1 MFC r204376:
Disable TSO on BCM5755M controller until I understand better for
  the issue. I still have no idea why TSO does not work on this
  controller. davidch@ also confirmed there is no known TSO related
  issues for this controller.
2010-03-23 22:16:12 +00:00
Pyun YongHyeon
051ea6ca19 MFC r204373-204374:
r204373:
  Move TSO setup to new function bce_tso_setup(). Also remove VLAN
  parsing code in TSO path as the controller requires VLAN hardware
  tagging to make TSO work over VLANs.
  While parsing the mbuf in TSO patch, always perform check for
  writable mbuf as bce(4) have to reset IP length and IP checksum
  field of IP header and make sure to ensure contiguous buffer before
  accessing IP/TCP headers. While I'm here replace magic number 40 to
  more readable sizeof(struct ip) + sizeof(struct tcphdr).

r204374:
  Add TSO support on VLANs. bce(4) controllers require VLAN hardware
  tagging to make TSO work on VLANs so explicitly disable TSO on VLAN
  if VLAN hardware tagging is disabled.
2010-03-23 22:11:39 +00:00
Pyun YongHyeon
2634815492 MFC r204368,204370-204372:
r204368:
  Allow disabling VLAN hardware tag stripping with software work
  around. Management firmware(ASF/IPMI/UMP) requires the VLAN
  hardware tag stripping so don't actually disable VLAN hardware tag
  stripping. If VLAN hardware tag stripping was disabled, bce(4)
  manually reconstruct VLAN frame by appending stripped VLAN tag.
  Also remove unnecessary IFCAP_VLAN_MTU message.

r204370:
  Make sure to stop controller first before changing MTU. And if
  interface is not running don't initialize controller.
  While here remove unnecessary update of error variable.

r204371:
  Make toggling TSO, VLAN hardware checksum offloading work. Also fix
  TX/RX checksum handler to set/clear relavant assist bits which was
  used to cause unexpected results.
  With this change, bce(4) can be bridged with other interfaces that
  lack TSO, VLAN checksum offloading.

r204372:
  Prefer m_collapse(9) over m_defrag(9).
2010-03-23 22:04:18 +00:00
Pyun YongHyeon
5774c1ed84 MFC r204363,204365-204367,204539-204540:
r204363:
  Optimize inserting LE for TX checksum computation. Controller does
  not require checksum LE configuration if checksum start and write
  position is the same as before. So keep track last checksum start
  and write position and insert new LE whenever the position is
  changed. This reduces number of LEs used in TX path as well as
  slightly enhance TX performance.

r204365:
  Don't hardcod register offset to set PCIe max read request size.
  The register offset is not valid on 88E8072 controller. Also don't
  blindly increase max read request size to 4096, instead, use 2048
  which seems to be more sane value and only change the value if the
  hardware default size(512) was used on that register.
  For PCIX controllers, use system defined constant rather than using
  magic value.
  While I'm here stop showing negotiated link width.

r204366:
  Allocate single MSI message. msk(4) used to allocate 2 MSI messages
  for controllers like 88E8053 which reports two MSI messages.
  Because we don't get anything useful things with 2 MSI messages,
  allocating 1 MSI message would be more sane approach.
  While I'm here, enable MSI for dual-port controllers too. Because
  status block is shared for dual-port controllers, I don't think
  msk(4) will encounter problem for using MSI on dual-port
  controllers.

r204367:
  Remove trailing white spaces.

r204539:
  Properly sync status LEs after processing.

r204540:
  Make sure to enable flow-control only if established link is
  full-duplex. Previously msk(4) used to allow flow-control on
  1000baseT half-duplex media. Also GMAC pause is enabled if link
  partner is capable of handling it.
  While I'm here use IFM_OPTIONS instead of using IFM_GMASK to check
  optional flags of link.
2010-03-23 21:51:31 +00:00
Pyun YongHyeon
b951499f98 MFC r204361-204362:
r204361:
  Reuse the configured LE for VLAN if new LE was created for TSO.
  Only old controllers need to create new LE for TSO. This change
  makes TSO work over VLANs.

r204362:
  Add TSO support on VLANs. Controller requires VLAN hardware tagging
  to make TSO work over VLANs.
2010-03-23 21:38:25 +00:00
Pyun YongHyeon
061d3abfa8 MFC r204228,204230:
r204228:
  Add TSO support on VLANs. Also make sure to update TSO capability
  whenever jumbo frame is configured.
  While I'm here remove unnecessary check of VLAN hardware checksum
  offloading. vlan(4) already takes care of this.

r204230:
  Remove Tx mbuf parsing code for VLAN in TSO path. Controller does
  not support TSO over VLAN if VLAN hardware tagging is disabled so
  there is no need to check VLAN here.
2010-03-23 19:41:43 +00:00
Pyun YongHyeon
ac8ed73502 MFC r204225:
Add TSO support on VLANs. jme(4) controllers do not require VLAN
  hardware tagging to make TSO work over VLANs.
2010-03-23 19:37:15 +00:00
Pyun YongHyeon
d95d4a8336 MFC r204155,204219:
r204155:
  Increase PCIe maximuim read request size to 2048. Because re(4) uses
  Tx DMA burst size 2048, I beleive PCIe maximum read request size
  also should match to the value of Tx DMA burst size. With this
  change I can get more than 800Mbps for TCP bulk transfers.
  Previously I was not able to get more than 700Mbps. If I enable TSO
  it now shows 927Mbps.

r204219:
  Add TSO on VLANs. Because re(4) has a TSO limitation for jumbo
  frame, make sure to update VLAN capabilities whenever jumbo frame
  is configured.
  While I'm here rearrange interface capabilities configuration. The
  controller requires VLAN hardware tagging to make TSO work on VLANs
  so explicitly check this requirement.
2010-03-23 19:30:15 +00:00
Pyun YongHyeon
60a337785e MFC r204151,204223:
r204151:
  Add TSO support on VLAN. Controller requires VLAN hardware tagging
  to make TSO work on VLAN. So if VLAN hardware tagging is disabled
  explicitly clear TSO on VLAN. While I'm here remove duplicated
  VLAN_CAPABILITIES call.

r204223:
  Remove Tx mbuf parsing code for VLAN in TSO path. Controller does
  not support TSO over VLAN if VLAN hardware tagging is disabled so
  there is no need to check VLAN here.
  While I'm here make sure to pullup IP/TCP headers in the first
  buffer.
2010-03-23 19:16:35 +00:00
Andriy Gapon
229c84e85b MFC r205333: vfs_mount.9: drop cross-reference to a removed manual 2010-03-23 17:14:50 +00:00
Jaakko Heinonen
0ebeb8cec4 MFC r205121:
Use an unique directory name instead of hardcoded /tmp/.diskless.
A malicious user could create a file named /tmp/.diskless and cause
the script to misbehave.

PR:		conf/141258
2010-03-23 16:45:29 +00:00
Luigi Rizzo
8018e843a3 MFC of a large number of ipfw and dummynet fixes and enhancements
done in CURRENT over the last 4 months.
HEAD and RELENG_8 are almost in sync now for ipfw, dummynet
the pfil hooks and related components.

Among the most noticeable changes:
- r200855 more efficient lookup of skipto rules, and remove O(N)
  blocks from critical sections in the kernel;
- r204591 large restructuring of the dummynet module, with support
  for multiple scheduling algorithms (4 available so far)
See the original commit logs for details.

Changes in the kernel/userland ABI should be harmless because the
kernel is able to understand previous requests from RELENG_8 and
RELENG_7. For this reason, this changeset would be applicable
to RELENG_7 as well, but i am not sure if it is worthwhile.
2010-03-23 09:58:59 +00:00
Qing Li
521dd44db5 MFC r205272
Need to set the proper flag bit when inserting ARP
entries into the kernel.
2010-03-22 23:33:40 +00:00
Pyun YongHyeon
9832320129 MFC r204156:
Add __FBSDID.
2010-03-22 23:23:47 +00:00
Hiroki Sato
7fe6975097 MFC r203272:
- Fix a bug when adding an interface with an invalid MTU sets the
  bridge's MTU if it is the firstly-added one while the addition
  itself fails.

- Allow SIOCSIFMTU only when all members have the same MTU.

- Remove IFT_GIF check when defining the brige MTU by the
  firstly-added interface's one.  The MTU of the gif interface
  has to be the same as the bridge's one.
2010-03-22 22:07:19 +00:00
Edwin Groothuis
274885ab20 MFC of r205475, tzdata2010f:
The Australian Antartic Division:
- Macquarie Island will stay on UTC+11 for winter and not switch back from DST.
- Casey station reverted to its normal time of UTC+8 on 5 March 2010.
- Davis station will revert to its normal time of UTC+7 at 10 March 2010
- Mawson station stays on UTC+5.

Syria will start DST on Thursday 1 April 2010 at midnight.

Correct Samao DST start date (26 Sep vs 24 Oct)
2010-03-22 21:35:54 +00:00
Jung-uk Kim
a0bc6d1ca6 MFC: r205223
Fix a long standing regression of readdir(3) in fdescfs(5) introduced
in r1.48.  We were stopping at the first null pointer when multiple file
descriptors were opened and one in the middle was closed.  This restores
traditional behaviour of fdescfs.
2010-03-22 20:36:35 +00:00
Jung-uk Kim
1288863fa2 MFC: r205092
Tidy up callout for select(2) and read timeout.

- Add a missing callout_drain(9) before the descriptor deallocation.[1]
- Prefer callout_init_mtx(9) over callout_init(9) and let the callout
subsystem handle the mutex for callout function.

PR:		kern/144453
Submitted by:	Alexander Sack (asack at niksun dot com)[1]
2010-03-22 19:59:00 +00:00