[dpdk-dev] [PATCH] ethdev: fix wrong memset
Ferruh Yigit
ferruh.yigit at intel.com
Fri Jan 20 12:21:22 CET 2017
On 1/20/2017 8:04 AM, Yuanhan Liu wrote:
> Fix an silly error by auto-complete while managing the merge conflicts.
> It's the eth_dev_data (but not eth_dev) entry should be memset.
>
> Fixes: d948f596fee2 ("ethdev: fix port data mismatched in multiple process model")
>
> Reported-by: Ferruh Yigit <ferruh.yigit at intel.com>
> Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> ---
> lib/librte_ether/rte_ethdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
> index 4790faf..61f44e2 100644
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -225,7 +225,7 @@ struct rte_eth_dev *
> return NULL;
> }
>
> - memset(&rte_eth_devices[port_id], 0, sizeof(*eth_dev->data));
> + memset(&rte_eth_dev_data[port_id], 0, sizeof(struct rte_eth_dev_data));
Not directly related to the this issue, but, after fix, this may have
issues with secondary process.
There were patches sent to fix this.
> eth_dev = eth_dev_get(port_id);
> snprintf(eth_dev->data->name, sizeof(eth_dev->data->name), "%s", name);
> eth_dev->data->port_id = port_id;
>
More information about the dev
mailing list