DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anoob Joseph <anoobj@marvell.com>
To: Suanming Mou <suanmingm@nvidia.com>
Cc: Akhil Goyal <gakhil@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"Doherty, Declan" <declan.doherty@intel.com>
Subject: RE: min_mbuf_head/tailroom_req in rte_cryptodev_info
Date: Tue, 9 May 2023 12:13:22 +0000	[thread overview]
Message-ID: <PH0PR18MB467260AA46075FE64E192B03DF769@PH0PR18MB4672.namprd18.prod.outlook.com> (raw)
In-Reply-To: <CO6PR12MB5396CD6451AA872B2266BD87C1769@CO6PR12MB5396.namprd12.prod.outlook.com>

Hi Suanming,

Please see inline.

Thanks,
Anoob

> From: Suanming Mou <suanmingm@nvidia.com> 
> Sent: Tuesday, May 9, 2023 5:23 PM
> To: Anoob Joseph <anoobj@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
> Cc: Akhil Goyal <gakhil@marvell.com>; dev@dpdk.org
> Subject: [EXT] min_mbuf_head/tailroom_req in rte_cryptodev_info 
>
> External Email 
> ________________________________________
> Hi Guys,
>
> Sorry for disturbing you. I have one small question regarding the min_mbuf_head/tailroom_req in rte_cryptodev_info.
> I saw you were the people who discussed, reviewed and added that two fields.
> IIUC, the two fields provided a hint to the PMD that HW can use(modify) the headroom and tailroom space to improve the performance.
[Anoob] That's right.

> But regarding the space(e.g. headroom) user reserved, should the data offset(sym_op->aead.data.offset) in struct rte_crypto_op also be taken into account?
> e.g. if the mbuf in the operation is something like below:
> |---headroom--|----op offset---|---payload to process---|---tailroom---|

[Anoob] Above layout is correct. Headroom that can be used by cryptodev is the headroom of the mbuf.

> In that case, what is the headroom mean to HW? Start from real mbuf headroom before op offset or the offset before payload?

[Anoob] May be let me explain how we use it in CNXK PMDs. We have to pass fields such as IV & offsets to the hardware for performing crypto operation. To maximize performance, we pass it as single buffer and hence the requirement on this headroom.

In our enqueue path, we use headroom for storing some of these transient data.
                             
|---headroom--|-------------- packet_len ---------------------|---tailroom---|
|---headroom--|----op offset---|---payload to process---|---tailroom---|
               |--------|   <---- Space used by cryptodev for internal purpose
                            ^ = rte_pktmbuf_mtod(mbuf, void *);

All offsets mentioned in rte_crypto_op would be calculated from the packet start [rte_pktmbuf_mtod()]. In other words, the packet data from the start of the packet till offset would be untouched by the cryptodev in all circumstances. It is the space that is before start of the packet(ie headroom of mbuf) which would be used for this purpose.

Hope it is clear now.

  reply	other threads:[~2023-05-09 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 11:53 Suanming Mou
2023-05-09 12:13 ` Anoob Joseph [this message]
2023-05-09 13:01   ` Suanming Mou

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=PH0PR18MB467260AA46075FE64E192B03DF769@PH0PR18MB4672.namprd18.prod.outlook.com \
    --to=anoobj@marvell.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=suanmingm@nvidia.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).