summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-12-01 17:53:22 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2018-12-12 14:18:53 +0100
commit3de25bbc977fa935a77aebf3f8f7d9e9dfaa55b8 (patch)
treebc86c6c17394d5c37f9a6e52fc5dd813da13c759
parent769e0726a81bb6a7c9250527ee6bba205e2f23ab (diff)
downloadNetworkManager-3de25bbc977fa935a77aebf3f8f7d9e9dfaa55b8.tar.gz
libnm-core: slightly improve SR-IOV documentation
Describe how to specify multiple VFs and which attributes are supported, so that this information is available in the nm-settings manual page. Also, clarify that SR-IOV parameters are managed only when the setting is present. https://bugzilla.redhat.com/show_bug.cgi?id=1651979
-rw-r--r--clients/common/settings-docs.h.in4
-rw-r--r--libnm-core/nm-setting-sriov.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/clients/common/settings-docs.h.in b/clients/common/settings-docs.h.in
index 5fa541975e..2b579c24b7 100644
--- a/clients/common/settings-docs.h.in
+++ b/clients/common/settings-docs.h.in
@@ -296,8 +296,8 @@
#define DESCRIBE_DOC_NM_SETTING_SERIAL_SEND_DELAY N_("Time to delay between each byte sent to the modem, in microseconds.")
#define DESCRIBE_DOC_NM_SETTING_SERIAL_STOPBITS N_("Number of stop bits for communication on the serial port. Either 1 or 2. The 1 in \"8n1\" for example.")
#define DESCRIBE_DOC_NM_SETTING_SRIOV_AUTOPROBE_DRIVERS N_("Whether to autoprobe virtual functions by a compatible driver. If set to NM_TERNARY_TRUE (1), the kernel will try to bind VFs to a compatible driver and if this succeeds a new network interface will be instantiated for each VF. If set to NM_TERNARY_FALSE (0), VFs will not be claimed and no network interfaces will be created for them. When set to NM_TERNARY_DEFAULT (-1), the global default is used; in case the global default is unspecified it is assumed to be NM_TERNARY_TRUE (1).")
-#define DESCRIBE_DOC_NM_SETTING_SRIOV_TOTAL_VFS N_("The total number of virtual functions to create.")
-#define DESCRIBE_DOC_NM_SETTING_SRIOV_VFS N_("Array of virtual function descriptors. Each VF descriptor is a dictionary mapping attribute names to GVariant values. The 'index' entry is mandatory for each VF. When represented as string a VF is in the form: \"INDEX [ATTR=VALUE[ ATTR=VALUE]...]\". for example: \"2 mac=00:11:22:33:44:55 spoof-check=true\". The \"vlans\" attribute is represented as a semicolon-separated list of VLAN descriptors, where each descriptor has the form \"ID[.PRIORITY[.PROTO]]\". PROTO can be either 'q' for 802.1Q (the default) or 'ad' for 802.1ad.")
+#define DESCRIBE_DOC_NM_SETTING_SRIOV_TOTAL_VFS N_("The total number of virtual functions to create. Note that when the sriov setting is present NetworkManager enforces the number of virtual functions on the interface also when it is zero. To prevent any changes to SR-IOV parameters don't add a sriov setting to the connection.")
+#define DESCRIBE_DOC_NM_SETTING_SRIOV_VFS N_("Array of virtual function descriptors. Each VF descriptor is a dictionary mapping attribute names to GVariant values. The 'index' entry is mandatory for each VF. When represented as string a VF is in the form: \"INDEX [ATTR=VALUE[ ATTR=VALUE]...]\". for example: \"2 mac=00:11:22:33:44:55 spoof-check=true\". Multiple VFs can be specified using a comma as separator. Currently the following attributes are supported: mac, spoof-check, trust, min-tx-rate, max-tx-rate, vlans. The \"vlans\" attribute is represented as a semicolon-separated list of VLAN descriptors, where each descriptor has the form \"ID[.PRIORITY[.PROTO]]\". PROTO can be either 'q' for 802.1Q (the default) or 'ad' for 802.1ad.")
#define DESCRIBE_DOC_NM_SETTING_TC_CONFIG_QDISCS N_("Array of TC queueing disciplines.")
#define DESCRIBE_DOC_NM_SETTING_TC_CONFIG_TFILTERS N_("Array of TC traffic filters.")
#define DESCRIBE_DOC_NM_SETTING_TEAM_CONFIG N_("The JSON configuration for the team network interface. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details.")
diff --git a/libnm-core/nm-setting-sriov.c b/libnm-core/nm-setting-sriov.c
index 39b872a225..b7756e3506 100644
--- a/libnm-core/nm-setting-sriov.c
+++ b/libnm-core/nm-setting-sriov.c
@@ -1248,6 +1248,11 @@ nm_setting_sriov_class_init (NMSettingSriovClass *klass)
*
* The total number of virtual functions to create.
*
+ * Note that when the sriov setting is present NetworkManager
+ * enforces the number of virtual functions on the interface
+ * also when it is zero. To prevent any changes to SR-IOV
+ * parameters don't add a sriov setting to the connection.
+ *
* Since: 1.14
**/
/* ---ifcfg-rh---
@@ -1283,6 +1288,10 @@ nm_setting_sriov_class_init (NMSettingSriovClass *klass)
*
* "2 mac=00:11:22:33:44:55 spoof-check=true".
*
+ * Multiple VFs can be specified using a comma as separator.
+ * Currently the following attributes are supported: mac,
+ * spoof-check, trust, min-tx-rate, max-tx-rate, vlans.
+ *
* The "vlans" attribute is represented as a semicolon-separated
* list of VLAN descriptors, where each descriptor has the form
*
@@ -1291,6 +1300,7 @@ nm_setting_sriov_class_init (NMSettingSriovClass *klass)
* PROTO can be either 'q' for 802.1Q (the default) or 'ad' for
* 802.1ad.
*
+
* Since: 1.14
**/
/* ---ifcfg-rh---