DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: 王志宏 <wangzhihong.wzh@bytedance.com>
Cc: <dev@dpdk.org>, <qi.z.zhang@intel.com>
Subject: Re: [External] Re: [PATCH] eal/linux: register mp hotplug callback after memory init
Date: Fri, 2 Jun 2023 14:10:09 +0100	[thread overview]
Message-ID: <0376667b-7b39-9e3f-c176-e8176226e3af@intel.com> (raw)
In-Reply-To: <CAMne5nBdFiEKsTMhb4aebaWgx9_iX=Eo6AdvwbbhAhf+pfiN4A@mail.gmail.com>

On 6/2/2023 4:33 AM, 王志宏 wrote:
> Apologize that I have to go directly to function names to explain :)
>    - rte_eal_intr_init creates eal_intr_thread_main which starts 
> eal_intr_handle_interrupts
>    - rte_mp_channel_init creates mp_handle which processes messages 
> registered by rte_mp_action_register
>    - then, eal_mp_dev_hotplug_init calls rte_mp_action_register to 
> register handle_primary_request for EAL_DEV_MP_ACTION_REQUEST
> 
> At this point the whole messaging mechanism starts to function: When 
> primary attaches/detaches devices, it sends EAL_DEV_MP_ACTION_REQUEST, 
> and handle_primary_request invokes __handle_primary_request, which 
> calls local_dev_probe/remove. In the end it goes to for 
> example rte_eth_dev_attach_secondary.
> 
> Now, if secondary is somewhere after eal_mp_dev_hotplug_init but before 
> memory init done, it will crash due to memory access violation.
> 
> Thanks
> Zhihong

Hi,

I went into the code for IPC and you're right: we're only ignoring 
requests from *unregistered* callbacks, but if they were already 
registered, we handle them, which would cause your issue.

-- 
Thanks,
Anatoly


  reply	other threads:[~2023-06-02 13:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31  6:55 Zhihong Wang
2023-06-01 12:26 ` Burakov, Anatoly
2023-06-02  3:33   ` [External] " 王志宏
2023-06-02 13:10     ` Burakov, Anatoly [this message]
2023-06-02 13:10 ` Burakov, Anatoly
2023-06-07 20:21 ` David Marchand
2023-06-08  7:29   ` [External] " 王志宏
2023-06-08  7:25 ` [PATCH v2] " Zhihong Wang
2023-06-08  8:08   ` David Marchand

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=0376667b-7b39-9e3f-c176-e8176226e3af@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=wangzhihong.wzh@bytedance.com \
    /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).