1. 25 Sep, 2021 7 commits
    • Colin Percival's avatar
      loader tslog: Don't use sprintf · 242923eb
      Colin Percival authored
      Instead, append the log entry "manually".
      
      MFC after:	1 week
      Sponsored by:	https://www.patreon.com/cperciva
      242923eb
    • Kyle Evans's avatar
      makesyscalls: sprinkle some assert() on standard function calls · 6687410a
      Kyle Evans authored
      Improves our error reporting, ensuring that we aren't just ignoring
      errors in the common case.
      
      Note specifically the boundary where we have to change up our error
      handling approach.  It's fine to error() out up until we create the
      tempdir, then the rest should try to handle it gracefully and abort().
      A future change will clean this up further by pcall'ing all of the bits
      that cannot currently error() without cleaning up.
      6687410a
    • Kyle Evans's avatar
      makesyscalls: rip out arbitrary command execution · e12a0ffe
      Kyle Evans authored
      This was previously needed only for CloudABI, which used it to generate
      its capenabled from syscalls.master.  CloudABI was removed in
      cf0ee873, so we don't need to support this anymore.  Others looking
      to do similar things should come up with a more integrated technique,
      such as a .conf flag or pattern/glob support.  brooks suggests that it
      could be done in modern makesyscalls.lua by adding a config flag to
      specify always-on/initial flags (CAPENABLED).
      
      Reviewed by:	brooks, imp
      MFC after:	never
      Differential Revision:	https://reviews.freebsd.org/D32095
      e12a0ffe
    • Kyle Evans's avatar
      makesyscalls: stop trying to remove . and .. in cleanup · 340e009e
      Kyle Evans authored
      lfs.dir() will include these entries, but os.remove() cannot remove them
      for obvious reasons.
      340e009e
    • Alexander Motin's avatar
      acpi_cpu: Make device unit numbers match OS CPU IDs. · c8077ccd
      Alexander Motin authored
      There are already APIC ID, ACPI ID and OS ID for each CPU.  In perfect
      world all of those may match, but at least for SuperMicro server boards
      none of them do.  Plus none of them match the CPU devices listing order
      by ACPI.  Previous code used the ACPI device listing order to number
      cpuX devices.  It looked nice from NewBus perspective, but introduced
      4th different set of IDs. Extremely confusing one, since in some places
      the device unit numbers were treated as OS CPU IDs (coretemp), but not
      in others (sysctl dev.cpu.X.%location).
      c8077ccd
    • Kevin Bowling's avatar
      e1000: Rename 'struct adapter' to 'struct e1000_sc' · dc926051
      Kevin Bowling authored
      Rename the 'struct adapter' to 'struct e1000_sc' to avoid type ambiguity
      in things like kgdb.
      
      Reviewed by:	jhb, markj
      MFC after:	3 days
      Differential Revision:	https://reviews.freebsd.org/D32129
      dc926051
    • Alexander Motin's avatar
      bus: Cleanup device_probe_child() · f73c2bbf
      Alexander Motin authored
      When device driver probe method returns 0, i.e. absolute priority, do
      not remove its class from the device just to set it back few lines
      later, that may change the device unit number, etc. and after which
      we'd better call the probe again.
      
      If during search we found some driver with absolute priority, we do
      not need to set device driver and class since we haven't removed them
      before.
      
      It should not happen, but if second probe method call failed, remove
      the driver and possibly the class from the device as it was when we
      started.
      
      Reviewed by:	imp, jhb
      Differential Revision:	https://reviews.freebsd.org/D32125
      f73c2bbf
  2. 24 Sep, 2021 27 commits
  3. 23 Sep, 2021 6 commits
    • Warner Losh's avatar
      nvme: Use shared timeout rather than timeout per transaction · 502dc84a
      Warner Losh authored
      Keep track of the approximate time commands are 'due' and the next
      deadline for a command. twice a second, wake up to see if any commands
      have entered timeout. If so, quiessce and then enter a recovery mode
      half the timeout further in the future to allow the ISR to
      complete. Once we exit recovery mode, we go back to operations as
      normal.
      
      Sponsored by:		Netflix
      Differential Revision:	https://reviews.freebsd.org/D28583
      502dc84a
    • Kristof Provost's avatar
      pf: fix pagefault in pf_getstatus() · cb130596
      Kristof Provost authored
      We can't copyout() while holding a lock, in case it triggers a page
      fault.
      Release the lock before copyout, which is safe because we've already
      copied all the data into the nvlist.
      
      PR:		258601
      Reviewed by:	mjg
      MFC after:	1 week
      Sponsored by:	Modirum MDPay
      Differential Revision:	https://reviews.freebsd.org/D32076
      cb130596
    • Wenzhuo Lu's avatar
      e1000: fix K1 configuration · d5ad2f2a
      Wenzhuo Lu authored
      
      
      This patch is for the following updates to the K1 configurations:
      Tx idle period for entering K1 should be 128 ns.
      Minimum Tx idle period in K1 should be 256 ns.
      Signed-off-by: default avatarWenzhuo Lu <wenzhuo.lu@intel.com>
      
      PR:		258153
      Reviewed by:	erj
      Tested by:	iron.udjin@gmail.com
      Approved by:	imp
      Obtained from:	DPDK (6f934fa24dfd437c90ead96bc7598ee77a117ede)
      MFC after:	1 week
      d5ad2f2a
    • Kyle Evans's avatar
      man: reset OPTIND before parsing args · f555b39e
      Kyle Evans authored
      From jilles: POSIX requires that a script set `OPTIND=1` before using
      different sets of parameters with `getopts`, or the results will be
      unspecified.
      
      The specific problem observed here is that we would execute `man -f` or
      `man -k` without cleaning up state from man_parse_args()' `getopts`
      loop.  FreeBSD's /bin/sh seems to reset OPTIND to 1 after we hit the
      second getopts loop, rendering the following shift harmless; other
      /bin/sh implementations will leave it at what we came into the loop at
      (e.g., bash as /bin/sh), shifting off any keywords that we had.
      
      Input from:	jilles
      Reviewed by:	allanjude, bapt, imp
      Sponsored by:	Klara, Inc.
      Differential Revision:	https://reviews.freebsd.org/D32063
      f555b39e
    • Alexander Motin's avatar
      x86: Add NUMA nodes into CPU topology. · ef50d5fb
      Alexander Motin authored
      Depending on hardware, NUMA nodes may match last level caches, or
      they may be above them (AMD Zen 2/3) or below (Intel Xeon w/ SNC).
      This information is provided by ACPI instead of CPUID, and it is
      provided for each CPU individually instead of mask widths, but
      this code should be able to properly handle all the above cases.
      
      This change should immediately allow idle stealing in sched_ule(4)
      to prefer load from NUMA-local CPUs to remote ones when the node
      does not match LLC.  Later we may think of how to better handle it
      on sched_pickcpu() side.
      
      MFC after:	1 month
      ef50d5fb
    • Randall Stewart's avatar
      tcp: Rack compressed ack path updates the recv window too easily · 1ca931a5
      Randall Stewart authored
      The compressed ack path of rack is not following proper procedures in updating
      the peers window. It should be checking the seq and ack values before updating and
      instead it is blindly updating the values. This could in theory get the wrong window
      in the connection for some length of time.
      
      Reviewed by: tuexen
      Sponsored by: Netflix Inc.
      Differential Revision: https://reviews.freebsd.org/D32082
      1ca931a5