DPDK patches and discussions
 help / color / mirror / Atom feed
From: 최익성 <pnk003@naver.com>
To: dev@dpdk.org
Subject: [dpdk-dev]  Would you check if there is deadlock in rte_distributor_process() librte_distributor?
Date: Fri, 16 Oct 2015 15:33:41 +0900 (KST)	[thread overview]
Message-ID: <e2fa52719985740f8b3b2f3c41d6f96@cweb07.nm.nhnsystem.com> (raw)

Dear DPDK experts.
 
Thank you very much for your excellent work and great contributions.
 
 
I have a question about distributor library source code.   /dpdk/lib/librte_distributor/rte_distributor.c
 
In rte_distributor_process(),
 
rte_distributor_process() { mbufs[] -&gt; d-&gt;backlog -&gt; d-&gt;bufs }   =&gt; lcore_worker() reads d-&gt;bufs (with 0x0 empty flag packet) and sets response bit(RTE_DISTRIB_GET_BUF) of a received packet (d-&gt;bufs).
 
When the first packet arrives at rte_distributor_process(), the match value is 0.
And it is not enqueued in d-&gt;backlog nor in d-&gt;bufs    because the match value equals 0 .
 
The received first packet is never enqueued to d-&gt;bufs until the lcore_worker() returns the packet bufs (with the response bit(RTE_DISTRIB_GET_BUF) of bufs packet is set).
 
Since the lcore_worker cannot return packet if it cannot receive packet (Since the lcore_worker only reads the received packet with 0x0 flag).
 
It seems to be a deadlock.
 
Thus. first packet is never processed, I think.
 
 
Would you check this? 
 
Am I wrong? 
 
Does the lcore_worker() return packet even though it does not have received packet?
 
 
Thank you very much. 
 
Sincerely Yours,
 
Ick-Sung Choi.
 

                 reply	other threads:[~2015-10-16  6:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=e2fa52719985740f8b3b2f3c41d6f96@cweb07.nm.nhnsystem.com \
    --to=pnk003@naver.com \
    --cc=dev@dpdk.org \
    /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).