From: Michal Jastrzebski Date: Thu, 13 Jul 2017 09:48:32 +0000 (+0200) Subject: app/testpmd: fix bonding initialization X-Git-Tag: spdx-start~2374 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=59bcf8084f8974ec2e52d90fd98f4a70c0eecd10;p=dpdk.git app/testpmd: fix bonding initialization when creating a bond device in testpmd, a name for a device must meet the correct convention described in the documentation: The device name must start with the net_bonding prefix followed by numbers or letters. Change for ALB mempool allocation - mem_name was too long. Fixes: 9bf4901d1a11 ("bus/vdev: remove probe with driver name option") Cc: stable@dpdk.org Signed-off-by: Michal Jastrzebski Reviewed-by: Jingjing Wu --- diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 7e08674b95..b1b36c14ba 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -4919,7 +4919,7 @@ static void cmd_create_bonded_device_parsed(void *parsed_result, return; } - snprintf(ethdev_name, RTE_ETH_NAME_MAX_LEN, "net_bond_testpmd_%d", + snprintf(ethdev_name, RTE_ETH_NAME_MAX_LEN, "net_bonding_testpmd_%d", bond_dev_num++); /* Create a new bonded device. */ diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c index 7f6884d2f1..d9d37495d8 100644 --- a/drivers/net/bonding/rte_eth_bond_alb.c +++ b/drivers/net/bonding/rte_eth_bond_alb.c @@ -80,7 +80,7 @@ bond_mode_alb_enable(struct rte_eth_dev *bond_dev) * The value is chosen to be cache aligned. */ data_size = 256 + RTE_PKTMBUF_HEADROOM; - snprintf(mem_name, sizeof(mem_name), "%s_MODE6", + snprintf(mem_name, sizeof(mem_name), "%s_ALB", bond_dev->device->name); internals->mode6.mempool = rte_pktmbuf_pool_create(mem_name, 512 * RTE_MAX_ETHPORTS,