numam-dpdk/drivers/net/bonding
Gowrishankar Muthukrishnan e54b560d28 net/bonding: fix primary slave port id storage type
primary_slave_port_id is uint16_t which needs to be correctly stored
with the same data type of input parameter in bond_ethdev_configure.

In powerpc, creating bond pmd results in below error due to wrong
cast on input param. This is reproducible, only when using shared
libraries.

sudo -E LD_LIBRARY_PATH=$PWD/$RTE_TARGET/lib $RTE_TARGET/app/testpmd \
  -l 0,8 --socket-mem=1024,1024 \
  --vdev 'net_tap0,iface=dpdktap0' --vdev 'net_tap1,iface=dpdktap1' \
  --vdev 'net_bonding0,mode=1,slave=0,slave=1,primary=0,socket_id=1' \
  -d $RTE_TARGET/lib/librte_pmd_tap.so \
  -d $RTE_TARGET/lib/librte_mempool_ring.so -- --forward-mode=rxonly

Configuring Port 0 (socket 0)
PMD: net_tap0: 0x70a854070280: TX configured queues number: 1
PMD: net_tap0: 0x70a854070280: RX configured queues number: 1
Port 0: 86:EA:6D:52:3E:DB
Configuring Port 1 (socket 0)
PMD: net_tap1: 0x70a854074300: TX configured queues number: 1
PMD: net_tap1: 0x70a854074300: RX configured queues number: 1
Port 1: 42:9A:B8:49:B6:00
Configuring Port 2 (socket 1)
EAL: Failed to set primary slave port 7424 on bonded device net_bonding0
Fail to configure port 2
EAL: Error - exiting with code: 1
  Cause: Start ports failed

Fixes: f8244c6399 ("ethdev: increase port id range")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-03-30 14:08:43 +02:00
..
Makefile drivers: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
meson.build net/bonding: fix library version in meson build 2018-03-27 18:47:05 +02:00
rte_eth_bond_8023ad_private.h drivers: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte_eth_bond_8023ad.c net/bonding: fix activated slave in 8023ad mode 2018-01-16 18:47:49 +01:00
rte_eth_bond_8023ad.h drivers: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte_eth_bond_alb.c drivers: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte_eth_bond_alb.h drivers: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte_eth_bond_api.c net/bonding: check error of MAC address setting 2018-02-05 16:51:51 +01:00
rte_eth_bond_args.c net/bonding: fix primary slave port id storage type 2018-03-30 14:08:43 +02:00
rte_eth_bond_pmd.c net/bonding: fix burst hash computation 2018-01-31 20:57:29 +01:00
rte_eth_bond_private.h ethdev: separate driver APIs 2018-01-22 01:26:49 +01:00
rte_eth_bond.h drivers: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte_pmd_bond_version.map net/bonding: remove old ABI 2017-10-06 18:21:53 +02:00