all: add "link" setting

Introduce a new "link" setting that holds properties that are related
to the kernel link.
This commit is contained in:
Beniamino Galvani
2023-02-16 13:31:30 +01:00
parent f97dd2bb95
commit 39bfcf7aab
21 changed files with 423 additions and 3 deletions

View File

@@ -1265,6 +1265,7 @@ src_libnm_core_impl_lib_h_pub_real = \
src/libnm-core-public/nm-setting-ip-tunnel.h \
src/libnm-core-public/nm-setting-ip4-config.h \
src/libnm-core-public/nm-setting-ip6-config.h \
src/libnm-core-public/nm-setting-link.h \
src/libnm-core-public/nm-setting-loopback.h \
src/libnm-core-public/nm-setting-macsec.h \
src/libnm-core-public/nm-setting-macvlan.h \
@@ -1346,6 +1347,7 @@ src_libnm_core_impl_lib_c_settings_real = \
src/libnm-core-impl/nm-setting-ip-tunnel.c \
src/libnm-core-impl/nm-setting-ip4-config.c \
src/libnm-core-impl/nm-setting-ip6-config.c \
src/libnm-core-impl/nm-setting-link.c \
src/libnm-core-impl/nm-setting-loopback.c \
src/libnm-core-impl/nm-setting-macsec.c \
src/libnm-core-impl/nm-setting-macvlan.c \

View File

@@ -332,6 +332,7 @@ print ("NetworkManager version " + client.get_version())]]></programlisting></in
<xi:include href="xml/nm-setting-ip-tunnel.xml"/>
<xi:include href="xml/nm-setting-ip4-config.xml"/>
<xi:include href="xml/nm-setting-ip6-config.xml"/>
<xi:include href="xml/nm-setting-link.xml"/>
<xi:include href="xml/nm-setting-loopback.xml"/>
<xi:include href="xml/nm-setting-macsec.xml"/>
<xi:include href="xml/nm-setting-macvlan.xml"/>

View File

@@ -1930,4 +1930,10 @@ libnm_1_44_0 {
global:
nm_setting_gsm_get_initial_eps_apn;
nm_setting_gsm_get_initial_eps_config;
nm_setting_link_get_gro_max_size;
nm_setting_link_get_gso_max_segments;
nm_setting_link_get_gso_max_size;
nm_setting_link_get_tx_queue_length;
nm_setting_link_get_type;
nm_setting_link_new;
} libnm_1_42_0;

View File

@@ -44,6 +44,7 @@
#include "nm-setting-ip6-config.h"
#include "nm-setting-ip-config.h"
#include "nm-setting-ip-tunnel.h"
#include "nm-setting-link.h"
#include "nm-setting-loopback.h"
#include "nm-setting-macsec.h"
#include "nm-setting-macvlan.h"

View File

@@ -85,6 +85,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIP6Config, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIPConfig, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIPTunnel, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingInfiniband, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingLink, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingLoopback, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingMacsec, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingMacvlan, g_object_unref)

View File

@@ -1749,6 +1749,26 @@
gprop-type="gchararray"
/>
</setting>
<setting name="link"
gtype="NMSettingLink"
>
<property name="gro-max-size"
dbus-type="x"
gprop-type="gint64"
/>
<property name="gso-max-segments"
dbus-type="x"
gprop-type="gint64"
/>
<property name="gso-max-size"
dbus-type="x"
gprop-type="gint64"
/>
<property name="tx-queue-length"
dbus-type="x"
gprop-type="gint64"
/>
</setting>
<setting name="loopback"
gtype="NMSettingLoopback"
>

View File

@@ -24,6 +24,7 @@ libnm_core_settings_sources = files(
'nm-setting-ip-tunnel.c',
'nm-setting-ip4-config.c',
'nm-setting-ip6-config.c',
'nm-setting-link.c',
'nm-setting-loopback.c',
'nm-setting-macsec.c',
'nm-setting-macvlan.c',

View File

@@ -34,6 +34,7 @@
#include "nm-setting-ip-tunnel.h"
#include "nm-setting-ip4-config.h"
#include "nm-setting-ip6-config.h"
#include "nm-setting-link.h"
#include "nm-setting-loopback.h"
#include "nm-setting-macsec.h"
#include "nm-setting-macvlan.h"
@@ -362,6 +363,13 @@ const NMMetaSettingInfo nm_meta_setting_infos[] = {
.setting_name = NM_SETTING_IP_TUNNEL_SETTING_NAME,
.get_setting_gtype = nm_setting_ip_tunnel_get_type,
},
[NM_META_SETTING_TYPE_LINK] =
{
.meta_type = NM_META_SETTING_TYPE_LINK,
.setting_priority = NM_SETTING_PRIORITY_AUX,
.setting_name = NM_SETTING_LINK_SETTING_NAME,
.get_setting_gtype = nm_setting_link_get_type,
},
[NM_META_SETTING_TYPE_LOOPBACK] =
{
.meta_type = NM_META_SETTING_TYPE_LOOPBACK,
@@ -660,6 +668,7 @@ const NMMetaSettingType nm_meta_setting_types_by_priority[] = {
NM_META_SETTING_TYPE_BOND_PORT,
NM_META_SETTING_TYPE_BRIDGE_PORT,
NM_META_SETTING_TYPE_ETHTOOL,
NM_META_SETTING_TYPE_LINK,
NM_META_SETTING_TYPE_MATCH,
NM_META_SETTING_TYPE_OVS_EXTERNAL_IDS,
NM_META_SETTING_TYPE_OVS_OTHER_CONFIG,

View File

@@ -0,0 +1,241 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2023 Red Hat, Inc.
*/
#include "libnm-core-impl/nm-default-libnm-core.h"
#include "nm-setting-link.h"
#include "nm-setting-private.h"
#include "nm-utils-private.h"
/**
* SECTION:nm-setting-link
* @short_description: Contains properties related to the link
* @include: nm-setting-link.h
**/
/*****************************************************************************/
NM_GOBJECT_PROPERTIES_DEFINE(NMSettingLink,
PROP_TX_QUEUE_LENGTH,
PROP_GSO_MAX_SIZE,
PROP_GSO_MAX_SEGMENTS,
PROP_GRO_MAX_SIZE, );
/**
* NMSettingLink:
*
* Link settings
*
* Since: 1.44
*/
struct _NMSettingLink {
NMSetting parent;
gint64 tx_queue_length;
gint64 gso_max_size;
gint64 gso_max_segments;
gint64 gro_max_size;
};
struct _NMSettingLinkClass {
NMSettingClass parent;
};
G_DEFINE_TYPE(NMSettingLink, nm_setting_link, NM_TYPE_SETTING)
/**
* nm_setting_link_get_tx_queue_length:
* @setting: the #NMSettingLink
*
* Returns the value contained in the #NMSettingLink:tx-queue-length
* property.
*
* Returns: the 'tx-queue-length' property value
*
* Since: 1.44
**/
gint64
nm_setting_link_get_tx_queue_length(NMSettingLink *setting)
{
g_return_val_if_fail(NM_IS_SETTING_LINK(setting), 0);
return setting->tx_queue_length;
}
/**
* nm_setting_link_get_gso_max_size:
* @setting: the #NMSettingLink
*
* Returns the value contained in the #NMSettingLink:gso-max-size
* property.
*
* Returns: the 'gso-max-size' property value
*
* Since: 1.44
**/
gint64
nm_setting_link_get_gso_max_size(NMSettingLink *setting)
{
g_return_val_if_fail(NM_IS_SETTING_LINK(setting), 0);
return setting->gso_max_size;
}
/**
* nm_setting_link_get_gso_max_segments:
* @setting: the #NMSettingLink
*
* Returns the value contained in the #NMSettingLink:gso-max-segments
* property.
*
* Returns: the 'gso-max-segments' property value
*
* Since: 1.44
**/
gint64
nm_setting_link_get_gso_max_segments(NMSettingLink *setting)
{
g_return_val_if_fail(NM_IS_SETTING_LINK(setting), 0);
return setting->gso_max_segments;
}
/**
* nm_setting_link_get_gro_max_size:
* @setting: the #NMSettingLink
*
* Returns the value contained in the #NMSettingLink:gro-max-size
* property.
*
* Returns: the 'gro-max-size' property value
*
* Since: 1.44
**/
gint64
nm_setting_link_get_gro_max_size(NMSettingLink *setting)
{
g_return_val_if_fail(NM_IS_SETTING_LINK(setting), 0);
return setting->gro_max_size;
}
/*****************************************************************************/
static void
nm_setting_link_init(NMSettingLink *setting)
{}
/**
* nm_setting_link_new:
*
* Creates a new #NMSettingLink object with default values.
*
* Returns: (transfer full): the new empty #NMSettingLink object
*
* Since: 1.44
**/
NMSetting *
nm_setting_link_new(void)
{
return g_object_new(NM_TYPE_SETTING_LINK, NULL);
}
static void
nm_setting_link_class_init(NMSettingLinkClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
GArray *properties_override = _nm_sett_info_property_override_create_array();
object_class->get_property = _nm_setting_property_get_property_direct;
object_class->set_property = _nm_setting_property_set_property_direct;
/**
* NMSettingLink:tx-queue-length
*
* The size of the transmit queue for the device, in number of packets. The value
* must be between 0 and 4294967295. When set to -1, the existing value is preserved.
*
* Since: 1.44
**/
_nm_setting_property_define_direct_int64(properties_override,
obj_properties,
NM_SETTING_LINK_TX_QUEUE_LENGTH,
PROP_TX_QUEUE_LENGTH,
-1,
G_MAXUINT32,
-1,
NM_SETTING_PARAM_NONE,
NMSettingLink,
tx_queue_length);
/**
* NMSettingLink:gso-max-size
*
* The maximum size of a Generic Segment Offload packet the device should accept.
* The value must be between 0 and 4294967295. When set to -1, the existing value
* is preserved.
*
* Since: 1.44
**/
_nm_setting_property_define_direct_int64(properties_override,
obj_properties,
NM_SETTING_LINK_GSO_MAX_SIZE,
PROP_GSO_MAX_SIZE,
-1,
G_MAXUINT32,
-1,
NM_SETTING_PARAM_NONE,
NMSettingLink,
gso_max_size);
/**
* NMSettingLink:gso-max-segments
*
* The maximum segments of a Generic Segment Offload packet the device should accept.
* The value must be between 0 and 4294967295. When set to -1, the existing value
* is preserved.
*
* Since: 1.44
**/
_nm_setting_property_define_direct_int64(properties_override,
obj_properties,
NM_SETTING_LINK_GSO_MAX_SEGMENTS,
PROP_GSO_MAX_SEGMENTS,
-1,
G_MAXUINT32,
-1,
NM_SETTING_PARAM_NONE,
NMSettingLink,
gso_max_segments);
/**
* NMSettingLink:gro-max-size
*
* The maximum size of a packet built by the Generic Receive Offload stack for
* this device. The value must be between 0 and 4294967295. When set to -1, the
* existing value is preserved.
*
* Since: 1.44
**/
_nm_setting_property_define_direct_int64(properties_override,
obj_properties,
NM_SETTING_LINK_GRO_MAX_SIZE,
PROP_GRO_MAX_SIZE,
-1,
G_MAXUINT32,
-1,
NM_SETTING_PARAM_NONE,
NMSettingLink,
gro_max_size);
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);
_nm_setting_class_commit(setting_class,
NM_META_SETTING_TYPE_LINK,
NULL,
properties_override,
0);
}

View File

@@ -43,6 +43,7 @@
#include "nm-setting-ip-tunnel.h"
#include "nm-setting-ip4-config.h"
#include "nm-setting-ip6-config.h"
#include "nm-setting-link.h"
#include "nm-setting-loopback.h"
#include "nm-setting-macsec.h"
#include "nm-setting-macvlan.h"

View File

@@ -127,6 +127,7 @@ typedef enum _nm_packed {
NM_META_SETTING_TYPE_IP_TUNNEL,
NM_META_SETTING_TYPE_IP4_CONFIG,
NM_META_SETTING_TYPE_IP6_CONFIG,
NM_META_SETTING_TYPE_LINK,
NM_META_SETTING_TYPE_LOOPBACK,
NM_META_SETTING_TYPE_MACSEC,
NM_META_SETTING_TYPE_MACVLAN,

View File

@@ -29,6 +29,7 @@ libnm_core_headers = files(
'nm-setting-ip-tunnel.h',
'nm-setting-ip4-config.h',
'nm-setting-ip6-config.h',
'nm-setting-link.h',
'nm-setting-loopback.h',
'nm-setting-macsec.h',
'nm-setting-macvlan.h',

View File

@@ -35,6 +35,7 @@ typedef struct _NMSettingIP6Config NMSettingIP6Config;
typedef struct _NMSettingIPConfig NMSettingIPConfig;
typedef struct _NMSettingIPTunnel NMSettingIPTunnel;
typedef struct _NMSettingInfiniband NMSettingInfiniband;
typedef struct _NMSettingLink NMSettingLink;
typedef struct _NMSettingLoopback NMSettingLoopback;
typedef struct _NMSettingMacsec NMSettingMacsec;
typedef struct _NMSettingMacvlan NMSettingMacvlan;

View File

@@ -0,0 +1,52 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2020 Red Hat, Inc.
*/
#ifndef __NM_SETTING_LINK_H__
#define __NM_SETTING_LINK_H__
#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION)
#error "Only <NetworkManager.h> can be included directly."
#endif
#include "nm-setting.h"
G_BEGIN_DECLS
#define NM_TYPE_SETTING_LINK (nm_setting_link_get_type())
#define NM_SETTING_LINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_LINK, NMSettingLink))
#define NM_SETTING_LINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING_LINK, NMSettingLinkClass))
#define NM_IS_SETTING_LINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_LINK))
#define NM_IS_SETTING_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_LINK))
#define NM_SETTING_LINK_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_LINK, NMSettingLinkClass))
#define NM_SETTING_LINK_SETTING_NAME "link"
#define NM_SETTING_LINK_TX_QUEUE_LENGTH "tx-queue-length"
#define NM_SETTING_LINK_GSO_MAX_SIZE "gso-max-size"
#define NM_SETTING_LINK_GSO_MAX_SEGMENTS "gso-max-segments"
#define NM_SETTING_LINK_GRO_MAX_SIZE "gro-max-size"
typedef struct _NMSettingLinkClass NMSettingLinkClass;
NM_AVAILABLE_IN_1_44
GType nm_setting_link_get_type(void);
NM_AVAILABLE_IN_1_44
NMSetting *nm_setting_link_new(void);
NM_AVAILABLE_IN_1_44
gint64 nm_setting_link_get_tx_queue_length(NMSettingLink *setting);
NM_AVAILABLE_IN_1_44
gint64 nm_setting_link_get_gso_max_size(NMSettingLink *setting);
NM_AVAILABLE_IN_1_44
gint64 nm_setting_link_get_gso_max_segments(NMSettingLink *setting);
NM_AVAILABLE_IN_1_44
gint64 nm_setting_link_get_gro_max_size(NMSettingLink *setting);
G_END_DECLS
#endif /* __NM_SETTING_LINK_H__ */

View File

@@ -34,6 +34,7 @@
#include "nm-setting-ip-tunnel.h"
#include "nm-setting-ip4-config.h"
#include "nm-setting-ip6-config.h"
#include "nm-setting-link.h"
#include "nm-setting-loopback.h"
#include "nm-setting-macsec.h"
#include "nm-setting-macvlan.h"
@@ -362,6 +363,13 @@ const NMMetaSettingInfo nm_meta_setting_infos[] = {
.setting_name = NM_SETTING_IP_TUNNEL_SETTING_NAME,
.get_setting_gtype = nm_setting_ip_tunnel_get_type,
},
[NM_META_SETTING_TYPE_LINK] =
{
.meta_type = NM_META_SETTING_TYPE_LINK,
.setting_priority = NM_SETTING_PRIORITY_AUX,
.setting_name = NM_SETTING_LINK_SETTING_NAME,
.get_setting_gtype = nm_setting_link_get_type,
},
[NM_META_SETTING_TYPE_LOOPBACK] =
{
.meta_type = NM_META_SETTING_TYPE_LOOPBACK,
@@ -660,6 +668,7 @@ const NMMetaSettingType nm_meta_setting_types_by_priority[] = {
NM_META_SETTING_TYPE_BOND_PORT,
NM_META_SETTING_TYPE_BRIDGE_PORT,
NM_META_SETTING_TYPE_ETHTOOL,
NM_META_SETTING_TYPE_LINK,
NM_META_SETTING_TYPE_MATCH,
NM_META_SETTING_TYPE_OVS_EXTERNAL_IDS,
NM_META_SETTING_TYPE_OVS_OTHER_CONFIG,

View File

@@ -127,6 +127,7 @@ typedef enum _nm_packed {
NM_META_SETTING_TYPE_IP_TUNNEL,
NM_META_SETTING_TYPE_IP4_CONFIG,
NM_META_SETTING_TYPE_IP6_CONFIG,
NM_META_SETTING_TYPE_LINK,
NM_META_SETTING_TYPE_LOOPBACK,
NM_META_SETTING_TYPE_MACSEC,
NM_META_SETTING_TYPE_MACVLAN,

View File

@@ -6648,6 +6648,56 @@ static const NMMetaPropertyInfo *const property_infos_LOOPBACK[] = {
NULL
};
#undef _CURRENT_NM_META_SETTING_TYPE
#define _CURRENT_NM_META_SETTING_TYPE NM_META_SETTING_TYPE_LINK
static const NMMetaPropertyInfo *const property_infos_LINK[] = {
PROPERTY_INFO_WITH_DESC (NM_SETTING_LINK_GSO_MAX_SEGMENTS,
.property_type = &_pt_gobject_int,
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
.value.i64 = -1,
.nick = "default",
},
),
),
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_LINK_GSO_MAX_SIZE,
.property_type = &_pt_gobject_int,
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
.value.i64 = -1,
.nick = "default",
},
),
),
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_LINK_GRO_MAX_SIZE,
.property_type = &_pt_gobject_int,
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
.value.i64 = -1,
.nick = "default",
},
),
),
),
PROPERTY_INFO_WITH_DESC (NM_SETTING_LINK_TX_QUEUE_LENGTH,
.property_type = &_pt_gobject_int,
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
.value_infos = INT_VALUE_INFOS (
{
.value.i64 = -1,
.nick = "default",
},
),
),
),
NULL
};
#undef _CURRENT_NM_META_SETTING_TYPE
#define _CURRENT_NM_META_SETTING_TYPE NM_META_SETTING_TYPE_MACSEC
static const NMMetaPropertyInfo *const property_infos_MACSEC[] = {
@@ -8427,6 +8477,7 @@ _setting_init_fcn_wireless (ARGS_SETTING_INIT_FCN)
#define SETTING_PRETTY_NAME_IP4_CONFIG N_("IPv4 protocol")
#define SETTING_PRETTY_NAME_IP6_CONFIG N_("IPv6 protocol")
#define SETTING_PRETTY_NAME_IP_TUNNEL N_("IP-tunnel settings")
#define SETTING_PRETTY_NAME_LINK N_("Link settings")
#define SETTING_PRETTY_NAME_LOOPBACK N_("Loopback settings")
#define SETTING_PRETTY_NAME_MACSEC N_("MACsec connection")
#define SETTING_PRETTY_NAME_MACVLAN N_("macvlan connection")
@@ -8588,6 +8639,7 @@ const NMMetaSettingInfoEditor nm_meta_setting_infos_editor[] = {
NM_META_SETTING_VALID_PART_ITEM (ETHTOOL, FALSE),
),
),
SETTING_INFO (LINK),
SETTING_INFO (LOOPBACK,
.valid_parts = NM_META_SETTING_VALID_PARTS (
NM_META_SETTING_VALID_PART_ITEM (CONNECTION, TRUE),
@@ -8802,6 +8854,7 @@ static const NMMetaSettingValidPartItem *const valid_settings_noslave[] = {
NM_META_SETTING_VALID_PART_ITEM(IP4_CONFIG, FALSE),
NM_META_SETTING_VALID_PART_ITEM(IP6_CONFIG, FALSE),
NM_META_SETTING_VALID_PART_ITEM(HOSTNAME, FALSE),
NM_META_SETTING_VALID_PART_ITEM(LINK, FALSE),
NM_META_SETTING_VALID_PART_ITEM(TC_CONFIG, FALSE),
NM_META_SETTING_VALID_PART_ITEM(PROXY, FALSE),
NULL,
@@ -8809,12 +8862,14 @@ static const NMMetaSettingValidPartItem *const valid_settings_noslave[] = {
static const NMMetaSettingValidPartItem *const valid_settings_slave_bond[] = {
NM_META_SETTING_VALID_PART_ITEM(BOND_PORT, TRUE),
NM_META_SETTING_VALID_PART_ITEM(LINK, FALSE),
NM_META_SETTING_VALID_PART_ITEM(MATCH, FALSE),
NULL,
};
static const NMMetaSettingValidPartItem *const valid_settings_slave_bridge[] = {
NM_META_SETTING_VALID_PART_ITEM(BRIDGE_PORT, TRUE),
NM_META_SETTING_VALID_PART_ITEM(LINK, FALSE),
NM_META_SETTING_VALID_PART_ITEM(MATCH, FALSE),
NULL,
};
@@ -8825,12 +8880,14 @@ static const NMMetaSettingValidPartItem *const valid_settings_slave_ovs_bridge[]
};
static const NMMetaSettingValidPartItem *const valid_settings_slave_ovs_port[] = {
NM_META_SETTING_VALID_PART_ITEM(LINK, FALSE),
NM_META_SETTING_VALID_PART_ITEM(MATCH, FALSE),
NM_META_SETTING_VALID_PART_ITEM(OVS_INTERFACE, FALSE),
NULL,
};
static const NMMetaSettingValidPartItem *const valid_settings_slave_team[] = {
NM_META_SETTING_VALID_PART_ITEM(LINK, FALSE),
NM_META_SETTING_VALID_PART_ITEM(MATCH, FALSE),
NM_META_SETTING_VALID_PART_ITEM(TEAM_PORT, TRUE),
NULL,

View File

@@ -443,6 +443,10 @@
#define DESCRIBE_DOC_NM_SETTING_HOSTNAME_FROM_DNS_LOOKUP N_("Whether the system hostname can be determined from reverse DNS lookup of addresses on this device. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).")
#define DESCRIBE_DOC_NM_SETTING_HOSTNAME_ONLY_FROM_DEFAULT N_("If set to NM_TERNARY_TRUE (1), NetworkManager attempts to get the hostname via DHCPv4/DHCPv6 or reverse DNS lookup on this device only when the device has the default route for the given address family (IPv4/IPv6). If set to NM_TERNARY_FALSE (0), the hostname can be set from this device even if it doesn't have the default route. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_FALSE (0).")
#define DESCRIBE_DOC_NM_SETTING_HOSTNAME_PRIORITY N_("The relative priority of this connection to determine the system hostname. A lower numerical value is better (higher priority). A connection with higher priority is considered before connections with lower priority. If the value is zero, it can be overridden by a global value from NetworkManager configuration. If the property doesn't have a value in the global configuration, the value is assumed to be 100. Negative values have the special effect of excluding other connections with a greater numerical priority value; so in presence of at least one negative priority, only connections with the lowest priority value will be used to determine the hostname.")
#define DESCRIBE_DOC_NM_SETTING_LINK_GRO_MAX_SIZE N_("The maximum size of a packet built by the Generic Receive Offload stack for this device. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved.")
#define DESCRIBE_DOC_NM_SETTING_LINK_GSO_MAX_SEGMENTS N_("The maximum segments of a Generic Segment Offload packet the device should accept. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved.")
#define DESCRIBE_DOC_NM_SETTING_LINK_GSO_MAX_SIZE N_("The maximum size of a Generic Segment Offload packet the device should accept. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved.")
#define DESCRIBE_DOC_NM_SETTING_LINK_TX_QUEUE_LENGTH N_("The size of the transmit queue for the device, in number of packets. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved.")
#define DESCRIBE_DOC_NM_SETTING_LOOPBACK_MTU N_("If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.")
#define DESCRIBE_DOC_NM_SETTING_OVS_EXTERNAL_IDS_DATA N_("A dictionary of key/value pairs with external-ids for OVS.")
#define DESCRIBE_DOC_NM_SETTING_OVS_OTHER_CONFIG_DATA N_("A dictionary of key/value pairs with other_config settings for OVS. See also \"other_config\" in the \"ovs-vswitchd.conf.db\" manual for the keys that OVS supports.")

View File

@@ -1046,9 +1046,9 @@ const NmcMetaGenericInfo
"," NM_SETTING_MACVLAN_SETTING_NAME "," NM_SETTING_VXLAN_SETTING_NAME \
"," NM_SETTING_VRF_SETTING_NAME "," NM_SETTING_WPAN_SETTING_NAME \
"," NM_SETTING_6LOWPAN_SETTING_NAME "," NM_SETTING_WIREGUARD_SETTING_NAME \
"," NM_SETTING_PROXY_SETTING_NAME "," NM_SETTING_TC_CONFIG_SETTING_NAME \
"," NM_SETTING_SRIOV_SETTING_NAME "," NM_SETTING_ETHTOOL_SETTING_NAME \
"," NM_SETTING_OVS_DPDK_SETTING_NAME \
"," NM_SETTING_LINK_SETTING_NAME "," NM_SETTING_PROXY_SETTING_NAME \
"," NM_SETTING_TC_CONFIG_SETTING_NAME "," NM_SETTING_SRIOV_SETTING_NAME \
"," NM_SETTING_ETHTOOL_SETTING_NAME "," NM_SETTING_OVS_DPDK_SETTING_NAME \
"," NM_SETTING_HOSTNAME_SETTING_NAME /* NM_SETTING_DUMMY_SETTING_NAME NM_SETTING_WIMAX_SETTING_NAME */
const NmcMetaGenericInfo *const nmc_fields_con_active_details_groups[] = {

View File

@@ -776,6 +776,16 @@
<property name="token"
description="Configure the token for draft-chown-6man-tokenised-ipv6-identifiers-02 IPv6 tokenized interface identifiers. Useful with eui64 addr-gen-mode." />
</setting>
<setting name="link" >
<property name="gso-max-segments"
description="The maximum segments of a Generic Segment Offload packet the device should accept. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved." />
<property name="gso-max-size"
description="The maximum size of a Generic Segment Offload packet the device should accept. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved." />
<property name="gro-max-size"
description="The maximum size of a packet built by the Generic Receive Offload stack for this device. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved." />
<property name="tx-queue-length"
description="The size of the transmit queue for the device, in number of packets. The value must be between 0 and 4294967295. When set to -1, the existing value is preserved." />
</setting>
<setting name="loopback" >
<property name="mtu"
alias="mtu"

View File

@@ -36,6 +36,7 @@ SETTING_IP4_CONFIG_* parent="NM.SettingIP4Config" name="SETTIN
SETTING_IP6_CONFIG_* parent="NM.SettingIP6Config" name="SETTING_IP6_CONFIG_(.+)"
SETTING_IP_CONFIG_* parent="NM.SettingIPConfig" name="SETTING_IP_CONFIG_(.+)"
SETTING_IP_TUNNEL_* parent="NM.SettingIPTunnel" name="SETTING_IP_TUNNEL_(.+)"
SETTING_LINK_* parent="NM.SettingLink" name="SETTING_LINK_(.+)"
SETTING_LOOPBACK_* parent="NM.SettingLoopback" name="SETTING_LOOPBACK_(.+)"
SETTING_MACSEC_* parent="NM.SettingMacsec" name="SETTING_MACSEC_(.+)"
SETTING_MACVLAN_* parent="NM.SettingMacvlan" name="SETTING_MACVLAN_(.+)"