We support C89 files, but compile everything in the tree with C99 or
newer. By compiling these -ansi, that will force C89 which doesn't
understand inline. All our header files must use __inline instead of
inline when they define inline functions.
Sponsored by: Netflix
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D43235
The last bump to 8G was caused by all the new symbols and debug info we
install by default. Turning those off gets us back to a reasonable size:
Filesystem Size Used Avail Capacity Mounted on
/dev/md1s1a 927M 771M 83M 90% /mnt
Sponsored by: Netflix
Reviewed by: jlduran@gmail.com
Differential Revision: https://reviews.freebsd.org/D43232
When copy_file_range(2) was first being developed,
*inoffp + len had to be <= infile_size or an error was
returned. This semantic (as defined by Linux) changed
to allow *inoffp + len to be greater than infile_size and
the copy would end at *inoffp + infile_size.
Unfortunately, the code that decided if the outfd should
be truncated in length did not get updated for this
semantics change.
As such, if a copy_file_range(2) is done, where infile_size - *inoffp
is less that outfile_size but len is large, the outfd file is truncated
when it should not be. (The semantics for this for Linux is to not
truncate outfd in this case.)
This patch fixes the problem. I believe the calculation is safe
for all non-negative values of outsize, *outoffp, *inoffp and insize,
which should be ok, since they are all guaranteed to be non-negative.
Note that this bug is not observed over NFSv4.2, since it truncates
len to infile_size - *inoffp.
PR: 276045
Reviewed by: asomers, kib
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D43258
decoding capability of TH_AE to dtrace, including
the example provided with tcpdebug.
MFC after: 1 week
Reviewed By: markj, mav
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43243
This is a no-op in practice since gtaskqueue_thread_enqueue() and
taskqueue_thread_enqueue() are identical, and while _gtaskqueue_create()
compares the enqueue callback pointer with gtaskqueue_thread_enqueue(),
the result has no effect since TQ_FLAGS_UNLOCKED_ENQUEUE was copied
directly from subr_taskqueue.c and is unused in the gtaskqueue code.
Fix it anyway since it's a bug. More generally we really need to
consolidate subr_taskqueue.c and subr_gtaskqueue.c.
PR: 270661
MFC after: 1 week
The code which removes a fragment queue from the per-VNET hash table was
duplicated three times. Factor it out into a function. No functional
change intended.
Reviewed by: kp, bz
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43228
Make, by default, daily diff(1) ignore whitespace changes and the unified output
a context of zero (0) lines. This reduces output of unrelated lines in e-mails
delivered to root.
PR: 270266
Approved by: jrm (mentor), karels
MFC after: 1 month
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D42762
Make, by default, security diff(1) produce a unified output with a context of
zero (0) lines. This reduces output of unrelated lines in e-mails delivered
to root.
PR: 270266
Approved by: jrm (mentor), karels
MFC after: 1 month
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D43071
In the DIRDEPS_BUILD we use staging.
The staging logic in bsd.man.mk was in the wrong place, shift it
and add compressed man pages to the stage set if appropriate.
Reviewed by: stevek
Differential Revision: https://reviews.freebsd.org/D43238
inline is only support in C99 and newer. To support also C89, use
__inline instead as suggested by dim.
Reported by: eduardo
Reviewed by: rscheff, markj, dim, imp
Tested by: eduardo
Fixes: a8b70cf260 ("netpfil: Use accessor functions and named constants for all tcphdr flags")
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D43231
The kern.pid_max_limit will hold the PID_MAX value the kernel was
compiled with. The existing kern.pid_max sysctl can be modified and
doesn't really represent maximum PID number in the system, as there
may still be processes created with higher PIDs before kern.pid_max
was lowered.
Reivewed by: kib, zlei
Approved by: oshogbo
Differential Revision: https://reviews.freebsd.org/D43077
PR#273962 reported that copy_file_range(2) did not work
on shared memory objects and returned EINVAL.
Although the reporter felt this was incorrect, it is what
the Linux copy_file_range(2) syscall does.
Since there was no collective agreement that the FreeBSD
semantics should be changed to no longer be Linux compatible,
copy_file_range(2) still works on regular files only.
This man page update clarifies that. If, someday, copy_file_range(2)
is changed to support non-regular files, then the man page will
need to be updated to reflect that.
PR: 273962
Reviewed by: karels, pauamma_gundo.com (manpages)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43227
The upper limits for height/width are already checked, this commit
enforces the lower limit as well.
The behavior is also changed such that, the framebuffer fails to
initialize if the provided values don't parse cleanly.
Reviewed by: corvink, jhb
Differential Revision: https://reviews.freebsd.org/D42692
This uses more generic wording in the FreeBSD installer, when offering
the user to use the system booted without running the installer.
The updated wording is also reflected in freebsd-version(1).
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D43233
Thanks to Toshiba for providing the SCSI spec for their latest
generation drives so I could confirm how they operate.
The firmware download works in a pretty standard way, so this
is a straightforward table addition.
sbin/camcontrol/camcontrol.8:
Document that Toshiba drives are supported for fwdownload,
and that it was tested on TOSHIBA MG10SFA22TE 22TB drives.
sbin/camcontrol/fwdownload.c:
Add TOSHIBA to the known SCSI vendors list for fwdownload.
Sponsored by: Spectra Logic
MFC after: 3 days
Signal blocking originally showed up in 51c2afc4b65b2782 ("Support:
Don't call close again if we get EINTR"), but it was overzealous --
there are systems where the error is known to be fine.
This commit elides signal blocking for said systems (the list is
incomplete though).
Note close() can still fail for other reasons (like ENOSPC), in which
case an error will be returned while the fd slot is cleared up.
Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D42984
This fixes restoring a Linux VM if it was suspended while in the GRUB
menu.
Adding MTTR increases the kernel dump size by 256 bytes per vCPU.
Sponsored by: vStack
Reviewed by: markj, rew
Differential Revision: https://reviews.freebsd.org/D43226
After commit fb51ddb20d, suspending a vm fails with the error:
vm_snapshot_buf: buffer too small
Sponsored by: vStack
Reviewed by: markj, rew
Fixes: fb51ddb20d ("bhyve: increase fbuf display resolution limit")
Differential Revision: https://reviews.freebsd.org/D43218
Prompted by Phabricator's complaint that a C source file was a binary
file, in D43192.
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D43229
Administrators can now specify a global compression method directly
at the beginning of the newsyslog.conf file, for example:
<compress> none
Relnotes: yes
Reviewed by: dvl
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43174
After ad874544d9, interface name
validation has been removed, resulting in two unit tests failures.
Drop the failing tests since they no longer apply.
Reported by: markj
As the name suggests, this sends a SCSI REQUEST SENSE to a device,
and prints out decoded sense information. It can also print out a
hexdump of the sense data.
sbin/camcontrol/camcontrol.c:
Add the new sense subcommand.
sbin/camcontrol/camcontrol.8:
Document camcontrol sense.
Sponsored by: Spectra Logic
Reviewed by: mav
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D43225
Add a space around the | operator in places testing for either M_EXT
or M_EXTPG.
Reviewed by: imp, glebius
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D43216
mtodo() accepts an mbuf and offset and returns a void * pointer to the
requested offset into the mbuf's associated data. Similar to mtod(),
no bounds checking is performed.
Reviewed by: imp, markj
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D43215
Correctly identify the active firmware in flash on adapters with
primary and secondary firmware region in flash.
Correctly identify the active NVRAM on adapters with primary
and secondary NVRAM region in flash.
Loading ispfw(4) moved from isp_pci_attach() to isp_reset().
Drop the reference to ispfw(4) after using it so one can kldunload(8) it.
New isp_load_ram() function to load either ispfw(4) or flash firmware
into RISC's RAM.
New functions to read data from flash. The old ones will be removed later.
A bunch of new helper functions to identify and validate active flash
regions for firmware, auxiliary and NVRAM.
Overhaul ISP_FW_* macros and make use of it when comparing firmware
versions. We can handle firmware versions up to 255.255.255.
Firmware load priority slightly changed:
For 27xx and newer adapters:
- load ispfw(4) firmware
- request (active) flash firmware information
- compare version numbers of ispfw(4) and flash firmware
- load firmware with highest version into RISC's RAM
- if loading ispfw(4) is disabled or failed - load firmware from flash
- if everything else fails use MBOX_LOAD_FLASH_FIRMWARE as fallback
For 26xx and older adapters nothing changed:
- load ispfw(4) firmware and load it into RISC's RAM
- if loading ispfw(4) is disabled or failed use MBOX_EXEC_FIRMWARE
- for 26xx a preceding MBOX_LOAD_FLASH_FIRMWARE is used
New read only sysctl(8)'s:
dev.isp.N.fw_version_run: the firmware version actually running
dev.isp.N.fw_version_ispfw: the firmware version provided by ispfw(4)
dev.isp.N.fw_version_flash: the (active) firmware version in flash
While here:
- firmware attribute handling/parsing reworked
+ renamed defines from ISP2400_FW_ATTR_* to ISP_FW_ATTR_*
+ changed values to match new handling/parsing
+ added some more attributes
- enable FLT support on 26xx based adapters
- log level adjustments
- new function return status codes (some for now, some for later use)
- some minor style changes
Tested and approved to work on real hardware with:
- Qlogic ISP 2532 (QLogic QLE2560 8Gb FC Adapter)
- Qlogic ISP 2031 (QLogic QLE2662 16Gbit 2Port FC Adapter)
- Qlogic ISP 2722 (QLogic QLE2690 16Gb FC Adapter)
- Qlogic ISP 2812 (QLogic QLE2772 32Gbit 2Port FC Adapter)
PR: 273263
Reviewed by: mav
Pull Request: https://github.com/freebsd/freebsd-src/pull/877
MFC after: 1 month
Sponsored by: Technical University of Munich
Update 25xx firmware: version 8.8.207
Add 26xx firmware: version 8.8.231
Add 27xx firmware: version 9.12.0
Add 28xx firmware: version 9.12.1
Remove BUGS section from manpage as we now have firmware for
all supported controllers.
PR: 273263
MFC after: 1 month
Pull Request: https://github.com/freebsd/freebsd-src/pull/877
Sponsored by: Technical University of Munich
As of commit b059686a71, cam_periph_unmapmem() can legitimately fail
if the copyout() operation fails. However, this failure was never
signaled to upper layers. In practice it is unlikely to occur
since cap_periph_mapmem() would most likely fail in such
circumstances anyway, but an error is nonetheless possible.
However, some code reading revealed a few paths where the return value
of cam_periph_mapmem() is not checked, and this is definitely a bug.
Add error checking there and let cam_periph_unmapmem() return errors
from copyout().
Reviewed by: dab, mav
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D43201
Some of the files are using outdated linceses.
Update the license to be 2023.
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
This commit introduces SRD metrics through sysctl.
The metrics can be queried using the following sysctl node:
sysctl dev.ena.<device index>.ena_srd_info
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
This commit adds sysctl support for customer metrics.
Different customer metrics can be found in the following sysctl node:
sysctl dev.ena.<device index>.customer_metrics
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Rename sample_interval node to stats_sample_interval and move
it up in the sysctl tree to make it clear that it's relevant for
all the stats and not only ENI metrics (Currently, sample interval node
is found under eni_metrics node).
Path to node:
dev.ena.<device_index>.stats_sample_interval
Once this parameter is set it will set the sample interval for all the
stats node including SRD/customer metrics.
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.