#
27bd812c |
| 02-Dec-2021 |
Kristof Provost <kp@FreeBSD.org> |
pfsync: NULL check sc before using it
In pfsync_defer() we must wait to lock sc until we've ensured it's not NULL.
MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differenti
pfsync: NULL check sc before using it
In pfsync_defer() we must wait to lock sc until we've ensured it's not NULL.
MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33240
show more ...
|
Revision tags: release/12.3.0 |
|
#
8f3d786c |
| 01-Nov-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
pf: remove the flags argument from pf_unlink_state
All consumers call it with PF_ENTER_LOCKED.
Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate")
|
#
bcd4c17c |
| 19-Oct-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
pf: fix some cc --analyze warnings
Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate")
|
#
211cddf9 |
| 06-Jul-2021 |
Kristof Provost <kp@FreeBSD.org> |
pf: rename pf_state to pf_kstate
Indicate that this is a kernel-only structure, and make it easier to distinguish from others used to communicate with userspace.
Reviewed by: mjg MFC after: 1 week
pf: rename pf_state to pf_kstate
Indicate that this is a kernel-only structure, and make it easier to distinguish from others used to communicate with userspace.
Reviewed by: mjg MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31096
show more ...
|
#
803dfe3d |
| 28-Jun-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
pf: deduplicate V_pf_state_z handling with pfsync
Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate")
|
#
d0fdf2b2 |
| 12-May-2021 |
Kristof Provost <kp@FreeBSD.org> |
pf: Track the original kif for floating states
Track (and display) the interface that created a state, even if it's a floating state (and thus uses virtual interface 'all').
MFC after: 1 week Spons
pf: Track the original kif for floating states
Track (and display) the interface that created a state, even if it's a floating state (and thus uses virtual interface 'all').
MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30245
show more ...
|
#
5f5bf889 |
| 23-Apr-2021 |
Kristof Provost <kp@FreeBSD.org> |
pfsync: Expose PFSYNCF_OK flag to userspace
Add 'syncok' field to ifconfig's pfsync interface output. This allows userspace to figure out when pfsync has completed the initial bulk import.
Reviewed
pfsync: Expose PFSYNCF_OK flag to userspace
Add 'syncok' field to ifconfig's pfsync interface output. This allows userspace to figure out when pfsync has completed the initial bulk import.
Reviewed by: donner MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29948
show more ...
|
Revision tags: release/13.0.0 |
|
#
9f2e5184 |
| 15-Mar-2021 |
Thomas Kurschel <topical@gmx.net> |
pfsync: Unconditionally push packets when requesting state updates
When we request a bulk sync we need to ensure we actually send out that request, not just buffer it until we have enough data to se
pfsync: Unconditionally push packets when requesting state updates
When we request a bulk sync we need to ensure we actually send out that request, not just buffer it until we have enough data to send a full packet.
PR: 254236 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29271
show more ...
|
#
cecfaf9b |
| 10-Mar-2021 |
Kristof Provost <kp@FreeBSD.org> |
pf: Fully remove interrupt events on vnet cleanup
swi_remove() removes the software interrupt handler but does not remove the associated interrupt event. This is visible when creating and remove a v
pf: Fully remove interrupt events on vnet cleanup
swi_remove() removes the software interrupt handler but does not remove the associated interrupt event. This is visible when creating and remove a vnet jail in `procstat -t 12`.
We can remove it manually with intr_event_destroy().
PR: 254171 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29211
show more ...
|
#
28dc2c95 |
| 10-Mar-2021 |
Kristof Provost <kp@FreeBSD.org> |
pf: Simplify cleanup
We can now counter_u64_free(NULL), so remove the checks.
MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.
pf: Simplify cleanup
We can now counter_u64_free(NULL), so remove the checks.
MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29190
show more ...
|
#
320c1116 |
| 12-Dec-2020 |
Kristof Provost <kp@FreeBSD.org> |
pf: Split pfi_kif into a user and kernel space structure
No functional change.
MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D27761
|
#
e86bddea |
| 05-Dec-2020 |
Kristof Provost <kp@FreeBSD.org> |
pf: Split pf_rule into kernel and user space versions
No functional change intended.
MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D27
pf: Split pf_rule into kernel and user space versions
No functional change intended.
MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D27758
show more ...
|
#
1c00efe9 |
| 23-Dec-2020 |
Kristof Provost <kp@FreeBSD.org> |
pf: Use counter(9) for pf_state byte/packet tracking
This improves cache behaviour by not writing to the same variable from multiple cores simultaneously.
pf_state is only used in the kernel, so ca
pf: Use counter(9) for pf_state byte/packet tracking
This improves cache behaviour by not writing to the same variable from multiple cores simultaneously.
pf_state is only used in the kernel, so can be safely modified.
Reviewed by: Lutz Donnerhacke, philip MFC after: 1 week Sponsed by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D27661
show more ...
|
Revision tags: release/12.2.0 |
|
#
662c1305 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
net: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
24a22d1d |
| 22-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge r358179 through r358238.
PR: 244251
|
#
10b49b23 |
| 21-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (6 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marke
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (6 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
Mark all nodes in pf, pfsync and carp as MPSAFE.
Reviewed by: kp Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23634
show more ...
|
#
051669e8 |
| 25-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r356931 through r357118.
|
#
ef1bd1e5 |
| 22-Jan-2020 |
Kristof Provost <kp@FreeBSD.org> |
pfsync: Ensure we enter network epoch before calling ip_output
As of r356974 calls to ip_output() require us to be in the network epoch. That wasn't the case for the calls done from pfsyncintr() and
pfsync: Ensure we enter network epoch before calling ip_output
As of r356974 calls to ip_output() require us to be in the network epoch. That wasn't the case for the calls done from pfsyncintr() and pfsync_defer_tmo().
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
7f49ce7a |
| 28-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349476
Sponsored by: The FreeBSD Foundation
|
#
59854ecf |
| 25-Jun-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Convert all IPv4 and IPv6 multicast memberships into using a STAILQ instead of a linear array.
The multicast memberships for the inpcb structure are protected by a non-sleepable lock, INP_WLOCK(), w
Convert all IPv4 and IPv6 multicast memberships into using a STAILQ instead of a linear array.
The multicast memberships for the inpcb structure are protected by a non-sleepable lock, INP_WLOCK(), which needs to be dropped when calling the underlying possibly sleeping if_ioctl() method. When using a linear array to keep track of multicast memberships, the computed memory location of the multicast filter may suddenly change, due to concurrent insertion or removal of elements in the linear array. This in turn leads to various invalid memory access issues and kernel panics.
To avoid this problem, put all multicast memberships on a STAILQ based list. Then the memory location of the IPv4 and IPv6 multicast filters become fixed during their lifetime and use after free and memory leak issues are easier to track, for example by: vmstat -m | grep multi
All list manipulation has been factored into inline functions including some macros, to easily allow for a future hash-list implementation, if needed.
This patch has been tested by pho@ .
Differential Revision: https://reviews.freebsd.org/D20080 Reviewed by: markj @ MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
#
2aaf9152 |
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
#
812483c4 |
| 16-Mar-2019 |
Kristof Provost <kp@FreeBSD.org> |
pf: Rename pfsync bucket lock
Previously the main pfsync lock and the bucket locks shared the same name. This lead to spurious warnings from WITNESS like this:
acquiring duplicate lock of same
pf: Rename pfsync bucket lock
Previously the main pfsync lock and the bucket locks shared the same name. This lead to spurious warnings from WITNESS like this:
acquiring duplicate lock of same type: "pfsync" 1st pfsync @ /usr/src/sys/netpfil/pf/if_pfsync.c:1402 2nd pfsync @ /usr/src/sys/netpfil/pf/if_pfsync.c:1429
It's perfectly okay to grab both the main pfsync lock and a bucket lock at the same time.
We don't need different names for each bucket lock, because we should always only acquire a single one of those at a time.
MFC after: 1 week
show more ...
|
#
6a8ee0f7 |
| 18-Jan-2019 |
Kristof Provost <kp@FreeBSD.org> |
pf: fix pfsync breaking carp
Fix missing initialisation of sc_flags into a valid sync state on clone which breaks carp in pfsync.
This regression was introduce by r342051.
PR: 235005 Submitted by
pf: fix pfsync breaking carp
Fix missing initialisation of sc_flags into a valid sync state on clone which breaks carp in pfsync.
This regression was introduce by r342051.
PR: 235005 Submitted by: smh@FreeBSD.org Pointy hat to: kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D18882
show more ...
|
#
67350cb5 |
| 09-Dec-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340918 through r341763.
|
Revision tags: release/12.0.0 |
|
#
4fc65bcb |
| 06-Dec-2018 |
Kristof Provost <kp@FreeBSD.org> |
pfsync: Performance improvement
pfsync code is called for every new state, state update and state deletion in pf. While pf itself can operate on multiple states at the same time (on different cores,
pfsync: Performance improvement
pfsync code is called for every new state, state update and state deletion in pf. While pf itself can operate on multiple states at the same time (on different cores, assuming the states hash to a different hashrow), pfsync only had a single lock. This greatly reduced throughput on multicore systems.
Address this by splitting the pfsync queues into buckets, based on the state id. This ensures that updates for a given connection always end up in the same bucket, which allows pfsync to still collapse multiple updates into one, while allowing multiple cores to proceed at the same time.
The number of buckets is tunable, but defaults to 2 x number of cpus. Benchmarking has shown improvement, depending on hardware and setup, from ~30% to ~100%.
MFC after: 1 week Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D18373
show more ...
|