DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/octeontx: add channel to port id mapping
@ 2017-11-28 14:58 Pavan Nikhilesh
  2017-11-28 14:58 ` [dpdk-dev] [PATCH 2/2] event/octeontx: fix Rx adapter " Pavan Nikhilesh
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Pavan Nikhilesh @ 2017-11-28 14:58 UTC (permalink / raw)
  To: santosh.shukla, ferruh.yigit; +Cc: dev, Pavan Nikhilesh

The channel to port id map is used by event octeontx to map the received
wqe to the respective ethdev port.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 3 +++
 drivers/net/octeontx/octeontx_ethdev.h | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index bd24ec330..8e251786b 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1133,6 +1133,9 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 				nic->num_tx_queues);
 	PMD_INIT_LOG(DEBUG, "speed %d mtu %d", nic->speed, nic->mtu);
 
+	octeontx_pchan_map[(nic->base_ochan >> 8) & 0x7]
+		[(nic->base_ochan >> 4) & 0xF] = data->port_id;
+
 	return data->port_id;
 
 err:
diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h
index c47d4c6d3..0cff13611 100644
--- a/drivers/net/octeontx/octeontx_ethdev.h
+++ b/drivers/net/octeontx/octeontx_ethdev.h
@@ -52,12 +52,18 @@
 #define OCTEONTX_VDEV_NR_PORT_ARG		("nr_port")
 #define OCTEONTX_MAX_NAME_LEN			32
 
+#define OCTEONTX_MAX_BGX_PORTS			4
+#define OCTEONTX_MAX_LMAC_PER_BGX		4
+
 static inline struct octeontx_nic *
 octeontx_pmd_priv(struct rte_eth_dev *dev)
 {
 	return dev->data->dev_private;
 }
 
+uint16_t __rte_cache_aligned
+octeontx_pchan_map[OCTEONTX_MAX_BGX_PORTS][OCTEONTX_MAX_LMAC_PER_BGX];
+
 /* Octeontx ethdev nic */
 struct octeontx_nic {
 	struct rte_eth_dev *dev;
-- 
2.14.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-01-10  7:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-28 14:58 [dpdk-dev] [PATCH 1/2] net/octeontx: add channel to port id mapping 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   ` [dpdk-dev] [PATCH v2 2/2] event/octeontx: fix Rx adapter " Pavan Nikhilesh
2017-12-18  9:43     ` 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

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).