DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Gyumin <hkm73560@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Relationship between H/W ring and S/W ring
Date: Thu, 30 Oct 2014 09:55:23 +0000	[thread overview]
Message-ID: <20141030095522.GA4460@bricha3-MOBL3> (raw)
In-Reply-To: <5451E980.2060707@gmail.com>

On Thu, Oct 30, 2014 at 04:32:16PM +0900, Gyumin wrote:
> Hi
> 
> I`m reading the ixgbe code especially about H/W ring and S/W ring. Is the
> relationship between H/W ring and S/W ring one-to-one mapping?
> As far as I know, H/W ring size is determined in the code(hard coded) while
> S/W ring size is determined in port configuration time.
> In the ixgbe_rx_alloc_bufs function, H/W ring header address and packet
> address indicate the DMA address of S/W ring's mbuf. I understand it means
> that the relationship between the H/W ring and S/W ring is one-to-one
> mapping. For example, if the size of H/W ring is greater than the size of
> S/W ring then some portion of H/W ring is unused. Is it correct?
> 
> Thanks

Hi,

Yes, there is a 1:1 mapping between the hardware and software ring entries, and both are sized depending on the configuration parameters passed to the ring setup APIs. As you state, the HW ring contains the DMA addresses of the packet buffers, while the sw_ring contains the pointers to the original mbufs. The two rings are always kept in sync in the code.

/Bruce

  reply	other threads:[~2014-10-30  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30  7:32 Gyumin
2014-10-30  9:55 ` Bruce Richardson [this message]
2014-10-31  0:51   ` Gyumin
2014-10-31 10:08     ` Bruce Richardson
2014-11-01 13:52       ` GyuminHwang

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=20141030095522.GA4460@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=hkm73560@gmail.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).