vdp add protocol switch

Add a protocol switch for the vdp protocol version being used
on an interface. The netlink message received from a EVB user
such as libvirtd will be directed to the vdp module handling
the protocol version running on a particular interface.

The vdp protocol versions supported are draft 0.2 and draft
2.2 (ratified standard). The switch facing the interface
determines the protocol version being, lldpad simple reacts
using the proper protocol version.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
evbtest add command support

Add support to identify and handle commands in the input file.
Commands specified in the test case input file alter
the behavior of the test program.

Signed-off-by: Thomas Richter <tmricht@de.ibm.com>
evbtest add documentation changes

Added documentation for the new features of the test program.
add documentation for very minimalistic vdp protocol support.

Signed-off-by: Thomas Richter <tmricht@de.ibm.com>
evbtest rename test program to qbg22sim

Rename the test program from evbname to qbg22sim.
The name matches better the purpose of the test
programe.

Signed-off-by: Thomas Richter <tmricht@de.ibm.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
lldpad: Use a permament socket for ioctls

Use a permanent socket for routine ioctls. This not
only is a minor optimization, but it also avoids bizzare
behavior when the process runs out of sockets due to
a socket leak.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Jack Morgan <jack.morgan@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
lldpad: Stop port list damage in remove_port

Commit 384ba242 changed this function to use the standard
port_find_by_name function, which would be good, except
that it missed the setting of the parent pointer, which
is used to remove the port. Consequently, remove_port
calls were damaging the port list. Fix that by restoring
the custom loop.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Jack Morgan <jack.morgan@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
lldpad: Fix size of memcpy in init_oper_apptlv

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Reviewed-by: john.r.fastabend@intel.com
Tested-by: Jack Morgan <jack.morgan@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
lldpad: Document shutdown behavior

Document the fact that lldpad does not undo any of the
configuration that it has performed when it terminates.
The main use cases for termination are restarting due
to an update and during system shutdown. In both cases,
things are probably best left in their existing state.
This patch documents this behavior.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Jack Morgan <jack.morgan@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
lldpad: man page fixes

Various editorial fixes for man pages in the
lldpad package.

Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
lldptool: man page fixup

lldptool-pfc - Remove reference to non-existant parameter
'numtcs' and show 'enableTx' as a parameter.

lldptool-ets - Clarify that the legacy mode of DCBX can
be either CIN or CEE (not just CEE).
 - clarify that the numtcs parameter is read only
 - remove information about using tcfilters for traffic
   classification and add references to net_prio cgroups.

lldptool-dcbx - grammatical fixes
 - clarify that DCBX mode may come in in legacy DCBX in
   certain cases when the IEEE-DCBX tlvid is 'auto'.

lldptool-app - remove note about setting default priority
  not being supported.

Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Add newer kernel routing attributes to lldpad

IFLA_NET_NS_FD
  IFLA_EXT_MASK
  IFLA_PROMISCUITY
  IFLA_NUM_TX_QUEUES
  IFLA_NUM_RX_QUEUES
  IFLA_CARRIER

Signed-off-by: Mijo Safradin <mijo@linux.vnet.ibm.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>