teamd: improved TX hashing code to handle L4 and vlan headers

The code tries to avoid as much as possible to use BPF
scratch memory areas, do maths or move data due to
performance reasons. Also, it's not possible to jump back.

The packet information is implict on the each branch taken.
The BPF code is quite long if all protocols are enabled, but
that shouldn't be a problem because the largest jump offset
~120 (goto vlan branch) is not close to socket_filter->k limit
of 256, it is expense as much as a jump to the next instruction
and the CPU should always take the shortest and quick path
possible for any scenario.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: fix ENABLE_DBUS typo

Signed-off-by: Jiří Župka <jzupka@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
libteam: fix reference leak in send_and_recv()

Reported-by: Jiri Zupka <jzupka@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: remove delayed port free since it's not used anyway and fix mem leak

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
libteam: add support for notify_peers options

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: add support for notify peers

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: ab: set notify_peers_count to 1 by default for activebackup

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
libteam: add support for mcast_rejoin_* options

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: add support for multicast group rejoin sending

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: ab: set mcast_rejoin_count to 1 by default for activebackup

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: introduce take-over option

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: Add ZeroMQ interface.

enable ZeroMQ interface

teamd -Z "tcp:\\127.0.0.1:5555"
teamdctl -Z "tcp:\\127.0.0.1:5555" config dump

Take care when you use this type of connection.
Security must be ensured by firewall or other tools.
There could be added verification by certificate with SSL layer.
It could be added in next version.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
teamd: Changes error messages in teamdctl interfaces.

Messages was changed due into adding new communication
interface to teamd and teamdctl. It should be more clear
from which communication interface messages comes from.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
teamd: Update man page for ZMQ interface.

Signed-off-by: Jiří Župka <jzupka@redhat.com>