Commit Graph

75010 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
67208dfa16 MFC r204147:
Set curvnet earlier so that it also covers calls to sodisconnect(), which
  before were possibly panicing the system in ULP code in the VIMAGE case.

  Submitted by: Igor (igor ispsystem.com)
2010-03-27 17:42:04 +00:00
Bjoern A. Zeeb
1386abc0a7 MFC r204279:
Use the DB_SHOW_ALL_COMMAND() macro to register the formerly 'show ifnets'
  in the db_show_all_table as 'show all ifnets' and with that follow the
  convention for showing complete lists.

  Submitted by: thompsa
2010-03-27 17:40:28 +00:00
Bjoern A. Zeeb
0519db7239 MFC r204145:
Start to implement ifnet DDB support:
  - 'show ifnets' prints a list of ifnet *s per virtual network stack,
  - 'show ifnet <struct ifnet *>' prints fields matching the given ifp.

  We do not yet print the complete set of fields and might want to
  factor this out to an extra if_debug.c file in case this grows
  a lot[1]. We may also want to grow 'show ifnet <if_xname>' support[1].

  Suggested by: rwatson [1]
  Reviewed by:  rwatson
2010-03-27 17:39:02 +00:00
Bjoern A. Zeeb
1198bd71ba MFC r204143:
Upon virtual network stack teardown properly release the TCP syncache
  resources.

  Reviewed by:  rwatson
2010-03-27 17:36:52 +00:00
Bjoern A. Zeeb
e47658ce90 MFC r204140:
Split up ip_drain() into an outer lock and iterator part and
  a "locked" version that will only handle a single network stack
  instance. The latter is called directly from ip_destroy().

  Hook up an ip_destroy() function to release resources from the
  legacy IP network layer upon virtual network stack teardown.

  Reviewed by:  rwatson
2010-03-27 17:34:57 +00:00
Bjoern A. Zeeb
9bdad32791 MFC r204142:
Enhance a panic string to contain more useful debugging information.
2010-03-27 17:33:19 +00:00
Bjoern A. Zeeb
78ba8b295c MFC r203729:
Add DDB support for printing vnet_sysinit and vnet_sysuninit
  ordered call lists. Try to lookup function/symbol names and print
  those in addition to the pointers, along with the constants for
  subsystem and order.
  This is useful for debugging vnet teardown ordering issues.

  Make it possible to call the actual printing frunction from normal
  code at runtime, ie. from vnet_sysuninit(), if DDB support is there.
2010-03-27 17:31:54 +00:00
Bjoern A. Zeeb
72ec67fcb7 MFC r203727:
Add an SDT provider for "vnet"s along with probes for vnet_alloc
  and vnet_destroy.
  Use the line number rather than NULL as dummy argument.

  Note: the fbt provider does not reliably provide :return probes
  (depending on optimization levels used at compile time) making
  it unusable for scripts to generate complete call-traces with
  well defined boundaries over allocations or destructions of
  virtual network stacks.
2010-03-27 17:29:50 +00:00
Bjoern A. Zeeb
ef18ad7e2d MFC r203724:
Properly free resources when destroying the TCP hostcache while
  tearing down a network stack (in the VIMAGE jail+vnet case).

  For that break out the logic from tcp_hc_purge() into an internal
  function we can call from both, the sysctl handler and the
  tcp_hc_destroy().

  Reviewed by:  silby, lstewart
2010-03-27 17:26:31 +00:00
Edward Tomasz Napierala
bd7ae20991 MFC r197680:
Provide default implementation for VOP_ACCESS(9), so that filesystems which
want to provide VOP_ACCESSX(9) don't have to implement both.  Note that
this commit makes implementation of either of these two mandatory.

Reviewed by:	kib
2010-03-27 17:22:11 +00:00
Bjoern A. Zeeb
f0dd3ce087 MFC r201814:
Generate a second LINT configuration for i386 and amd64 in
  sys/conf/makeLINT.mk, which includes LINT and sets options VIMAGE
  so that we will have VIMAGE LINT builds. For now only do it for
  those two architectures to avoid massive universe times for archs,
  where people will less likely use VIMAGE or not at all.
2010-03-27 17:17:11 +00:00
Bjoern A. Zeeb
1a52f90b23 MFC r201813:
In sys/<arch>/conf/Makefile set TARGET to <arch>. That allows
  sys/conf/makeLINT.mk to only do certain things for certain
  architectures.

  Note that neither arm nor mips have the Makefile there, thus
  essentially not (yet) supporting LINT.  This would enable them
  do add special treatment to sys/conf/makeLINT.mk as well chosing
  one of the many configurations as LINT.
2010-03-27 17:14:55 +00:00
Bjoern A. Zeeb
cbd7567e6b MFC r202123:
Change DDB show prison:
  - name some columns more closely to the user space variables,
    as we do for host.* or allow.* (in the listing) already.
  - print pr_childmax (children.max).
  - prefix hex values with 0x.
2010-03-27 17:11:06 +00:00
Edward Tomasz Napierala
e8db802864 MFC r197650:
Fix typo in the comment.
2010-03-27 16:35:25 +00:00
Edward Tomasz Napierala
78e32164b0 MFC r197405:
Add pieces of infrastructure required for NFSv4 ACL support in UFS.

Reviewed by:	rwatson
2010-03-27 16:31:49 +00:00
Edward Tomasz Napierala
285438bfc0 MFC r201438:
Make mac_lomac(4) able to interpret NFSv4 access bits.

Reviewed by:	rwatson
2010-03-27 15:05:06 +00:00
Edward Tomasz Napierala
ec85a28567 MFC r201818:
Fix array overflow.

Reviewed by:	philip
2010-03-27 15:02:28 +00:00
Edward Tomasz Napierala
c0d73b99f2 MFC r202919:
Fix array overflow.  This routine is only called from procfs,
which is not mounted by default, and I've been unable to trigger
a panic without this fix applied anyway.

Reviewed by:	kib, cperciva
2010-03-27 14:58:28 +00:00
Edward Tomasz Napierala
ae3c92a106 MFC r204408:
Fix panic on invalid 'mdconfig -at preload' usage.

PR:		kern/80136
2010-03-27 14:43:40 +00:00
John Baldwin
d8c0d3dd97 MFC 205332:
Use the same policy for rejecting / not-reject ACPI tables with incorrect
checksums as the base acpi(4) driver.  This fixes a problem where the MADT
parser would reject the MADT table during early boot causing the MP Table
to be, but then the acpi(4) driver would attach and use non-SMP interrupt
routing.
2010-03-26 18:58:22 +00:00
John Baldwin
7bf38446dd MFC 204972:
Make NKPT a kernel option on i386 so that it can be set to a non-default
value from kernel config files.
2010-03-26 18:54:25 +00:00
Ivan Voras
e617a8cfde MFC r204248,r204249 - "fancy snake_saver" with color coded load averages 2010-03-26 14:03:42 +00:00
John Baldwin
c7402c0bbc MFC 205214:
- Extend the machine check record structure to include several fields useful
  for parsing model-specific and other fields in machine check events
  including the global machine check capabilities and status registers,
  CPU identification, and the FreeBSD CPU ID.
- Report these added fields in the console log of a machine check so that
  a record structure can be reconstituted from the console messages.
- Parse new architectural errors including memory controller errors.
2010-03-26 13:49:46 +00:00
John Baldwin
d62da94291 MFC 205210,205448:
Remove unneeded type specifiers from 64-bit constants.  The compiler
infers their natural type from the constants' values.
2010-03-26 13:01:30 +00:00
Maxim Sobolev
7711964246 MFC: workaround no-carrier issue on IBM HS21.
PR:		118238
2010-03-25 23:38:10 +00:00
John Baldwin
b1fc296597 MFC 205013:
Print out the family and model from the cpu_id.  This is especially useful
given the advent of the extended family and extended model fields.  The
values are printed in hex to match their common usage in documentation.
2010-03-25 15:48:23 +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
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
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
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