On 04/29, Ferruh Yigit wrote: >On 4/26/2019 6:09 AM, Xiaolong Ye wrote: >> As af_xdp pmd doesn't allocate MAC addresses dynamically, it needs to be >> set as NULL, so it won't be released by rte_eth_dev_release_port(), >> otherwise, there would be "EAL: Error: Invalid memory" error. >> >> Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> >> --- >> drivers/net/af_xdp/rte_eth_af_xdp.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c >> b/drivers/net/af_xdp/rte_eth_af_xdp.c >> index a12551cbf..f659c0496 100644 >> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c >> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c >> @@ -458,6 +458,12 @@ eth_dev_close(struct rte_eth_dev *dev) >> >> (void)xsk_umem__delete(internals->umem->umem); >> >> + /* >> + * MAC is not allocated dynamically, setting it to NULL would prevent >> + * from releasing it in rte_eth_dev_release_port. >> + */ >> + dev->data->mac_addrs = NULL; >> + >> xdp_umem_destroy(internals->umem); >> >> remove_xdp_program(internals); >> > >Keeping this patch in separate patch will cause the above error after first >patch, what do you think merging this with prev patch?
Make sence, will squash it into first patch. Thanks, Xiaolong