- 09 Sep, 2024 2 commits
-
-
Florian Westphal authored
Julian Wiedmann says: > + if (!xfrm_pol_hold_rcu(ret)) Coverity spotted that ^^^ needs a s/ret/pol fix-up: > CID 1599386: Null pointer dereferences (FORWARD_NULL) > Passing null pointer "ret" to "xfrm_pol_hold_rcu", which dereferences it. Ditch the bogus 'ret' variable. Fixes: 563d5ca9 ("xfrm: switch migrate to xfrm_policy_lookup_bytype") Reported-by:
Julian Wiedmann <jwiedmann.dev@gmail.com> Closes: https://lore.kernel.org/netdev/06dc2499-c095-4bd4-aee3-a1d0e3ec87c4@gmail.com/Signed-off-by:
Florian Westphal <fw@strlen.de> Reviewed-by:
Simon Horman <horms@kernel.org> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
Steffen Klassert authored
This reverts commit e7cd191f. While supporting xfrm interfaces in the packet offload API is needed, this patch does not do the right thing. There are more things to do to really support xfrm interfaces, so revert it for now. Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
- 28 Aug, 2024 2 commits
-
-
Florian Westphal authored
The spd is no longer maintained as a linear list. We also haven't been caching bundles in the xfrm_policy struct since 2010. While at it, add kdoc style comments for the xfrm_policy structure and extend the description of the current rbtree based search to mention why it needs to search the candidate set. Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
Florian Westphal authored
No logical change intended. Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
- 27 Aug, 2024 2 commits
-
-
wangfe authored
In packet offload mode, append Security Association (SA) information to each packet, replicating the crypto offload implementation. The XFRM_XMIT flag is set to enable packet to be returned immediately from the validate_xmit_xfrm function, thus aligning with the existing code path for packet offload mode. This SA info helps HW offload match packets to their correct security policies. The XFRM interface ID is included, which is crucial in setups with multiple XFRM interfaces where source/destination addresses alone can't pinpoint the right policy. Signed-off-by:
wangfe <wangfe@google.com> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
Steffen Klassert authored
Florian Westphal says: ==================== Policy insertions do not scale well, due to both a lienar list walk to find the insertion spot and another list walk to set the 'pos' value (a tie-breaker to detect which policy is older when there is ambiguity as to which one should be matched). First patch gets rid of the second list walk on insert. Rest of the patches get rid of the insertion walk. This list walk was only needed because when I moved the policy db implementation to rbtree I retained the old insertion method for the sake of XFRM_MIGRATE. Switching that to tree-based lookup avoids the need for the full list search. After this, insertion of a policy is largely independent of the number of pre-existing policies as long as they do not share the same source/ destination networks. Note that this is compile tested only as I did not find any tests for XFRM_MIGRATE. ==================== Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
- 24 Aug, 2024 4 commits
-
-
Florian Westphal authored
No consumers anymore, remove it. After this, insertion of policies no longer require list walk of all inexact policies but only those that are reachable via the candidate sets. This gives almost linear insertion speeds provided the inserted policies are for non-overlapping networks. Before: Inserted 1000 policies in 70 ms Inserted 10000 policies in 1155 ms Inserted 100000 policies in 216848 ms After: Inserted 1000 policies in 56 ms Inserted 10000 policies in 478 ms Inserted 100000 policies in 4580 ms Insertion of 1m entries takes about ~40s after this change on my test vm. Cc: Noel Kuntze <noel@familie-kuntze.de> Cc: Tobias Brunner <tobias@strongswan.org> Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
Florian Westphal authored
XFRM_MIGRATE still uses the old lookup method: first check the bydst hash table, then search the list of all the other policies. Switch MIGRATE to use the same lookup function as the packetpath. This is done to remove the last remaining users of the pernet xfrm.policy_inexact lists with the intent of removing this list. After this patch, policies are still added to the list on insertion and they are rehashed as-needed but no single API makes use of these anymore. This change is compile tested only. Cc: Tobias Brunner <tobias@strongswan.org> Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
Florian Westphal authored
Since commit 6be3b0db ("xfrm: policy: add inexact policy search tree infrastructure") policy lookup no longer walks a list but has a set of candidate lists. This set has to be searched for the best match. In case there are several matches, the priority wins. If the priority is also the same, then the historic behaviour with a single list was to return the first match (first-in-list). With introduction of serval lists, this doesn't work and a new 'pos' member was added that reflects the xfrm_policy structs position in the list. This value is not exported to userspace and it does not need to be the 'position in the list', it just needs to make sure that a->pos < b->pos means that a was added to the lists more recently than b. This re-walk is expensive when many inexact policies are in use. Speed this up: when appending the policy to the end of the walker list, then just take the ->pos value of the last entry made and add 1. Add a slowpath version to prevent overflow, if we'd assign UINT_MAX then iterate the entire list and fix the ordering. While this speeds up insertion considerably finding the insertion spot in the inexact list still requires a partial list walk. This is addressed in followup patches. Before: ./xfrm_policy_add_speed.sh Inserted 1000 policies in 72 ms Inserted 10000 policies in 1540 ms Inserted 100000 policies in 334780 ms After: Inserted 1000 policies in 68 ms Inserted 10000 policies in 1137 ms Inserted 100000 policies in 157307 ms Reported-by:
Noel Kuntze <noel@familie-kuntze.de> Cc: Tobias Brunner <tobias@strongswan.org> Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
Florian Westphal authored
Nothing special, just test how long insertion of x policies takes. This should ideally show linear insertion speeds. Do not run this by default, it has little value, but it can be useful to check for insertion speed chahnges when altering the xfrm policy db implementation. Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
- 23 Aug, 2024 1 commit
-
-
Simon Horman authored
Correct spelling in xfrm.h. As reported by codespell. Signed-off-by:
Simon Horman <horms@kernel.org> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
- 20 Aug, 2024 1 commit
-
-
Christian Hopps authored
Add an skb helper function to copy a range of bytes from within an existing skb_seq_state. Signed-off-by:
Christian Hopps <chopps@labn.net> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
- 16 Aug, 2024 1 commit
-
-
Patrisious Haddad authored
The original idea to put WARN_ON() on return value from driver code was to make sure that packet offload doesn't have silent fallback to SW implementation, like crypto offload has. In reality, this is not needed as all *swan implementations followed this request and used explicit configuration style to make sure that "users will get what they ask". So instead of forcing drivers to make sure that even their internal flows don't return -EOPNOTSUPP, let's remove this WARN_ON. Signed-off-by:
Patrisious Haddad <phaddad@nvidia.com> Signed-off-by:
Leon Romanovsky <leonro@nvidia.com> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com>
-
- 01 Aug, 2024 17 commits
-
-
Jakub Kicinski authored
Allen Pais says: ==================== ethernet: Convert from tasklet to BH workqueue [part] The only generic interface to execute asynchronously in the BH context is tasklet; however, it's marked deprecated and has some design flaws. To replace tasklets, BH workqueue support was recently added. A BH workqueue behaves similarly to regular workqueues except that the queued work items are executed in the BH context. This patch converts a few drivers in drivers/ethernet/* from tasklet to BH workqueue. The next set will be sent out after the next -rc is out. v2: https://lore.kernel.org/20240621183947.4105278-1-allen.lkml@gmail.com v1: https://lore.kernel.org/20240507190111.16710-2-apais@linux.microsoft.com ==================== Link: https://patch.msgid.link/20240730183403.4176544-1-allen.lkml@gmail.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Allen Pais authored
Migrate tasklet APIs to the new bottom half workqueue mechanism. It replaces all occurrences of tasklet usage with the appropriate workqueue APIs throughout the macb driver. This transition ensures compatibility with the latest design and enhances performance. Signed-off-by:
Allen Pais <allen.lkml@gmail.com> Link: https://patch.msgid.link/20240730183403.4176544-5-allen.lkml@gmail.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Allen Pais authored
Migrate tasklet APIs to the new bottom half workqueue mechanism. It replaces all occurrences of tasklet usage with the appropriate workqueue APIs throughout the cnic driver. This transition ensures compatibility with the latest design and enhances performance. Signed-off-by:
Allen Pais <allen.lkml@gmail.com> Link: https://patch.msgid.link/20240730183403.4176544-4-allen.lkml@gmail.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Allen Pais authored
Migrate tasklet APIs to the new bottom half workqueue mechanism. It replaces all occurrences of tasklet usage with the appropriate workqueue APIs throughout the xgbe driver. This transition ensures compatibility with the latest design and enhances performance. Signed-off-by:
Allen Pais <allen.lkml@gmail.com> Link: https://patch.msgid.link/20240730183403.4176544-3-allen.lkml@gmail.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Allen Pais authored
Migrate tasklet APIs to the new bottom half workqueue mechanism. It replaces all occurrences of tasklet usage with the appropriate workqueue APIs throughout the alteon driver. This transition ensures compatibility with the latest design and enhances performance. Signed-off-by:
Allen Pais <allen.lkml@gmail.com> Link: https://patch.msgid.link/20240730183403.4176544-2-allen.lkml@gmail.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Petr Machata says: ==================== mlxsw: core_thermal: Small cleanups Ido Schimmel says: Clean up various issues which I noticed while addressing feedback on a different patchset. ==================== Link: https://patch.msgid.link/cover.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
The name of a thermal zone device cannot be longer than 19 characters ('THERMAL_NAME_LENGTH - 1'). The format string 'mlxsw-lc%d-module%d' can exceed this limitation if the maximum number of line cards cannot be represented using a single digit and the maximum number of transceiver modules cannot be represented using two digits. This is not the case with current systems nor future ones. Therefore, increase the size of the result buffer beyond 'THERMAL_NAME_LENGTH' and suppress the following build warning [1]. If this limitation is ever exceeded, we will know about it since the thermal core validates the thermal device's name during registration. [1] drivers/net/ethernet/mellanox/mlxsw/core_thermal.c: In function ‘mlxsw_thermal_modules_init.part.0’: drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:418:70: error: ‘%d’ directive output may be truncated writing between 1 and 3 bytes into a region of size between 2 and 4 [-Werror=format-truncation=] 418 | snprintf(tz_name, sizeof(tz_name), "mlxsw-lc%d-module%d", | ^~ In function ‘mlxsw_thermal_module_tz_init’, inlined from ‘mlxsw_thermal_module_init’ at drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:465:9, inlined from ‘mlxsw_thermal_modules_init.part.0’ at drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:500:9: drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:418:52: note: directive argument in the range [1, 256] 418 | snprintf(tz_name, sizeof(tz_name), "mlxsw-lc%d-module%d", | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:418:17: note: ‘snprintf’ output between 18 and 22 bytes into a destination of size 20 418 | snprintf(tz_name, sizeof(tz_name), "mlxsw-lc%d-module%d", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 419 | module_tz->slot_index, module_tz->module + 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/583a70c6dbe75e6bf0c2c58abbb3470a860d2dc3.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
Setting both pointers to NULL is unnecessary since the code never checks whether these pointers are NULL or not. Remove the assignments. Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/ea646f5d7642fffd5393fa23650660ab8f77a511.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
mlxsw_thermal_module_fini() cannot be invoked with a thermal module which is NULL or which is not associated with a thermal zone, so remove these checks. Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/8db5fe0a3a28ba09a15d4102cc03f7e8ca7675be.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
During rollback, instead of calling mlxsw_thermal_module_fini() for all the modules, only call it for modules that were successfully initialized. This is not a bug fix since mlxsw_thermal_module_fini() first checks that the module was initialized. Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/905bebc45f6e246031f0c5c177bba8efe11e05f5.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
mlxsw_thermal_module_fini() de-initializes the module's thermal zone, but mlxsw_thermal_module_init() does not initialize it. Make both functions symmetric by moving the initialization of the module's thermal zone to mlxsw_thermal_module_init(). Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/a661ad468f8ad0d7d533d8334e4abf61dfe34342.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
'dev' and 'core' arguments are not used by mlxsw_thermal_module_init(). Remove them. Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/563fc7383f61809a306b9954872219eaaf3c689b.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
There is no need to traverse the same array twice. Do it once by folding both loops into one. Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/81756744ed532aaa9249a83fc08757accfe8b07c.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
mlxsw_thermal_modules_init() allocates an array of modules and then initializes each entry by calling mlxsw_thermal_module_init() which among other things initializes the 'parent' pointer of the entry. mlxsw_thermal_modules_init() then traverses over the array again, but skips over entries that do not have their 'parent' pointer set which is impossible given the above. Therefore, remove the unnecessary check. Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/fb3e8ded422a441436431d5785b900f11ffc9621.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
mlxsw_thermal_modules_init() allocates an array of modules and then calls mlxsw_thermal_module_init() to initialize each entry in the array. It is therefore impossible for mlxsw_thermal_module_init() to encounter an entry that is already initialized and has its 'parent' pointer set. Remove the unnecessary check. Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
The function returns immediately if the thermal zone pointer is NULL so there is no need to check it before calling the function. Remove the check. Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
Vadim Pasternak <vadimp@nvidia.com> Signed-off-by:
Petr Machata <petrm@nvidia.com> Reviewed-by:
Wojciech Drewek <wojciech.drewek@intel.com> Link: https://patch.msgid.link/0bd251aa8ce03d3c951983aa6b4300d8205b88a7.1722345311.git.petrm@nvidia.comSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Krzysztof Olędzki authored
Enable reading additional EEPROM information from high pages such as thresholds and alarms on QSFP/QSFP+/QSFP28 modules. "This is similar to commit a708fb7b ("net/mlx5e: ethtool, Add support for EEPROM high pages query") but given all the required logic already exists in mlx4_qsfp_eeprom_params_set() only s/_LEN/MAX_LEN/ is needed. Tested-by:
Dan Merillat <git@dan.merillat.org> Signed-off-by:
Krzysztof Piotr Oledzki <ole@ans.pl> Reviewed-by:
Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/b17c5336-6dc3-41f2-afa6-f9e79231f224@ans.plSigned-off-by:
Jakub Kicinski <kuba@kernel.org>
-
- 31 Jul, 2024 10 commits
-
-
Patrick Rohr authored
draft-ietf-6man-pio-pflag is adding a new flag to the Prefix Information Option to signal that the network can allocate a unique IPv6 prefix per client via DHCPv6-PD (see draft-ietf-v6ops-dhcp-pd-per-device). When ra_honor_pio_pflag is enabled, the presence of a P-flag causes SLAAC autoconfiguration to be disabled for that particular PIO. An automated test has been added in Android (r.android.com/3195335) to go along with this change. Cc: Maciej Żenczykowski <maze@google.com> Cc: Lorenzo Colitti <lorenzo@google.com> Cc: David Lamparter <equinox@opensourcerouting.org> Cc: Simon Horman <horms@kernel.org> Signed-off-by:
Patrick Rohr <prohr@google.com> Reviewed-by:
Maciej Żenczykowski <maze@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Zhengchao Shao says: ==================== net/smc: do some cleanups in smc module Do some cleanups in smc module. ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Zhengchao Shao authored
The input parameter "is_rmb" of the smcr_new_buf_create function has never been used, remove it. Signed-off-by:
Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by:
Simon Horman <horms@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Zhengchao Shao authored
When the SMC client perform CLC handshake, it will check whether the clc header type is correct in receiving SMC_CLC_ACCEPT packet. The specific invoking path is as follows: __smc_connect smc_connect_clc smc_clc_wait_msg smc_clc_msg_hdr_valid smc_clc_msg_acc_conf_valid Therefore, the smc_connect_check_aclc interface invoked by __smc_connect does not need to check type again. Signed-off-by:
Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by:
Simon Horman <horms@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Zhengchao Shao authored
When the SMC client begins to connect to server, smcd_version is set to SMC_V1 + SMC_V2. If fail to get VLAN ID, only SMC_V2 information is left in smcd_version. And smcd_version will not be changed to 0. Therefore, remove the fallback caused by the failure to get VLAN ID. Signed-off-by:
Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by:
Simon Horman <horms@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Zhengchao Shao authored
Because linux/err.h is unreferenced in smc_loopback.h file, so remove it. Signed-off-by:
Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by:
Simon Horman <horms@kernel.org> Reviewed-by:
D. Wythe <alibuda@linux.alibaba.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Pawel Dembicki authored
Add a schema validator to vitesse,vsc73xx.yaml for MAC-level RGMII delays in the CPU port. Additionally, valid values for VSC73XX were defined, and a common definition for the RX and TX valid range was created. Reviewed-by:
Andrew Lunn <andrew@lunn.ch> Signed-off-by:
Pawel Dembicki <paweldembicki@gmail.com> Reviewed-by:
Rob Herring (Arm) <robh@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Pawel Dembicki authored
This patch switches hardcoded RGMII transmit/receive delay to a configurable value. Delay values are taken from the properties of the CPU port: 'tx-internal-delay-ps' and 'rx-internal-delay-ps'. The default value is configured to 2.0 ns to maintain backward compatibility with existing code. Signed-off-by:
Pawel Dembicki <paweldembicki@gmail.com> Reviewed-by:
Andrew Lunn <andrew@lunn.ch> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
James Chapman says: ==================== l2tp: simplify tunnel and session cleanup This series simplifies and improves l2tp tunnel and session cleanup. * refactor l2tp management code to not use the tunnel socket's sk_user_data. This allows the tunnel and its socket to be closed and freed without sequencing the two using the socket's sk_destruct hook. * export ip_flush_pending_frames and use it when closing l2tp_ip sockets. * move the work of closing all sessions in the tunnel to the work queue so that sessions are deleted using the same codepath whether they are closed by user API request or their parent tunnel is closing. * refactor l2tp_ppp pppox socket / session relationship to have the session keep the socket alive, not the other way around. Previously the pppox socket held a ref on the session, which complicated session delete by having to go through the pppox socket destructor. * free sessions and pppox sockets by rcu. * fix a possible tunnel refcount underflow. * avoid using rcu_barrier in net exit handler. ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-
James Chapman authored
Move the work of closing all tunnels from the pernet exit hook to pre_exit since the core does rcu synchronisation between these steps and we can therefore remove rcu_barrier from l2tp code. Signed-off-by:
James Chapman <jchapman@katalix.com> Signed-off-by:
Tom Parkin <tparkin@katalix.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-