DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: ferruh.yigit@intel.com, santosh.shukla@cavium.com
Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH v2 2/2] event/octeontx: fix Rx adapter port id mapping
Date: Sat,  9 Dec 2017 18:25:10 +0530	[thread overview]
Message-ID: <20171209125510.20592-2-pbhagavatula@caviumnetworks.com> (raw)
In-Reply-To: <20171209125510.20592-1-pbhagavatula@caviumnetworks.com>

When octeontx event dev receives a packet for the event Rx adapter, the
mbuf port id should contain the appropriate ethdev id instead of
internal channel info.

Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 drivers/event/octeontx/Makefile       | 2 +-
 drivers/event/octeontx/ssovf_worker.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
index fdf1b7385..260441281 100644
--- a/drivers/event/octeontx/Makefile
+++ b/drivers/event/octeontx/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
 CFLAGS += -I$(RTE_SDK)/drivers/net/octeontx/
 
-LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx
+LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx -lrte_pmd_octeontx
 LDLIBS += -lrte_bus_pci
 LDLIBS += -lrte_bus_vdev
 
diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h
index bf76ac880..b382232b0 100644
--- a/drivers/event/octeontx/ssovf_worker.h
+++ b/drivers/event/octeontx/ssovf_worker.h
@@ -53,7 +53,7 @@ enum {
 /* SSO Operations */
 
 static __rte_always_inline struct rte_mbuf *
-ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
+ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_info)
 {
 	struct rte_mbuf *mbuf;
 	octtx_wqe_t *wqe = (octtx_wqe_t *)(uintptr_t)work;
@@ -69,7 +69,7 @@ ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
 	mbuf->data_len = mbuf->pkt_len;
 	mbuf->nb_segs = 1;
 	mbuf->ol_flags = 0;
-	mbuf->port = port_id;
+	mbuf->port = octeontx_pchan_map[port_info >> 4][port_info & 0xF];
 	rte_mbuf_refcnt_set(mbuf, 1);
 	return mbuf;
 }
@@ -89,7 +89,7 @@ ssows_get_work(struct ssows *ws, struct rte_event *ev)
 	ev->event = sched_type_queue | (get_work0 & 0xffffffff);
 	if (get_work1 && ev->event_type == RTE_EVENT_TYPE_ETHDEV) {
 		ev->mbuf = ssovf_octeontx_wqe_to_pkt(get_work1,
-				(ev->event >> 20) & 0xF);
+				(ev->event >> 20) & 0x7F);
 	} else {
 		ev->u64 = get_work1;
 	}
-- 
2.14.1

  reply	other threads:[~2017-12-09 12:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 14:58 [dpdk-dev] [PATCH 1/2] net/octeontx: add channel to " Pavan Nikhilesh
2017-11-28 14:58 ` [dpdk-dev] [PATCH 2/2] event/octeontx: fix Rx adapter " Pavan Nikhilesh
2017-12-08  0:41 ` [dpdk-dev] [PATCH 1/2] net/octeontx: add channel to " Ferruh Yigit
2017-12-08 11:08   ` Pavan Nikhilesh Bhagavatula
2017-12-08 17:39     ` Ferruh Yigit
2017-12-09  9:25       ` Pavan Nikhilesh Bhagavatula
2017-12-09 12:55 ` [dpdk-dev] [PATCH v2 " Pavan Nikhilesh
2017-12-09 12:55   ` Pavan Nikhilesh [this message]
2017-12-18  9:43     ` [dpdk-dev] [PATCH v2 2/2] event/octeontx: fix Rx adapter " santosh
2017-12-18  9:41   ` [dpdk-dev] [PATCH v2 1/2] net/octeontx: add channel to " santosh
2017-12-18 21:52     ` Pavan Nikhilesh
2017-12-19 18:01 ` [dpdk-dev] [PATCH v3 " Pavan Nikhilesh
2017-12-19 18:01   ` [dpdk-dev] [PATCH v3 2/2] event/octeontx: fix Rx adapter " Pavan Nikhilesh
2018-01-09 12:47   ` [dpdk-dev] [PATCH v3 1/2] net/octeontx: add channel to " Ferruh Yigit
2018-01-09 12:49     ` Ferruh Yigit
2018-01-10  7:59       ` Pavan Nikhilesh

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=20171209125510.20592-2-pbhagavatula@caviumnetworks.com \
    --to=pbhagavatula@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=santosh.shukla@cavium.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).