Add bond parameters corresponding to:
* IFLA_BOND_AD_ACTOR_SYS_PRIO
* IFLA_BOND_AD_USER_PORT_KEY
* IFLA_BOND_AD_ACTOR_SYSTEM
* IFLA_BOND_TLB_DYNAMIC_LB
These are available in new(ish) kernels.
A new error type LinkNotFoundError is returned instead
of the default error type to facilitate better error
handling by downstream consumers of this package
* Multicast snooping and hello time are the only ones supported at the
moment
* Only pass values to kernel when user sets them, otherwise let kernel
decide default
* Can set multicast snooping on existing bridges
* Tests disabled on Travis CI as the kernel version is too old
* All bridge flags copied from Kernel code, but only the two mentioned
above work
(5a7ad1146c/include/uapi/linux/if_link.h (L232-L281))
Signed-off-by: Petar Petrov <pppepito86@gmail.com>
Signed-off-by: Ed King <eking@pivotal.io>
Signed-off-by: Konstantinos Karampogias <konstantinos.karampogias@swisscom.com>
Signed-off-by: Will Martin <wmartin@pivotal.io>
Currently a LinkByName("bondX") doesn't return the bond specific attributes.
parseBondData needs to update the link that is passed in in order for
the bond's Mode, Miimon etc to be populated correctly.
The go get command and make both fail when executed on
non-linux platforms. Modified it so that there are no
compilation errors when developing in such an
environment.
* Add netlink definitions for extra IFLAs
The relevant IFLA_* are defined in the kernel but not in the syscall
package.
* Parameterize the return value of loadSimpleBpf
Allow the return value of the bpf program created by loadSimpleBpf to
be specified by the caller. Before this, the value was hardcoded to 1.
* Add support for a new IFLA that enables using a bpf program as a
filter early in the driver path of some NICs.
* Add a test for set/get of an xdp program. Since currently, the XDP
IFLA is optional, check that the hardware supports it before trying to
set the field.
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
The mode on macvtap interfaces was not being set correctly.
Due to this the mode on macvtap is always set to default.
Set the mode correctly and add unit tests to check the same
This fixes issue https://github.com/vishvananda/netlink/issues/136
Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
It looks little awkward, but should be enough for people who care about
defaults from kernel.
Fix#26
Also fixed bug with setting TxQLen for main device. It was never set
before.
Signed-off-by: Alexander Morozov <lk4d4@docker.com>