NetworkManager/src/libnm-core-impl
Thomas Haller 7a71aedf46
libnm: optimize NM_CONNECTION_GET_PRIVATE() for NMSimpleConnection
NMConnection is a glib interface, implemented only by NMSimpleConnection
and NMRemoteConnection.

Inside the daemon, every NMConnection instance is always a NMSimpleConnection.

Using glib interfaces has an overhead, for example NM_IS_CONNECTION() needs
to search the implemented types for the pointer. And NM_CONNECTION_GET_PRIVATE()
is implemented by attaching user data to the GObject instance. Both have measurable
overhead.

Special case them for NMSimpleConnection.

This optimizes primarily the call to nm_connection_get_setting_connection(),
which easily gets called millions of times. This is easily measurable.
2021-06-17 17:48:11 +02:00
..
tests libnm/tests: test consistency for nm_meta_setting_types_by_priority 2021-06-17 17:48:08 +02:00
meson.build build/meson: explicitly link libnm-crypto 2021-02-28 10:42:06 +01:00
nm-connection-private.h libnm: verify and normalize "connection.secondaries" 2021-06-04 09:29:25 +02:00
nm-connection.c libnm: optimize NM_CONNECTION_GET_PRIVATE() for NMSimpleConnection 2021-06-17 17:48:11 +02:00
nm-crypto-gnutls.c clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
nm-crypto-impl.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-crypto-nss.c clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
nm-crypto.c libnm,glib-aux: move nm_crypto_md5_hash() to "libnm-glib-aux" 2021-05-04 15:51:46 +02:00
nm-crypto.h libnm,glib-aux: move nm_crypto_md5_hash() to "libnm-glib-aux" 2021-05-04 15:51:46 +02:00
nm-dbus-utils.c clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
nm-default-libnm-core.h build: move "shared/nm-{glib-aux,log-null,log-core}" to "src/libnm-{glib-aux,log-null,log-core}" 2021-02-24 12:48:20 +01:00
nm-errors.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-keyfile-utils.c libnm/trivial: rename _nm_keyfile_equals() to _nm_keyfile_equal() 2021-05-27 09:56:41 +02:00
nm-keyfile.c libnm: avoid cloning buffer for nm_connection_get_settings() in nm_keyfile_write() 2021-06-17 17:48:10 +02:00
nm-meta-setting-base-impl.c libnm: add nm_meta_setting_types_by_priority array for sorting settings 2021-06-17 17:48:08 +02:00
nm-property-compare.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-property-compare.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-6lowpan.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-8021x.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-adsl.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-bluetooth.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-bond.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-bridge-port.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-bridge.c libnm: add internal accessors for _nm_setting_bridge{,_port}_get_vlans() 2021-05-11 13:53:52 +02:00
nm-setting-cdma.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-connection.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-dcb.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-dummy.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-ethtool.c libnm: reject setting ethtool.pause-autoneg while setting pause-rx/pause-tx 2021-05-17 23:31:21 +02:00
nm-setting-generic.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-gsm.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-hostname.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-infiniband.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-ip-config.c libnm: expose nm_ip_address_dup(), nm_ip_route_dup() API in libnm 2021-06-15 19:11:57 +02:00
nm-setting-ip-tunnel.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-ip4-config.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-ip6-config.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-macsec.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-macvlan.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-match.c libnm: don't reject empty strings in add/remove API 2021-06-04 09:29:24 +02:00
nm-setting-olpc-mesh.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-ovs-bridge.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-dpdk.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-external-ids.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-interface.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-patch.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-port.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ppp.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-pppoe.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-private.h libnm: optimize NM_CONNECTION_GET_PRIVATE() for NMSimpleConnection 2021-06-17 17:48:11 +02:00
nm-setting-proxy.c libnm: hide NMSetting types from public headers 2021-06-11 22:32:24 +02:00
nm-setting-serial.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-sriov.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-tc-config.c ifcfg-rh: preserve an empty tc configuration 2021-06-03 09:02:07 +02:00
nm-setting-team-port.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-team.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-tun.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-user.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-veth.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-vlan.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-vpn.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-vrf.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-vxlan.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-wifi-p2p.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-wimax.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-wired.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-wireguard.c lgtm: suppress [cpp/alloca-in-loop] warnings for lgtm.com 2021-06-01 17:45:39 +02:00
nm-setting-wireless-security.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-wireless.c libnm: add code comment about preserving ABI for libnm GObject structs 2021-06-17 17:48:10 +02:00
nm-setting-wpan.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting.c libnm: Refactor NM_CONNECTION_SERIALIZE_* flags 2021-04-01 17:19:15 +02:00
nm-simple-connection.c libnm: optimize NM_CONNECTION_GET_PRIVATE() for NMSimpleConnection 2021-06-17 17:48:11 +02:00
nm-team-utils.c clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
nm-team-utils.h build: move "shared/nm-{glib-aux,log-null,log-core}" to "src/libnm-{glib-aux,log-null,log-core}" 2021-02-24 12:48:20 +01:00
nm-utils-private.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-utils.c libnm/docs: document nm_utils_is_uuid() as deprecated 2021-05-27 09:29:22 +02:00
nm-vpn-editor-plugin.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-vpn-plugin-info.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
README.md build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00

libnm-core-impl

NetworkManager provides a client library libnm. NetworkManager core does not (dynamically) link against all of libnm. Instead, it statically links against a part of it. That part is the static helper library libnm-core-impl.

libnm-core-impl implements (and provides) the API from libnm-core-public, which is part of the public API of libnm. In this form, libnm-core-impl is part of the implementation of libnm. It also implements (and provides) an internal API libnm-core-intern which can only be used by those who link statically against libnm-core-impl.

Only NetworkManager core and libnm are allowed to statically link with libnm-core-impl. Consequently, only those are allowed to include libnm-core-intern.

This directory should not be added to the include search path of other components as they are only allowed to include libnm-core-public and libnm-core-intern.