1. 25 Sep, 2021 2 commits
    • 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
    • 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
      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
      Reviewed by:	imp, jhb
      Differential Revision:	https://reviews.freebsd.org/D32125
  2. 24 Sep, 2021 27 commits
  3. 23 Sep, 2021 11 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
      Sponsored by:		Netflix
      Differential Revision:	https://reviews.freebsd.org/D28583
    • 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
      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
    • 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
    • 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
      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
    • 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
    • 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
    • Randall Stewart's avatar
      tcp: Two bugs in rack one of which can lead to a panic. · fd69939e
      Randall Stewart authored
      In extensive testing in NF we have found two issues inside
      the rack stack.
      1) An incorrect offset is being generated by the fast send path when a fast send is initiated on
         the end of the socket buffer and before the fast send runs, the sb_compress macro adds data to the trailing socket.
         This fools the fast send code into thinking the sb offset changed and it miscalculates a "updated offset".
         It should only do that when the mbuf in question got smaller.. i.e. an ack was processed. This can lead to
         a panic deref'ing a NULL mbuf if that packet is ever retransmitted. At the best case it leads to invalid data being
         sent to the client which usually terminates the connection. The fix is to have the proper logic (that is in the rsm fast path)
         to make sure we only update the offset when the mbuf shrinks.
      2) The other issue is more bothersome. The timestamp check in rack needs to use the msec timestamp when
         comparing the timestamp echo to now. It was using a microsecond timestamp which ends up giving error
         prone results but causes only small harm in trying to identify which send to use in RTT calculations if its a retransmit.
      Reviewed by: tuexen
      Sponsored by: Netflix Inc.
      Differential Revision: https://reviews.freebsd.org/D32062
    • Ed Maste's avatar
      vt: bound buffer access in redraw optimization · dbc7ca59
      Ed Maste authored
      PR:		248628
      Reported by:	oleg
      Reviewed by:	cem, oleg (both earlier)
      Fixes:		ee97b233 ("Speed up vt(4) by keeping...")
      MFC after:	3 days
      Sponsored by:	The FreeBSD Foundation
      Differential Revision:	https://reviews.freebsd.org/D32059
    • Michael Tuexen's avatar
      sctp: Cleanup stream schedulers. · 414499b3
      Michael Tuexen authored
      No functional change intended.
      MFC after:	1 week
    • Arnaud Ysmal's avatar
      LACP: Do not wait response for marker messages not sent · 0b92a7fe
      Arnaud Ysmal authored
      The error returned when a marker message can not be emitted on a port is not handled.
      This cause the lacp to block all emissions until the timeout of 3 seconds is reached.
      To fix this issue, I just clear the LACP_PORT_MARK flag when the packet could not be emitted.
      Differential revision:	https://reviews.freebsd.org/D30467
      Obtained from:		Stormshield
    • Stephane Rochoy's avatar
      veriexec: Fix veriexec -i's confusion between loaded and locked states · 492bf4fd
      Stephane Rochoy authored
      Calling veriexec -i locked return the state of loaded and vice-versa.
      Differential revision:	https://reviews.freebsd.org/D30952
      Reviewed by:		sjg,imp
      Obtained from:		Stromshield