DPDK patches and discussions
 help / color / mirror / Atom feed
From: Conor Walsh <conor.walsh@intel.com>
To: Kevin Laatz <kevin.laatz@intel.com>, <dev@dpdk.org>
Cc: <bruce.richardson@intel.com>, <fengchengwen@huawei.com>,
	"Konstantin Ananyev" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/6] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue
Date: Mon, 20 Sep 2021 12:24:34 +0100	[thread overview]
Message-ID: <8eefc44f-f7b9-d9aa-7f25-c588c8ddf3a3@intel.com> (raw)
In-Reply-To: <20210917164136.3499904-2-kevin.laatz@intel.com>


> From: Konstantin Ananyev <konstantin.ananyev@intel.com>
>
> Few changes in ioat sample behaviour:
> - Always do SW copy for packet metadata (mbuf fields)
> - Always use same lcore for both DMA requests enqueue and dequeue
>
> Main reasons for that:
> a) it is safer, as idxd PMD doesn't support MT safe enqueue/dequeue (yet).
> b) sort of more apples to apples comparison with sw copy.
> c) from my testing things are faster that way.
>
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> ---
>   examples/ioat/ioatfwd.c | 185 ++++++++++++++++++++++------------------
>   1 file changed, 101 insertions(+), 84 deletions(-)
>
> diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
> index b3977a8be5..1498343492 100644
> --- a/examples/ioat/ioatfwd.c
> +++ b/examples/ioat/ioatfwd.c
> @@ -331,43 +331,36 @@ update_mac_addrs(struct rte_mbuf *m, uint32_t dest_portid)
>   
>   /* Perform packet copy there is a user-defined function. 8< */
>   static inline void
> -pktmbuf_sw_copy(struct rte_mbuf *src, struct rte_mbuf *dst)
> +pktmbuf_metadata_copy(const struct rte_mbuf *src, struct rte_mbuf *dst)
>   {
> -	/* Copy packet metadata */
> -	rte_memcpy(&dst->rearm_data,
> -		&src->rearm_data,
> -		offsetof(struct rte_mbuf, cacheline1)
> -		- offsetof(struct rte_mbuf, rearm_data));
> +	dst->data_off = src->data_off;
> +	memcpy(&dst->rx_descriptor_fields1, &src->rx_descriptor_fields1,
> +		offsetof(struct rte_mbuf, buf_len) -
> +		offsetof(struct rte_mbuf, rx_descriptor_fields1));
> +}
>   
> -	/* Copy packet data */
> +/* Copy packet data */
> +static inline void
> +pktmbuf_sw_copy(struct rte_mbuf *src, struct rte_mbuf *dst)
> +{
>   	rte_memcpy(rte_pktmbuf_mtod(dst, char *),
>   		rte_pktmbuf_mtod(src, char *), src->data_len);
>   }
>   /* >8 End of perform packet copy there is a user-defined function. */

Might need to redo these snippet markers as the function is now split in 
two.

<snip>

> +static inline uint32_t
> +ioat_dequeue(struct rte_mbuf *src[], struct rte_mbuf *dst[], uint32_t num,
> +	uint16_t dev_id)
> +{
> +	int32_t rc;

rc should be uint32_t, but this is removed in patch 4 of this set during 
the change from raw to dma so it shouldn't really matter.

> +	/* Dequeue the mbufs from IOAT device. Since all memory
> +	 * is DPDK pinned memory and therefore all addresses should
> +	 * be valid, we don't check for copy errors
> +	 */
> +	rc = rte_ioat_completed_ops(dev_id, num, NULL, NULL,
> +		(void *)src, (void *)dst);
> +	if (rc < 0) {
> +		RTE_LOG(CRIT, IOAT,
> +			"rte_ioat_completed_ops(%hu) failedi, error: %d\n",
> +			dev_id, rte_errno);
> +		rc = 0;
> +	}
> +	return rc;
> +}

Reviewed-by: Conor Walsh <conor.walsh@intel.com>


  reply	other threads:[~2021-09-20 11:24 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 17:27 [dpdk-dev] [PATCH 0/6] port ioatfwd app to dmadev Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 1/6] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 2/6] examples/ioat: add cmd-line option to control DMA batch size Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 3/6] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 4/6] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 5/6] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 6/6] examples/ioat: rename application to dmafwd Kevin Laatz
2021-09-17 16:41 ` [dpdk-dev] [PATCH v2 0/6] port ioatfwd app to dmadev Kevin Laatz
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 1/6] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-09-20 11:24     ` Conor Walsh [this message]
2021-09-23 15:33       ` Kevin Laatz
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 2/6] examples/ioat: add cmd-line option to control DMA batch size Kevin Laatz
2021-09-20 11:24     ` Conor Walsh
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 3/6] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-09-20 11:24     ` Conor Walsh
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 4/6] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-09-20 11:25     ` Conor Walsh
2021-09-24  4:00     ` fengchengwen
2021-09-24  8:40       ` Kevin Laatz
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 5/6] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-09-20 11:25     ` Conor Walsh
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 6/6] examples/ioat: rename application to dmafwd Kevin Laatz
2021-09-20 11:25     ` Conor Walsh
2021-09-23 13:53   ` [dpdk-dev] [PATCH v2 0/6] port ioatfwd app to dmadev fengchengwen
2021-09-23 14:00     ` Kevin Laatz
2021-09-28 16:29 ` [dpdk-dev] [PATCH v3 0/8] " Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 1/8] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 2/8] examples/ioat: add cmd line option to control DMA batch size Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 3/8] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 4/8] examples/ioat: add cmd line option to control stats print interval Kevin Laatz
2021-09-29 10:32     ` Conor Walsh
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 5/8] examples/ioat: add signal-triggered device dumps Kevin Laatz
2021-09-29 10:33     ` Conor Walsh
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 6/8] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 7/8] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 8/8] examples/ioat: rename application to dmafwd Kevin Laatz
2021-10-14  9:53 ` [dpdk-dev] [PATCH v4 0/8] port ioatfwd app to dmadev Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 1/8] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 2/8] examples/ioat: add cmd line option to control DMA batch size Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 3/8] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 4/8] examples/ioat: add cmd line option to control stats print interval Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 5/8] examples/ioat: add signal-triggered device dumps Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 6/8] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 7/8] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 8/8] examples/ioat: rename application to dmafwd Kevin Laatz
2021-10-22 19:48   ` [dpdk-dev] [PATCH v4 0/8] port ioatfwd app to dmadev Thomas Monjalon
2021-10-25 19:59     ` Kevin Laatz
2021-10-26  0:56   ` fengchengwen
2021-10-26 11:46     ` Kevin Laatz
2021-10-26 13:14 ` [dpdk-dev] [PATCH v5 " Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 1/8] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 2/8] examples/ioat: add cmd line option to control DMA batch size Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 3/8] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 4/8] examples/ioat: add cmd line option to control stats print interval Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 5/8] examples/ioat: add signal-triggered device dumps Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 6/8] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 7/8] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 8/8] examples/ioat: rename application to dmafwd Kevin Laatz
2021-10-27 13:23   ` [dpdk-dev] [PATCH v5 0/8] port ioatfwd app to dmadev Thomas Monjalon
2021-10-27 13:35     ` Kevin Laatz
2021-10-27 14:07       ` Thomas Monjalon
2021-10-27 14:14         ` Kevin Laatz
2021-10-27 14:54   ` Thomas Monjalon

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=8eefc44f-f7b9-d9aa-7f25-c588c8ddf3a3@intel.com \
    --to=conor.walsh@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=kevin.laatz@intel.com \
    --cc=konstantin.ananyev@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).