summaryrefslogtreecommitdiffstats
path: root/src/shared/netif-sriov.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-01-14 19:35:27 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-01-19 07:00:53 +0100
commit41ce9d769d394d19f1caab8b8a89b7dea50db0bc (patch)
tree9f1f0daa85ac1bd91151672650efd33e460c8ad9 /src/shared/netif-sriov.h
parentudev/net: also support [SR-IOV] section in .link files (diff)
downloadsystemd-41ce9d769d394d19f1caab8b8a89b7dea50db0bc.tar.xz
systemd-41ce9d769d394d19f1caab8b8a89b7dea50db0bc.zip
udev/net: allow to set number of SR-IOV virtual functions
This adds SR-IOVVirtualFunctions= setting in [Link] section.
Diffstat (limited to 'src/shared/netif-sriov.h')
-rw-r--r--src/shared/netif-sriov.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shared/netif-sriov.h b/src/shared/netif-sriov.h
index 871496287f..4c85f101c7 100644
--- a/src/shared/netif-sriov.h
+++ b/src/shared/netif-sriov.h
@@ -3,6 +3,8 @@
#include <linux/if_link.h>
+#include "sd-device.h"
+
#include "conf-parser.h"
#include "ether-addr-util.h"
#include "hashmap.h"
@@ -32,7 +34,9 @@ typedef struct SRIOV {
SRIOV *sr_iov_free(SRIOV *sr_iov);
int sr_iov_set_netlink_message(SRIOV *sr_iov, sd_netlink_message *req);
-int sr_iov_drop_invalid_sections(OrderedHashmap *sr_iov_by_section);
+int sr_iov_get_num_vfs(sd_device *device, uint32_t *ret);
+int sr_iov_set_num_vfs(sd_device *device, uint32_t num_vfs, OrderedHashmap *sr_iov_by_section);
+int sr_iov_drop_invalid_sections(uint32_t num_vfs, OrderedHashmap *sr_iov_by_section);
DEFINE_SECTION_CLEANUP_FUNCTIONS(SRIOV, sr_iov_free);
@@ -41,3 +45,4 @@ CONFIG_PARSER_PROTOTYPE(config_parse_sr_iov_boolean);
CONFIG_PARSER_PROTOTYPE(config_parse_sr_iov_link_state);
CONFIG_PARSER_PROTOTYPE(config_parse_sr_iov_vlan_proto);
CONFIG_PARSER_PROTOTYPE(config_parse_sr_iov_mac);
+CONFIG_PARSER_PROTOTYPE(config_parse_sr_iov_num_vfs);