History log of /src/sys/net/if_ipsec.h |
Revision | | Date | Author | Comments |
1.8 |
| 17-Jan-2022 |
andvar | fix typos in comments, mainly s/foward/forward/.
|
1.7 |
| 01-Feb-2020 |
riastradh | Fix order in rollback case; switch if_ipsec to atomic_load/store_*.
|
1.6 |
| 01-Nov-2019 |
knakahara | branches: 1.6.2; Make global and per-interface ipsecif(4) pmtu tunable like gif(4).
And make hop limit tunable same as gif(4).
See http://mail-index.netbsd.org/source-changes/2019/10/30/msg110426.html
|
1.5 |
| 19-Sep-2019 |
knakahara | Avoid having a rtcache directly in a percpu storage for tunnel protocols.
percpu(9) has a certain memory storage for each CPU and provides it by the piece to users. If the storages went short, percpu(9) enlarges them by allocating new larger memory areas, replacing old ones with them and destroying the old ones. A percpu storage referenced by a pointer gotten via percpu_getref can be destroyed by the mechanism after a running thread sleeps even if percpu_putref has not been called.
Using rtcache, i.e., packet processing, typically involves sleepable operations such as rwlock so we must avoid dereferencing a rtcache that is directly stored in a percpu storage during packet processing. Address this situation by having just a pointer to a rtcache in a percpu storage instead.
Reviewed by ozaki-r@ and yamaguchi@
|
1.4 |
| 19-Oct-2018 |
knakahara | branches: 1.4.4; Fix panic when doing ioctl to multiple pseudo interfaces. Pointed out by k-goda@IIJ.
XXX pullup-8
|
1.3 |
| 27-Apr-2018 |
knakahara | branches: 1.3.2; Fix LOCKDEBUG kernel panic when many(about 200) tunnel interfaces is created.
The tunnel interfaces are gif(4), l2tp(4), and ipsecif(4). They use mutex itself in percpu area. When percpu_cpu_enlarge() run, the address of the mutex in percpu area becomes different from the address which lockdebug saved. That can cause "already initialized" false detection.
|
1.2 |
| 19-Apr-2018 |
christos | s/static inline/static __inline/g for consistency.
|
1.1 |
| 10-Jan-2018 |
knakahara | branches: 1.1.2; 1.1.4; add ipsec(4) interface, which is used for route-based VPN.
man and ATF are added later, please see man for details.
reviewed by christos@n.o, joerg@n.o and ozaki-r@n.o, thanks. https://mail-index.netbsd.org/tech-net/2017/12/18/msg006557.html
|
1.1.4.3 |
| 20-Oct-2018 |
pgoyette | Sync with head
|
1.1.4.2 |
| 02-May-2018 |
pgoyette | Synch with HEAD
|
1.1.4.1 |
| 22-Apr-2018 |
pgoyette | Sync with HEAD
|
1.1.2.5 |
| 24-Sep-2019 |
martin | Pull up following revision(s) (requested by knakahara in ticket #1385):
sys/net/if.c 1.461 sys/net/if.h 1.277 sys/net/if_gif.c 1.149 sys/net/if_gif.h 1.33 sys/net/if_ipsec.c 1.19,1.20,1.24 sys/net/if_ipsec.h 1.5 sys/net/if_l2tp.c 1.33,1.36-1.39 sys/net/if_l2tp.h 1.7,1.8 sys/net/route.c 1.220,1.221 sys/net/route.h 1.125 sys/netinet/in_gif.c 1.95 sys/netinet/in_l2tp.c 1.17 sys/netinet/ip_input.c 1.391,1.392 sys/netinet/wqinput.c 1.6 sys/netinet6/in6_gif.c 1.94 sys/netinet6/in6_l2tp.c 1.18 sys/netinet6/ip6_forward.c 1.97 sys/netinet6/ip6_input.c 1.210,1.211 sys/netipsec/ipsec_output.c 1.82,1.83 (patched) sys/netipsec/ipsecif.c 1.12,1.13,1.15,1.17 (patched) sys/netipsec/key.c 1.259,1.260
ipsecif(4) support input drop packet counter.
ipsecif(4) should not increment drop counter by errors not related to if_snd. Pointed out by ozaki-r@n.o, thanks. Remove unnecessary addresses in PF_KEY message.
MOBIKE Extensions for PF_KEY draft-schilcher-mobike-pfkey-extension-01.txt says
|
1.1.2.4 |
| 21-Oct-2018 |
martin | Pull up following revision(s) (requested by knakahara in ticket #1066):
sys/net/if_vlan.c: revision 1.133 sys/net/if_gif.h: revision 1.32 sys/net/if_ipsec.c: revision 1.18 sys/net/if_ipsec.h: revision 1.4 sys/net/if_gif.c: revision 1.144 sys/net/if_l2tp.h: revision 1.6 sys/net/if_l2tp.c: revision 1.30
Fix panic when doing ioctl to multiple pseudo interfaces. Pointed out by k-goda@IIJ.
XXX pullup-8
|
1.1.2.3 |
| 17-May-2018 |
martin | Pull up following revision(s) (requested by knakahara in ticket #829):
sys/net/if_l2tp.c: revision 1.24 sys/net/if_ipsec.c: revision 1.13 sys/net/if_gif.h: revision 1.31 sys/netipsec/ipsecif.c: revision 1.8 sys/net/if_gif.c: revision 1.140 sys/netinet6/in6_l2tp.c: revision 1.15 sys/net/if_ipsec.h: revision 1.3 sys/netinet6/in6_gif.c: revision 1.92 sys/net/if_l2tp.h: revision 1.5 sys/netinet/in_l2tp.c: revision 1.13 sys/netinet/in_gif.c: revision 1.93
Fix LOCKDEBUG kernel panic when many(about 200) tunnel interfaces is created.
The tunnel interfaces are gif(4), l2tp(4), and ipsecif(4). They use mutex itself in percpu area. When percpu_cpu_enlarge() run, the address of the mutex in percpu area becomes different from the address which lockdebug saved. That can cause "already initialized" false detection.
|
1.1.2.2 |
| 11-Feb-2018 |
snj | Pull up following revision(s) (requested by ozaki-r in ticket #536): distrib/sets/lists/base/shl.mi: 1.825 distrib/sets/lists/comp/mi: 1.2168-1.2169 distrib/sets/lists/comp/shl.mi: 1.310 distrib/sets/lists/debug/mi: 1.234 distrib/sets/lists/debug/shl.mi: 1.188 distrib/sets/lists/man/mi: 1.1570 distrib/sets/lists/tests/mi: 1.772 etc/mtree/NetBSD.dist.tests: 1.150 share/man/man4/Makefile: 1.650 share/man/man4/ipsec.4: 1.42-1.43 share/man/man4/ipsecif.4: 1.1-1.5 sys/arch/amd64/conf/ALL: 1.77 sys/arch/amd64/conf/GENERIC: 1.480 sys/conf/files: 1.1191 sys/net/Makefile: 1.34 sys/net/files.net: 1.14 sys/net/if.c: 1.404 sys/net/if.h: 1.248 sys/net/if_gif.c: 1.135 sys/net/if_ipsec.c: 1.1-1.3 sys/net/if_ipsec.h: 1.1 sys/net/if_l2tp.c: 1.16 sys/net/if_types.h: 1.28 sys/netinet/in.c: 1.214 sys/netinet/in.h: 1.103 sys/netinet/in_gif.c: 1.92 sys/netinet/ip_var.h: 1.122 sys/netinet6/in6.c: 1.257 sys/netinet6/in6.h: 1.88 sys/netinet6/in6_gif.c: 1.90 sys/netinet6/ip6_var.h: 1.75 sys/netipsec/Makefile: 1.6 sys/netipsec/files.netipsec: 1.13 sys/netipsec/ipsec.h: 1.62 sys/netipsec/ipsecif.c: 1.1 sys/netipsec/ipsecif.h: 1.1 sys/netipsec/key.c: 1.246-1.247 sys/netipsec/key.h: 1.34 sys/rump/net/Makefile.rumpnetcomp: 1.20 sys/rump/net/lib/libipsec/IPSEC.ioconf: 1.1 sys/rump/net/lib/libipsec/Makefile: 1.1 sys/rump/net/lib/libipsec/ipsec_component.c: 1.1 tests/net/Makefile: 1.34 tests/net/if_ipsec/Makefile: 1.1 tests/net/if_ipsec/t_ipsec.sh: 1.1-1.2 Don't touch an SP without a reference to it unify processing to check nesting count for some tunnel protocols. add ipsec(4) interface, which is used for route-based VPN. man and ATF are added later, please see man for details. reviewed by christos@n.o, joerg@n.o and ozaki-r@n.o, thanks. https://mail-index.netbsd.org/tech-net/2017/12/18/msg006557.html ipsec(4) interface supports rump now. add ipsec(4) interface ATF. add ipsec(4) interface man as ipsecif.4. add ipsec(4) interface to amd64/GENERIC and amd64/ALL configs. apply in{,6}_tunnel_validate() to gif(4). Spell IPsec that way. Simplify macro usage. Sort SEE ALSO. Bump date for previous. Improve wording and macro use. Some parts are not clear to me, so someone with knowledge of ipsecif(4) should improve this some more. Improve ipsecif.4. Default port ipsec(4) NAT-T is tested now. pointed out by wiz@n.o and suggested by ozaki-r@n.o, thanks. Change the prefix of test names to ipsecif_ to distinguish from tests for ipsec(4) New sentence, new line. Remove empty macro. Fix PR kern/52920. Pointed out by David Binderman, thanks. Improve wording, and put a new drawing, from me and Kengo Nakahara. apply a little more #ifdef INET/INET6. fixes !INET6 builds.
|
1.1.2.1 |
| 10-Jan-2018 |
snj | file if_ipsec.h was added on branch netbsd-8 on 2018-02-11 21:17:34 +0000
|
1.3.2.3 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.3.2.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.3.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.4.4.1 |
| 24-Sep-2019 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #238):
sys/netipsec/ipsec_output.c: revision 1.83 sys/net/route.h: revision 1.125 sys/netinet6/ip6_input.c: revision 1.210 sys/netinet6/ip6_input.c: revision 1.211 sys/net/if.c: revision 1.461 sys/net/if_gif.h: revision 1.33 sys/net/route.c: revision 1.220 sys/net/route.c: revision 1.221 sys/net/if.h: revision 1.277 sys/netinet6/ip6_forward.c: revision 1.97 sys/netinet/wqinput.c: revision 1.6 sys/net/if_ipsec.h: revision 1.5 sys/netinet6/in6_l2tp.c: revision 1.18 sys/netinet6/in6_gif.c: revision 1.94 sys/net/if_l2tp.h: revision 1.7 sys/net/if_gif.c: revision 1.149 sys/net/if_l2tp.h: revision 1.8 sys/netinet/in_gif.c: revision 1.95 sys/netinet/in_l2tp.c: revision 1.17 sys/netipsec/ipsecif.c: revision 1.17 sys/net/if_ipsec.c: revision 1.24 sys/net/if_l2tp.c: revision 1.37 sys/netinet/ip_input.c: revision 1.391 sys/net/if_l2tp.c: revision 1.38 sys/netinet/ip_input.c: revision 1.392 sys/net/if_l2tp.c: revision 1.39
Avoid having a rtcache directly in a percpu storage
percpu(9) has a certain memory storage for each CPU and provides it by the piece to users. If the storages went short, percpu(9) enlarges them by allocating new larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be destroyed by the mechanism after a running thread sleeps even if percpu_putref has not been called.
Using rtcache, i.e., packet processing, typically involves sleepable operations such as rwlock so we must avoid dereferencing a rtcache that is directly stored in a percpu storage during packet processing. Address this situation by having just a pointer to a rtcache in a percpu storage instead. Reviewed by knakahara@ and yamaguchi@
-
wqinput: avoid having struct wqinput_worklist directly in a percpu storage
percpu(9) has a certain memory storage for each CPU and provides it by the piece to users. If the storages went short, percpu(9) enlarges them by allocating new larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be destroyed by the mechanism after a running thread sleeps even if percpu_putref has not been called.
Input handlers of wqinput normally involves sleepable operations so we must avoid dereferencing a percpu data (struct wqinput_worklist) after executing an input handler. Address this situation by having just a pointer to the data in a percpu storage instead. Reviewed by knakahara@ and yamaguchi@
-
Add missing #include <sys/kmem.h>
-
Divide Tx context of l2tp(4) to improve performance.
It seems l2tp(4) call path is too long for instruction cache. So, dividing l2tp(4) Tx context improves CPU use efficiency.
After this commit, l2tp(4) throughput gains 10% on my machine(Atom C3000).
-
Apply some missing changes lost on the previous commit
-
Avoid having a rtcache directly in a percpu storage for tunnel protocols. percpu(9) has a certain memory storage for each CPU and provides it by the piece to users. If the storages went short, percpu(9) enlarges them by allocating new larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be destroyed by the mechanism after a running thread sleeps even if percpu_putref has not been called.
Using rtcache, i.e., packet processing, typically involves sleepable operations such as rwlock so we must avoid dereferencing a rtcache that is directly stored in a percpu storage during packet processing. Address this situation by having just a pointer to a rtcache in a percpu storage instead.
Reviewed by ozaki-r@ and yamaguchi@
-
l2tp(4): avoid having struct ifqueue directly in a percpu storage. percpu(9) has a certain memory storage for each CPU and provides it by the piece to users. If the storages went short, percpu(9) enlarges them by allocating new larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be destroyed by the mechanism after a running thread sleeps even if percpu_putref has not been called.
Tx processing of l2tp(4) uses normally involves sleepable operations so we must avoid dereferencing a percpu data (struct ifqueue) after executing Tx processing. Address this situation by having just a pointer to the data in a percpu storage instead.
Reviewed by ozaki-r@ and yamaguchi@
|
1.6.2.1 |
| 29-Feb-2020 |
ad | Sync with head.
|