[dpdk-dev] [PATCH v2] xenvirt: Fix build break on cmdline_parse_etheraddr call

Qiu, Michael michael.qiu at intel.com
Thu Dec 18 14:45:54 CET 2014


Hi Neil,

I think if you could add the commit author in the cc list will be better.

Because this could let him know about his code's issue and he is the
always the best person to review the patch.

Thanks,
Michael

On 2014/12/18 19:32, Neil Horman wrote:
> Back in:
>
> commit aaa662e75c23c61a1d79bd4d1f9f35b4967c39db
> Author: Alan Carew <alan.carew at intel.com>
> Date:   Fri Dec 5 15:19:07 2014 +0100
>
>     cmdline: fix overflow on bsd
>
> The author failed to fixup a call to cmdline_parse_etheraddr in xenvirt.  This
> patch makes the needed correction to avoid a build break
>
> Signed-off-by: Neil Horman <nhorman at tuxdriver.com>
> CC: Thomas Monjalon <thomas.monjalon at 6wind.com>
> CC: Olivier Matz <olivier.matz at 6wind.com>
>
> ---
> Change notes
>
> v2: Changed sizeof(struct ether_addr) to sizeof(dict->addr)
> ---
>  lib/librte_pmd_xenvirt/rte_eth_xenvirt.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c b/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c
> index 6555ec5..04e30c9 100644
> --- a/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c
> +++ b/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c
> @@ -586,8 +586,9 @@ rte_eth_xenvirt_parse_args(struct xenvirt_dict *dict,
>  		if (!strncmp(pair[0], RTE_ETH_XENVIRT_MAC_PARAM,
>  				sizeof(RTE_ETH_XENVIRT_MAC_PARAM))) {
>  			if (cmdline_parse_etheraddr(NULL,
> -							pair[1],
> -							&dict->addr) < 0) {
> +						    pair[1],
> +						    &dict->addr,
> +						    sizeof(dict->addr)) < 0) {
>  				RTE_LOG(ERR, PMD,
>  					"Invalid %s device ether address\n",
>  					name);



More information about the dev mailing list