DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ciara Loftus <ciara.loftus@intel.com>, dev@dpdk.org
Cc: xiaolong.ye@intel.com
Subject: Re: [dpdk-dev] [PATCH v4 0/3] AF_XDP PMD Fixes
Date: Thu, 13 Feb 2020 12:18:34 +0000	[thread overview]
Message-ID: <8d97f8df-2efc-1707-1066-49d76763115f@intel.com> (raw)
In-Reply-To: <20200213084914.54755-1-ciara.loftus@intel.com>

On 2/13/2020 8:49 AM, Ciara Loftus wrote:
> This series introduces some fixes for the zero copy path of the AF_XDP.
> In zero copy, the mempool objects are mapped directly into the AF_XDP UMEM.
> Below depicts the layout of an object in a mempool.
> 
> +-----+--------+------+------+-----+-------------+
> | mp  | struct | mbuf | mbuf | XDP |             |
> | hdr | rte_   | priv |  hr  | hr  |   payload   |
> | obj | mbuf   |      |      |     |             |
> +-----+--------+------+------+-----+-------------+
>   64     128       *     128   256        *
> 
> <---------------- frame size -------------------->
> <---- frame hr ------------->
> 
> 1: net/af_xdp: fix umem frame size & headroom calculations
> * The previous frame size calculation incorrectly used
> mb_pool->private_data_size and didn't include mb_pool->header_size. Instead
> of performing a manual calculation, use the rte_mempool_calc_obj_size API
> to determine the frame size.
> * The previous frame headroom calculation also incorrectly used
> mb_pool->private_data_size and didn't include mb_pool->header_size or the
> mbuf priv size.
> 
> 2. net/af_xdp: use correct fill queue addresses
> The fill queue addresses should start at the beginning of the mempool
> object instead of the beginning of the mbuf. This is because the umem frame
> headroom includes the mp hdrobj size. Starting at this point ensures AF_XDP
> doesn't write past the available room in the frame, in the case of larger
> packets which are close to the size of the mbuf.
> 
> 3. net/af_xdp: fix maximum MTU value
> The maximum MTU for af_xdp zero copy is equal to the page size less the
> frame overhead introduced by AF_XDP (XDP HR = 256) and DPDK (frame hr = 
> 320). The patch updates this value to reflect this, and removes some
> unneeded constants for both zero-copy and copy mode.
> 
> v4:
> * Deduct XDP_PACKET_HEADROOM from max mtu for copy mode.
> 
> v3:
> * Fix send-email issue - use in-reply-to
> 
> v2:
> * Include mbuf priv size in rx mbuf data_off calculation
> 
> Ciara Loftus (3):
>   net/af_xdp: fix umem frame size & headroom calculations
>   net/af_xdp: use correct fill queue addresses
>   net/af_xdp: fix maximum MTU value
> 

Series applied to dpdk-next-net/master, thanks.

      parent reply	other threads:[~2020-02-13 12:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  8:49 Ciara Loftus
2020-02-13  8:49 ` [dpdk-dev] [PATCH v4 1/3] net/af_xdp: fix umem frame size & headroom calculations Ciara Loftus
2020-02-13  8:49 ` [dpdk-dev] [PATCH v4 2/3] net/af_xdp: use correct fill queue addresses Ciara Loftus
2020-02-13  8:49 ` [dpdk-dev] [PATCH v4 3/3] net/af_xdp: fix maximum MTU value Ciara Loftus
2020-02-13  9:26   ` Ye Xiaolong
2020-02-13 12:18 ` Ferruh Yigit [this message]

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=8d97f8df-2efc-1707-1066-49d76763115f@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=xiaolong.ye@intel.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).