DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, jerinj@marvell.com, timothy.mcdaniel@intel.com
Subject: [dpdk-dev] [PATCH v3 3/4] event/dlb2: fix extraction of HW scheduling type
Date: Fri, 21 May 2021 11:11:36 +0200	[thread overview]
Message-ID: <20210521091137.21221-4-david.marchand@redhat.com> (raw)
In-Reply-To: <20210521091137.21221-1-david.marchand@redhat.com>

From: Timothy McDaniel <timothy.mcdaniel@intel.com>

The HW scheduling type was not being extracted properly
in the vector optimizaed dequeue path. It was also not
being recorded in the xstats.

Fixes: 000a7b8e7582 ("event/dlb2: optimize dequeue operation")

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb2/dlb2.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 5696f568cd..2a3e4ddb47 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -3561,6 +3561,11 @@ _process_deq_qes_vec_impl(struct dlb2_port *qm_port,
 	int ev_qid2 = qm_port->qid_mappings[hw_qid2];
 	int ev_qid3 = qm_port->qid_mappings[hw_qid3];
 
+	int hw_sched0 = _mm_extract_epi8(v_qe_meta, 3) & 3ul;
+	int hw_sched1 = _mm_extract_epi8(v_qe_meta, 7) & 3ul;
+	int hw_sched2 = _mm_extract_epi8(v_qe_meta, 11) & 3ul;
+	int hw_sched3 = _mm_extract_epi8(v_qe_meta, 15) & 3ul;
+
 	v_qid_done = _mm_insert_epi8(v_qid_done, ev_qid0, 2);
 	v_qid_done = _mm_insert_epi8(v_qid_done, ev_qid1, 6);
 	v_qid_done = _mm_insert_epi8(v_qid_done, ev_qid2, 10);
@@ -3682,19 +3687,27 @@ _process_deq_qes_vec_impl(struct dlb2_port *qm_port,
 		v_ev_3 = _mm_blend_epi16(v_unpk_ev_23, v_qe_3, 0x0F);
 		v_ev_3 = _mm_alignr_epi8(v_ev_3, v_ev_3, 8);
 		_mm_storeu_si128((__m128i *)&events[3], v_ev_3);
+		DLB2_INC_STAT(qm_port->ev_port->stats.rx_sched_cnt[hw_sched3],
+			      1);
 		/* fallthrough */
 	case 3:
 		v_ev_2 = _mm_unpacklo_epi64(v_unpk_ev_23, v_qe_2);
 		_mm_storeu_si128((__m128i *)&events[2], v_ev_2);
+		DLB2_INC_STAT(qm_port->ev_port->stats.rx_sched_cnt[hw_sched2],
+			      1);
 		/* fallthrough */
 	case 2:
 		v_ev_1 = _mm_blend_epi16(v_unpk_ev_01, v_qe_1, 0x0F);
 		v_ev_1 = _mm_alignr_epi8(v_ev_1, v_ev_1, 8);
 		_mm_storeu_si128((__m128i *)&events[1], v_ev_1);
+		DLB2_INC_STAT(qm_port->ev_port->stats.rx_sched_cnt[hw_sched1],
+			      1);
 		/* fallthrough */
 	case 1:
 		v_ev_0 = _mm_unpacklo_epi64(v_unpk_ev_01, v_qe_0);
 		_mm_storeu_si128((__m128i *)&events[0], v_ev_0);
+		DLB2_INC_STAT(qm_port->ev_port->stats.rx_sched_cnt[hw_sched0],
+			      1);
 	}
 }
 
-- 
2.23.0


  parent reply	other threads:[~2021-05-21  9:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  9:11 [dpdk-dev] [PATCH v3 0/4] DLB2 fixes for 21.05 David Marchand
2021-05-21  9:11 ` [dpdk-dev] [PATCH v3 1/4] event/dlb2: remove references to deferred scheduling David Marchand
2021-05-21  9:11 ` [dpdk-dev] [PATCH v3 2/4] doc: fix runtime options in DLB2 guide David Marchand
2021-05-21  9:11 ` David Marchand [this message]
2021-05-21  9:11 ` [dpdk-dev] [PATCH v3 4/4] event/dlb2: select scalar dequeue by default David Marchand
2021-05-21 10:26 ` [dpdk-dev] [PATCH v3 0/4] DLB2 fixes for 21.05 Ferruh Yigit
2021-05-21 13:46   ` 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=20210521091137.21221-4-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=timothy.mcdaniel@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).