mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 16:20:09 +01:00
core: disable tc cache by default
We no longer use tc objects from the platform cache; disable caching by default. The only exception where the cache is needed is in tc tests, as we look into the platform there to check that objects look as expected.
This commit is contained in:
parent
864e4e6369
commit
d50c4eba9e
4 changed files with 11 additions and 2 deletions
|
|
@ -1708,6 +1708,12 @@ nm_platform_get()
|
|||
|
||||
void
|
||||
nm_linux_platform_setup(void)
|
||||
{
|
||||
nm_platform_setup(nm_linux_platform_new(FALSE, FALSE, FALSE));
|
||||
}
|
||||
|
||||
void
|
||||
nm_linux_platform_setup_with_tc_cache(void)
|
||||
{
|
||||
nm_platform_setup(nm_linux_platform_new(FALSE, FALSE, TRUE));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,6 +277,7 @@ NMPlatform *nm_platform_get(void);
|
|||
#define NM_PLATFORM_GET (nm_platform_get())
|
||||
|
||||
void nm_linux_platform_setup(void);
|
||||
void nm_linux_platform_setup_with_tc_cache(void);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ gboolean
|
|||
nmtstp_is_root_test(void)
|
||||
{
|
||||
g_assert(_nmtstp_setup_platform_func);
|
||||
return _nmtstp_setup_platform_func == nm_linux_platform_setup;
|
||||
return NM_IN_SET(_nmtstp_setup_platform_func,
|
||||
nm_linux_platform_setup,
|
||||
nm_linux_platform_setup_with_tc_cache);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ test_qdisc_tbf(void)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NMTstpSetupFunc const _nmtstp_setup_platform_func = nm_linux_platform_setup;
|
||||
NMTstpSetupFunc const _nmtstp_setup_platform_func = nm_linux_platform_setup_with_tc_cache;
|
||||
|
||||
void
|
||||
_nmtstp_init_tests(int *argc, char ***argv)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue