From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH v1 2/2] net/af_xdp: set MAC addrs field to NULL
Date: Tue, 30 Apr 2019 10:04:09 +0800 [thread overview]
Message-ID: <20190430020409.GA37233@intel.com> (raw)
Message-ID: <20190430020409.owuQZIG8N2IHosjt5JugfenwOWSFu6EYngyRUpxZJV4@z> (raw)
In-Reply-To: <7c41c899-a70c-36d5-19c4-f2280210262e@intel.com>
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.ye@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
next prev parent reply other threads:[~2019-04-30 2:10 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 5:09 [dpdk-dev] [PATCH v1 0/2] support RTE_ETH_DEV_CLOSE_REMOVE flag for AF_XDP Xiaolong Ye
2019-04-26 5:09 ` Xiaolong Ye
2019-04-26 5:09 ` [dpdk-dev] [PATCH v1 1/2] net/af_xdp: remove resources when port is closed Xiaolong Ye
2019-04-26 5:09 ` Xiaolong Ye
2019-04-29 17:00 ` Ferruh Yigit
2019-04-29 17:00 ` Ferruh Yigit
2019-04-29 20:14 ` Thomas Monjalon
2019-04-29 20:14 ` Thomas Monjalon
2019-04-29 22:28 ` Ferruh Yigit
2019-04-29 22:28 ` Ferruh Yigit
2019-04-29 22:34 ` Thomas Monjalon
2019-04-29 22:34 ` Thomas Monjalon
2019-04-30 7:33 ` Ferruh Yigit
2019-04-30 7:33 ` Ferruh Yigit
2019-04-30 7:55 ` Thomas Monjalon
2019-04-30 7:55 ` Thomas Monjalon
2019-04-30 8:10 ` Ferruh Yigit
2019-04-30 8:10 ` Ferruh Yigit
2019-04-30 2:06 ` Ye Xiaolong
2019-04-30 2:06 ` Ye Xiaolong
2019-04-30 7:35 ` Ferruh Yigit
2019-04-30 7:35 ` Ferruh Yigit
2019-04-30 8:37 ` Ye Xiaolong
2019-04-30 8:37 ` Ye Xiaolong
2019-04-26 5:09 ` [dpdk-dev] [PATCH v1 2/2] net/af_xdp: set MAC addrs field to NULL Xiaolong Ye
2019-04-26 5:09 ` Xiaolong Ye
2019-04-29 17:02 ` Ferruh Yigit
2019-04-29 17:02 ` Ferruh Yigit
2019-04-30 2:04 ` Ye Xiaolong [this message]
2019-04-30 2:04 ` Ye Xiaolong
2019-04-30 8:39 ` [dpdk-dev] [PATCH v3] net/af_xdp: remove resources when port is closed Xiaolong Ye
2019-04-30 8:39 ` Xiaolong Ye
2019-04-30 11:02 ` Ferruh Yigit
2019-04-30 11:02 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190430020409.GA37233@intel.com \
--to=xiaolong.ye@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).