diff options
author | Susant Sahani <ssahani@vmware.com> | 2019-09-23 16:51:02 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-09-24 16:33:35 +0200 |
commit | 224ded670feeb59f7231e6102a5bee5d3b653a8a (patch) | |
tree | 6f7d4645dd9fa5275dc3acaf2b199a9338d98508 /src/shared/ethtool-util.h | |
parent | 68c2b5ddb1881c40201c1d86a7852dd5c5c06a76 (diff) | |
download | systemd-224ded670feeb59f7231e6102a5bee5d3b653a8a.tar.gz |
link: Add support to configure NIC ring buffer size
Diffstat (limited to 'src/shared/ethtool-util.h')
-rw-r--r-- | src/shared/ethtool-util.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h index 8b32b243f3..5dd7800852 100644 --- a/src/shared/ethtool-util.h +++ b/src/shared/ethtool-util.h @@ -79,12 +79,22 @@ typedef struct netdev_channels { bool combined_count_set; } netdev_channels; +typedef struct netdev_ring_param { + uint32_t rx_pending; + uint32_t tx_pending; + + bool rx_pending_set; + bool tx_pending_set; +} netdev_ring_param; + + int ethtool_get_driver(int *fd, const char *ifname, char **ret); int ethtool_get_link_info(int *fd, const char *ifname, int *ret_autonegotiation, size_t *ret_speed, Duplex *ret_duplex, NetDevPort *ret_port); int ethtool_set_speed(int *fd, const char *ifname, unsigned speed, Duplex duplex); int ethtool_set_wol(int *fd, const char *ifname, WakeOnLan wol); +int ethtool_set_nic_buffer_size(int *fd, const char *ifname, netdev_ring_param *ring); int ethtool_set_features(int *fd, const char *ifname, int *features); int ethtool_set_glinksettings(int *fd, const char *ifname, int autonegotiation, uint32_t advertise[static N_ADVERTISE], @@ -108,3 +118,4 @@ CONFIG_PARSER_PROTOTYPE(config_parse_wol); CONFIG_PARSER_PROTOTYPE(config_parse_port); CONFIG_PARSER_PROTOTYPE(config_parse_channel); CONFIG_PARSER_PROTOTYPE(config_parse_advertise); +CONFIG_PARSER_PROTOTYPE(config_parse_nic_buffer_size); |