[v7,23/23] event/dlb: add timeout ticks entry point
diff mbox series

Message ID 1603983474-16354-24-git-send-email-timothy.mcdaniel@intel.com
State Superseded, archived
Delegated to: Jerin Jacob
Headers show
Series
  • Add DLB PMD
Related show

Checks

Context Check Description
ci/travis-robot warning Travis build: failed
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Timothy McDaniel Oct. 29, 2020, 2:57 p.m. UTC
Adds the timeout ticks conversion function.

Adds announcement of availabililty of the new driver
for Intel Dynamic Load Balancer 1.0 hardware.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
---
 doc/guides/rel_notes/release_20_11.rst |  5 +++++
 drivers/event/dlb/dlb.c                | 13 +++++++++++++
 2 files changed, 18 insertions(+)

Comments

Thomas Monjalon Oct. 29, 2020, 4:22 p.m. UTC | #1
29/10/2020 15:57, Timothy McDaniel:
> Adds the timeout ticks conversion function.
> 
> Adds announcement of availabililty of the new driver
> for Intel Dynamic Load Balancer 1.0 hardware.

I don't see how these 2 changes are related?

Shouldn't you update the release notes in the first patch?

Patch
diff mbox series

diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index d8ac359..0a95bf0 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -55,6 +55,11 @@  New Features
      Also, make sure to start the actual text at the margin.
      =======================================================
 
+* **Added a new driver for the Intel Dynamic Load Balancer v1.0 device.**
+
+  Added the new ``dlb`` eventdev driver for the Intel DLB V1.0 device. See the
+  :doc:`../eventdevs/dlb` eventdev guide for more details on this new driver.
+
 * **Added write combining store APIs.**
 
   Added ``rte_write32_wc`` and ``rte_write32_wc_relaxed`` APIs
diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c
index aa22d03..b21c9b1 100644
--- a/drivers/event/dlb/dlb.c
+++ b/drivers/event/dlb/dlb.c
@@ -3879,6 +3879,18 @@  dlb_eventdev_queue_release(struct rte_eventdev *dev, uint8_t id)
 	/* This function intentionally left blank. */
 }
 
+static int
+dlb_eventdev_timeout_ticks(struct rte_eventdev *dev, uint64_t ns,
+			   uint64_t *timeout_ticks)
+{
+	RTE_SET_USED(dev);
+	uint64_t cycles_per_ns = rte_get_timer_hz() / 1E9;
+
+	*timeout_ticks = ns * cycles_per_ns;
+
+	return 0;
+}
+
 void
 dlb_entry_points_init(struct rte_eventdev *dev)
 {
@@ -3900,6 +3912,7 @@  dlb_entry_points_init(struct rte_eventdev *dev)
 		.port_unlink      = dlb_eventdev_port_unlink,
 		.port_unlinks_in_progress =
 				    dlb_eventdev_port_unlinks_in_progress,
+		.timeout_ticks    = dlb_eventdev_timeout_ticks,
 		.dump             = dlb_eventdev_dump,
 		.xstats_get       = dlb_eventdev_xstats_get,
 		.xstats_get_names = dlb_eventdev_xstats_get_names,