[dpdk-dev] [PATCH] bonding: 8023ad: fix incorrect typecast of socket
De Lara Guarch, Pablo
pablo.de.lara.guarch at intel.com
Fri Aug 7 11:01:59 CEST 2015
> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Sergey Balabanov
> Sent: Wednesday, August 05, 2015 2:49 PM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH] bonding: 8023ad: fix incorrect typecast of
> socket
>
> 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.
> ---
> drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 */
> --
> 2.1.4
Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
You forgot to sign off the patch, can you send a v2 with it? You can include my ack. Thanks!
Pablo
More information about the dev
mailing list