Today netlink package supports Get/Set of a VF's max TX rate
via IFLA_VF_TX_RATE netlink attribute.
This patch add support to Get/Set of a VFs min and max TX rate
via IFLA_VF_RATE netlink attribute.
- Add support to set min/max tx rate for VF via IFLA_VF_RATE
- Added IFLA_VF_RATE min/max tx rate attributes to netlink.VfInfo
including parsing support in netlink.parseVfInfo()
NOTE: According to [1] IFLA_VF_RATE takes precedence over
IFLA_VF_TX_RATE. Dealing with the co-existance of these
netlink attributes is left for the user to handle.
[1]https://lists.openwall.net/netdev/2014/05/22/42
The non-Linux stub implementation found in netlink_unspecified.go was
missing quite a few Link related functions. Also, some of the
functions that were there took a `*Link` instead of a `Link`.
The issue was noticed when building coreos/flannel on Mac. By default
the build would fail with:
pkg/ip/iface.go:32: cannot use link (type *netlink.Device) as type
*netlink.Link in argument to netlink.AddrList:
*netlink.Link is pointer to interface, not interface
Resolved by making interfaces of AddList() implementations the same,
although the reason for having `netlink_unspecified.go` is not fully
clear to me and given that there's only one implementation available.
Perhaps a better idea would be to remove the "interface" altoghether.
Now interface is supposing that you setting protinfo attrs for link one
by one. But you can get all protinfo attrs with one call.
Signed-off-by: Alexander Morozov <lk4d4@docker.com>