| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 9750d9e5, I brought the equivalent of the TS_BUSY flag back in a
mostly hardware-agnostic way in order to fix tty_drain() and, thus,
TIOCDRAIN for UARTs with TX FIFOs. This proved to be sufficient for
fixing the regression reported. So in light of the release cycle of
FreeBSD 10.3, I decided that this change was be good enough for the
time being and opted to go with the smallest possible yet generic
(for all UARTs driven by uart(4)) solution addressing the problem at
hand.
However, at least for the NS8250-class the above isn't a complete
fix as these UARTs only trigger an interrupt when the TX FIFO became
empty. At this point, there still can be an outstanding character
left in the transmit shift register as indicated via the LSR. Thus,
this change adds the 3rd (besides the tty(4) and generic uart(4) bits)
part I had in my tree ever since, adding a uart_txbusy method to be
queried in addition for tsw_busy and hooking it up as appropriate
for the NS8250-class.
As it turns out, the exact equivalent of this 3rd part later on was
implemented for uftdi(4) in 9ad221a5.
While at it, explain the rational behind the deliberately missing
locking in uart_tty_busy() (also applying to the generic sc_txbusy
testing already present).
(cherry picked from commit 353e4c5a068d06b0d6dcfa9eb736ecb16e9eae45)
|
|
|
|
|
|
|
|
|
|
|
| |
The global hw.igb.rx_process_limit knob never was adhered to by the
in-tree version of this driver but similar functionality is available
via the device-specific dev.igb.N.iflib.rx_budget.
While at it, remove the - besides initialization of tx_process_limit -
unused {r,t}x_process_limit members.
(cherry picked from commit f221d35be7a5749e2a1246c81adc9c03c1dc545c)
|
|
|
|
|
|
|
|
|
|
| |
The global hw.em.rx_process_limit knob has been replaced by the device-
specific dev.IF.N.iflib.rx_budget along with the conversion to iflib(4).
While at it, remove the - besides initialization of tx_process_limit -
unused {r,t}x_process_limit members.
(cherry picked from commit 0d6d28ce5650d1cd23dbe4bbac87fb103b3e2d3d)
|
|
|
|
| |
(cherry picked from commit b068bb09a1a82d9fef0e939ad6135443a959e290)
|
|
|
|
| |
(cherry picked from commit ed1a88a3116a59b4fd37912099a575b4c8f559dc)
|
|
|
|
|
|
| |
PR: 276191
(cherry picked from commit bdb46c21a3e68d4395d6e0b6a205187e655532b0)
|
|
|
|
| |
(cherry picked from commit 503f72a828c7d0d938ec73ffbf62406038c69d47)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LINKER_LOAD_FILE() calls linker_load_dependencies() which will return
EEXIST in case the module to be loaded has already been compiled into
the kernel. Since the format of the module is now recognized then there
is no need to retry loading with a different linker, otherwise the
userland will get misleading error number ENOEXEC.
PR: 274936
Reviewed by: dfr
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D42474
(cherry picked from commit ecf710f0e04e3314a492747124166ccb7cf4019e)
(cherry picked from commit e7fd435d3d4e888d9894d8c212c29ae6e2768f74)
|
|
|
|
|
|
|
| |
PR: 270040
MFC after: 1 week
(cherry picked from commit 9a622787244c4cda76d1509b0eae168bf4fd1952)
|
|
|
|
|
|
|
| |
PR: 257207
MFC after: 1 week
(cherry picked from commit 5704277ae58b3498fbee2d041cd18d2444f5cf98)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only try sending more data on pure ACKs when there is
more data available in the send buffer.
In the case of a retransmitted SYN not being sent due to
an internal error, the snd_una/snd_nxt accounting could
be off, leading to a panic. Pulling snd_nxt up to snd_una
prevents this from happening.
Reported by: fengdreamer@126.com
Reviewed by: cc, tuexen, #transport
MFC after: 1 week
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43343
(cherry picked from commit f4574e2dc5a4719379496338257526aba484751b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Features:
* Introduce customer and SRD metrics through sysctl
* Introduce spreading IRQs to CPUs capability using sysctl
* Upgrade ena-com to v2.7.0
Bug Fixes:
* Remove outdated APIs
Minor Changes:
* Introduce a shared stats sample interval for all stats
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 4e2688cc762d94b190029f0c5efab9c4bb5521be)
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 246aa273244e91a30d70997a3be790a29f9eb29c)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 36d42c862f4a5643f6e2395e8d7b7e5c4580499a)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit f97993ad7b9c9e4787bd198d11f348c271af513e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 5b925280d9a54eaefd85827bf6e84049aea8fa98)
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes the usage of this API from the freebsd driver since
the relevant functionality is not supported by the device.
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 2835752e075f2fa3edcb596df8306c570ec4cae6)
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes the usage of this function to be compatible with the
new API introduced by ena-com update to v2.7.0
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 72e34ebdd08854dc896f267b0461e241c4040241)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit:
1. Sets the time since last cleanup to milliseconds.
2. Fixes incorrect indentations.
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 9272e45c04c0d4fcb5d767e962783f3ab192f64e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit allows spreading IO IRQs over different CPUs through sysctl.
Two sysctl nodes are introduced:
1- base_cpu: servers as the first CPU to which the first IO IRQ
will be bound.
2- cpu_stride: sets the distance between every two CPUs to which every
two consecutive IO IRQs are bound.
For example for doing the following IO IRQs / CPU binding:
IRQ idx | CPU
----------------
1 | 0
2 | 2
3 | 4
4 | 6
Run the following commands:
sysctl dev.ena.<device index>.irq_affinity.base_cpu=0
sysctl dev.ena.<device_index>.irq_affinity.cpu_stride=2
Also introduced rss_enabled field, which is intended to replace
'#ifdef RSS' in multiple places, in order to prevent code duplication.
We want to bind interrupts to CPUs in case of rss set OR in case
the newly defined sysctl paremeter is set. This requires to remove a
couple of '#ifdef RSS' as well in the structs, since we'll be using the
relevant parameters in the CPU binding code.
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit f9e1d9471077109c19fd7d6dc9c1d35432efdede)
|
|
|
|
|
|
|
|
|
|
| |
Merge commit '04cf7cee5ae0c6bb29eb21ce85bab7ca7386a95f'
Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit adfed2d835a7f9382941896d15a487dac6fe659c)
|
|
|
|
|
|
|
|
|
|
| |
Note: this removes one TUNDEBUG() for the sake of not having one more
ifdefed variable declaration and for the overall code brevity. The call
from tuntap into LRO can be so easily traced with dtrace(1) that an
80-ish printf(9)-based debugging can be omitted.
Fixes: 99c79cab422705f92f05a2924a29bdf823372ebf
(cherry picked from commit 5b0010b4678d778967a5a82fb38507e46a071e38)
|
|
|
|
|
|
|
|
|
|
| |
This allows testing the LRO code with packetdrill in local mode.
Reviewed by: rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D42548
(cherry picked from commit 99c79cab422705f92f05a2924a29bdf823372ebf)
|
|
|
|
|
|
|
|
| |
eh can't be NULL, so there is no need to check for it.
Reported by: zlei
Sponsored by: Netflix, Inc.
(cherry picked from commit 44669b76504991ef3ac10ef10bc0fa931ae79c45)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When enabled, pretend that the IPv4 and transport layer checksum
is correct for packets injected via the character device.
This is a prerequisite for adding support for LRO, which will
be added next. Then packetdrill can be used to test the LRO
code in local mode.
Reviewed by: rscheff, zlei
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D42477
(cherry picked from commit ff69d13a50d1d07601de0885fd94f6a09a7ba383)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tun interface triggers the bpf hook when a packet is transmitted,
the tap interface triggers it when the packet is read from the
character device. This is inconsistent.
So fix the tap device such that it behaves like the tun device.
This is needed for adding support for the tap device to packetdrill.
Reviewed by: kevans, rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D42467
(cherry picked from commit 35af22ac986c4f3e8160c943a478492e748b6f23)
|
|
|
|
|
|
|
|
|
|
| |
No functional change intended.
Reviewed by: rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D42462
(cherry picked from commit 4ffe410e40e90c265c20cb4675ed74a40dc1fcc4)
|
|
|
|
|
|
| |
No functional change intended.
(cherry picked from commit 3bbbfc8dcd3622b49907e359c8e9682def0bae25)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows the IPPROTO_UDPLITE-level socket options
UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV to be used on
AF_INET6 sockets in addition to AF_INET sockets.
Reviewed by: ae, rscheff
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42430
(cherry picked from commit 03c3a70abe5e9fa259b954de78ae69229fa9c99f)
|
|
|
|
|
|
|
|
|
|
| |
Don't fill the fields of the UDP/IP header not used for the
checksum computation before performing the checksum computation.
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D42275
(cherry picked from commit aa64a8f5c35c13b1c325f1a4597c987a37bec5da)
|
|
|
|
| |
(cherry picked from commit 8a4577423e82c54942a9390658d059f1169187b1)
|
|
|
|
| |
(cherry picked from commit 70dc6b2ce314a0f32755005ad02802fca7ed186e)
|
|
|
|
| |
(cherry picked from commit 2d33ad48bd37f27925e4c46c798f8f2d23a2b501)
|
|
|
|
| |
(cherry picked from commit 4c41d10f1538c232174d5200d245e5fcd9936958)
|
|
|
|
| |
(cherry picked from commit 656d2e83d9eef204c132f879d55782affede2ca9)
|
|
|
|
|
|
| |
PR: 276002
(cherry picked from commit 47ec00d9d6071bbb0ee5ed0bdca3c4a468334d9d)
|
|
|
|
|
|
| |
PR: 276002
(cherry picked from commit 7dae1467d72ae1f5c8f7be0f7444da23a457d98b)
|
|
|
|
| |
(cherry picked from commit 987446fa39e8f6887ea16ad49f00f699b2efd210)
|
|
|
|
|
|
|
|
| |
It is redundant. No functional change intended.
MFC after: 1 week
(cherry picked from commit 969fc091343e593f15f0f3326f65292b435423d5)
|
|
|
|
|
|
|
|
|
|
|
| |
On some platforms this static information can be derived directly from
the CPU, and there doesn't seem much use in restricting it.
Reviewed by: emaste, imp, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43281
(cherry picked from commit 0aba5dd2af57ea3ae90eb49d7745c4c5b6f0ab6b)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will fail if the reading process is in capability mode. Just copy
the string directly.
PR: 276043
Reviewed by: emaste, imp, kib
Reported and tested by: Ricardo Branco <rbranco@suse.com>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43281
(cherry picked from commit d74a742704eb81f0c6f4aa83e4cb0de26a81c400)
|
|
|
|
|
|
|
|
|
|
| |
No functional change intended.
Reviewed by: emaste, imp, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43281
(cherry picked from commit d63ea03674007451682334fa3897918c5c3711a4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a mask for the code point used for ECN in the Traffic Class field
(2 bits) of an IPv6 header.
BE: 0 0 3 0 0 0 0 0
Bit: 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Traffic Class | Flow Label |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
For BE (Big Endian), or network-byte order, this corresponds to 0x00300000.
For Little Endian, it corresponds to 0x00003000.
Reviewed by: imp, markj
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/879
(cherry picked from commit b0e13f785b336670bdf39b83a78435b00d00f43c)
|
|
|
|
|
|
|
|
| |
Deal with the case that the association is already gone.
Reported by: syzbot+e256d42e9b390564530a@syzkaller.appspotmail.com
(cherry picked from commit bb56b36d7188e004840294d0bd5dfdf7f3392a05)
|
|
|
|
|
|
|
|
|
|
| |
When shutdown(..., SHUT_RD) or shutdown(..., SHUT_RDWR) is called,
really clean up the read queue and issue an ungraceful shutdown if
user messages are affected.
Reported by: syzbot+d4e1d30d578891245f59@syzkaller.appspotmail.com
(cherry picked from commit 81c5f0fac91dfae64205a6c4f9b2a469d1187372)
|
|
|
|
|
|
| |
This does not work with the new locking scheme.
(cherry picked from commit 1e81a4e7e89bb1870bec84e42284ad10505e957c)
|
|
|
|
|
|
|
|
|
|
| |
All notifications are now queued via sctp_ulp_notify(). Do
the locking of the inp read lock there and validate this in all
functions being used.
This is one step in avoiding race conditions when closing the
read end of an SCTP socket.
(cherry picked from commit f9425b3a85e9e211b61e11ce8115bf73674bdf49)
|
|
|
|
|
|
|
| |
While there, improve consistency of the notification related code.
No functional change intended.
(cherry picked from commit 3ac7664774ad038b208cbb31eb52d1608efbd451)
|
|
|
|
|
|
|
|
|
| |
This makes consistent use of the parameters and ensures that
all SCTP AUTH related notifications are using sctp_ulp_notify().
No functional change intended.
(cherry picked from commit cd3770c5feb038f3904fdb4aa04e09da122f74e3)
|
|
|
|
|
|
|
| |
In particular, don't use a socket level flag, use the inp level one.
After adding appropriate locking, this will close a race condition.
(cherry picked from commit e40d16ad6ee952f315356ef091fa282f28fac0d5)
|