bonding: fix name and port validation
authorStephen Hemminger <shemming@brocade.com>
Wed, 10 Jun 2015 22:06:25 +0000 (15:06 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 20 Jul 2015 00:47:38 +0000 (02:47 +0200)
commitfa8cc60774a7167823f63997ab669b7f39c11af4
tree098c9a4197783367dff604a6ba6e70f97f3bf296
parent393775d5c0d35fb74e139c0b4ec9cc2304b70581
bonding: fix name and port validation

Cleanup the code in bonding that checks ports.
  * Use standard rte_eth_dev_is_valid_port
  * Change name of driver string to avoid variable namespace conflicts
  * Get rid of unnecessary string comparison stuff. A simple pointer
    check is enough here.
  * Get rid of unnecessary assignment of driver_name, it is already
    done by common code.
  * Don't generate unnecessary log messages on error.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
drivers/net/bonding/rte_eth_bond_api.c
drivers/net/bonding/rte_eth_bond_pmd.c
drivers/net/bonding/rte_eth_bond_private.h