DPDK patches and discussions
 help / color / mirror / Atom feed
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
Cc: dev@dpdk.org, erik.g.carrillo@intel.com,
	harry.van.haaren@intel.com, jerinj@marvell.com,
	thomas@monjalon.net, david.marchand@redhat.com,
	timothy.mcdaniel@intel.com
Subject: [dpdk-dev] [PATCH] event/dlb2: fix extraction of HW scheduling type
Date: Thu, 20 May 2021 11:11:43 -0500	[thread overview]
Message-ID: <1621527103-5051-1-git-send-email-timothy.mcdaniel@intel.com> (raw)
In-Reply-To: <1620843888-882873-1-git-send-email-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>

---
Cc: 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 3570678b9..588c41ee7 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-20 16:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12 18:24 [dpdk-dev] [PATCH 1/1] event/dlb2: fix vector based dequeue McDaniel, Timothy
2021-05-18 15:01 ` Jerin Jacob
2021-05-19  9:44   ` Thomas Monjalon
2021-05-19 15:23     ` McDaniel, Timothy
2021-05-20 16:11 ` Timothy McDaniel [this message]
2021-05-20 16:12 ` [dpdk-dev] [PATCH] event/dlb2: make scalar mode dequeue the default Timothy McDaniel
2021-05-20 16:13 ` [dpdk-dev] [PATCH] event/dlb2: remove references to deferred scheduling Timothy McDaniel
2021-05-20 18:08 ` [dpdk-dev] [PATCH v2] event/dlb2: make scalar mode dequeue the default Timothy McDaniel

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=1621527103-5051-1-git-send-email-timothy.mcdaniel@intel.com \
    --to=timothy.mcdaniel@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=jerinj@marvell.com \
    --cc=thomas@monjalon.net \
    /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).