From: Stephen Hemminger <stephen@networkplumber.org>
To: vanshika.shukla@nxp.com
Cc: dev@dpdk.org, Hemant Agrawal <hemant.agrawal@nxp.com>,
Sachin Saxena <sachin.saxena@nxp.com>,
Jun Yang <jun.yang@nxp.com>
Subject: Re: [v4 04/10] bus/dpaa: optimize bman acquire/release
Date: Sun, 29 Jun 2025 09:35:47 -0700 [thread overview]
Message-ID: <20250629093547.48b3b23c@hermes.local> (raw)
In-Reply-To: <20250611071039.2939950-5-vanshika.shukla@nxp.com>
On Wed, 11 Jun 2025 12:40:33 +0530
vanshika.shukla@nxp.com wrote:
> -#define BMAN_BUF_MASK 0x0000fffffffffffful
> +RTE_EXPORT_INTERNAL_SYMBOL(bman_release_fast)
> +int
> +bman_release_fast(struct bman_pool *pool, const uint64_t *bufs,
> + uint8_t num)
> +{
> + struct bman_portal *p;
> + struct bm_rcr_entry *r;
> + uint8_t i, avail;
> + uint64_t bpid = pool->params.bpid;
> + struct bm_hw_buf_desc bm_bufs[FSL_BM_BURST_MAX];
> +
> +#ifdef RTE_LIBRTE_DPAA_HWDEBUG
> + if (!num || (num > FSL_BM_BURST_MAX))
> + return -EINVAL;
> + if (pool->params.flags & BMAN_POOL_FLAG_NO_RELEASE)
> + return -EINVAL;
> +#endif
> +
> + p = get_affine_portal();
> + avail = bm_rcr_get_avail(&p->p);
> + if (avail < 2)
> + update_rcr_ci(p, avail);
> + r = bm_rcr_start(&p->p);
> + if (unlikely(!r))
> + return -EBUSY;
> +
> + /*
> + * we can copy all but the first entry, as this can trigger badness
> + * with the valid-bit
> + */
> + bm_bufs[0].bpid = bpid;
> + bm_bufs[0].hi_addr = cpu_to_be16(HI16_OF_U48(bufs[0]));
> + bm_bufs[0].lo_addr = cpu_to_be32(LO32_OF_U48(bufs[0]));
> + for (i = 1; i < num; i++) {
> + bm_bufs[i].hi_addr = cpu_to_be16(HI16_OF_U48(bufs[i]));
> + bm_bufs[i].lo_addr = cpu_to_be32(LO32_OF_U48(bufs[i]));
> + }
> +
> + rte_memcpy(r->bufs, bm_bufs, sizeof(struct bm_buffer) * num);
Use memcpy instead. There are more compiler and security checks around
memcpy().
> +
> + bm_rcr_pvb_commit(&p->p, BM_RCR_VERB_CMD_BPID_SINGLE |
> + (num & BM_RCR_VERB_BUFCOUNT_MASK));
> +
> + return 0;
> +}
next prev parent reply other threads:[~2025-06-29 16:45 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 10:39 [v1 00/10] DPAA specific fixes vanshika.shukla
2025-05-28 10:39 ` [v1 01/10] bus/dpaa: avoid using same structure and variable name vanshika.shukla
2025-05-28 10:39 ` [v1 02/10] bus/dpaa: add FMan node vanshika.shukla
2025-05-28 10:39 ` [v1 03/10] bus/dpaa: enhance DPAA SoC version vanshika.shukla
2025-05-28 14:28 ` Stephen Hemminger
2025-05-28 10:39 ` [v1 04/10] bus/dpaa: optimize bman acquire/release vanshika.shukla
2025-05-28 14:30 ` Stephen Hemminger
2025-05-28 14:50 ` [EXT] " Jun Yang
2025-05-28 10:39 ` [v1 05/10] mempool/dpaa: fast acquire and release vanshika.shukla
2025-05-28 10:39 ` [v1 06/10] mempool/dpaa: adjust pool element for LS1043A errata vanshika.shukla
2025-05-28 10:39 ` [v1 07/10] net/dpaa: add Tx rate limiting DPAA PMD API vanshika.shukla
2025-06-03 6:06 ` Varghese, Vipin
2025-05-28 10:39 ` [v1 08/10] net/dpaa: add devargs for enabling err packets on main queue vanshika.shukla
2025-05-28 10:39 ` [v1 09/10] bus/dpaa: improve DPAA cleanup vanshika.shukla
2025-05-28 10:39 ` [v1 10/10] bus/dpaa: optimize qman enqueue check vanshika.shukla
2025-06-02 13:15 ` [v2 00/10] DPAA specific fixes vanshika.shukla
2025-06-02 13:15 ` [v2 01/10] bus/dpaa: avoid using same structure and variable name vanshika.shukla
2025-06-02 13:15 ` [v2 02/10] bus/dpaa: add FMan node vanshika.shukla
2025-06-02 13:15 ` [v2 03/10] bus/dpaa: enhance DPAA SoC version vanshika.shukla
2025-06-02 13:15 ` [v2 04/10] bus/dpaa: optimize bman acquire/release vanshika.shukla
2025-06-02 13:15 ` [v2 05/10] mempool/dpaa: fast acquire and release vanshika.shukla
2025-06-02 13:15 ` [v2 06/10] mempool/dpaa: adjust pool element for LS1043A errata vanshika.shukla
2025-06-02 13:15 ` [v2 07/10] net/dpaa: add Tx rate limiting DPAA PMD API vanshika.shukla
2025-06-02 13:15 ` [v2 08/10] net/dpaa: add devargs for enabling err packets on main queue vanshika.shukla
2025-06-02 13:15 ` [v2 09/10] bus/dpaa: improve DPAA cleanup vanshika.shukla
2025-06-02 13:15 ` [v2 10/10] bus/dpaa: optimize qman enqueue check vanshika.shukla
2025-06-04 2:51 ` Stephen Hemminger
2025-06-10 9:14 ` [v3 00/10] DPAA specific fixes vanshika.shukla
2025-06-10 9:14 ` [v3 01/10] bus/dpaa: avoid using same structure and variable name vanshika.shukla
2025-06-10 9:14 ` [v3 02/10] bus/dpaa: add FMan node vanshika.shukla
2025-06-10 9:14 ` [v3 03/10] bus/dpaa: enhance DPAA SoC version vanshika.shukla
2025-06-10 9:14 ` [v3 04/10] bus/dpaa: optimize bman acquire/release vanshika.shukla
2025-06-10 9:14 ` [v3 05/10] mempool/dpaa: fast acquire and release vanshika.shukla
2025-06-10 9:14 ` [v3 06/10] mempool/dpaa: adjust pool element for LS1043A errata vanshika.shukla
2025-06-10 9:14 ` [v3 07/10] net/dpaa: add Tx rate limiting DPAA PMD API vanshika.shukla
2025-06-10 9:14 ` [v3 08/10] net/dpaa: add devargs for enabling err packets on main queue vanshika.shukla
2025-06-10 9:14 ` [v3 09/10] bus/dpaa: improve DPAA cleanup vanshika.shukla
2025-06-10 9:14 ` [v3 10/10] bus/dpaa: optimize qman enqueue check vanshika.shukla
2025-06-11 7:10 ` [v4 00/10] DPAA specific fixes vanshika.shukla
2025-06-11 7:10 ` [v4 01/10] bus/dpaa: avoid using same structure and variable name vanshika.shukla
2025-06-29 16:30 ` Stephen Hemminger
2025-06-11 7:10 ` [v4 02/10] bus/dpaa: add FMan node vanshika.shukla
2025-06-11 16:50 ` Stephen Hemminger
2025-06-19 5:44 ` [EXT] " Vanshika Shukla
2025-06-29 16:32 ` Stephen Hemminger
2025-06-11 7:10 ` [v4 03/10] bus/dpaa: enhance DPAA SoC version vanshika.shukla
2025-06-11 7:10 ` [v4 04/10] bus/dpaa: optimize bman acquire/release vanshika.shukla
2025-06-29 16:34 ` Stephen Hemminger
2025-06-29 16:35 ` Stephen Hemminger [this message]
2025-06-11 7:10 ` [v4 05/10] mempool/dpaa: fast acquire and release vanshika.shukla
2025-06-11 7:10 ` [v4 06/10] mempool/dpaa: adjust pool element for LS1043A errata vanshika.shukla
2025-06-29 16:37 ` Stephen Hemminger
2025-06-11 7:10 ` [v4 07/10] net/dpaa: add Tx rate limiting DPAA PMD API vanshika.shukla
2025-06-29 16:42 ` Stephen Hemminger
2025-06-11 7:10 ` [v4 08/10] net/dpaa: add devargs for enabling err packets on main queue vanshika.shukla
2025-06-29 16:43 ` Stephen Hemminger
2025-06-11 7:10 ` [v4 09/10] bus/dpaa: improve DPAA cleanup vanshika.shukla
2025-06-11 7:10 ` [v4 10/10] bus/dpaa: optimize qman enqueue check vanshika.shukla
2025-06-11 16:15 ` Stephen Hemminger
2025-06-11 20:04 ` Patrick Robb
2025-06-19 5:43 ` [v4 00/10] DPAA specific fixes Hemant Agrawal
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=20250629093547.48b3b23c@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=jun.yang@nxp.com \
--cc=sachin.saxena@nxp.com \
--cc=vanshika.shukla@nxp.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).