summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Balabanov <balabanovsv@ecotelecom.ru>2015-08-07 12:33:18 +0300
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-08-10 01:56:05 +0200
commit85cc012ddda48ee6930789187bbfb661066e1c02 (patch)
tree2369882ec1bdb76d4769a3275b3c3a855290e4cd
parentd23f7f8bcddecdc420875b5899715fbd97483370 (diff)
downloaddpdk-85cc012ddda48ee6930789187bbfb661066e1c02.zip
dpdk-85cc012ddda48ee6930789187bbfb661066e1c02.tar.gz
dpdk-85cc012ddda48ee6930789187bbfb661066e1c02.tar.xz
bonding: fix socket id for LACP slave
On slave activation in LACP (8023AD) SOCKET_ANY_ID (which is -1) is being casted to unsigned char and then to signed int. The result is that socket_id has value of 255, not -1. This results to memory allocation failure. Fixes: 46fb43683679 ("bond: add mode 4") Signed-off-by: Sergey Balabanov <balabanovsv@ecotelecom.ru> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
-rw-r--r--drivers/net/bonding/rte_eth_bond_8023ad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 97a828e..c0f0b99 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -849,7 +849,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
};
char mem_name[RTE_ETH_NAME_MAX_LEN];
- uint8_t socket_id;
+ int socket_id;
unsigned element_size;
/* Given slave mus not be in active list */