Add function to retrieve event timer adapter capabilities.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
.port_unlink = otx2_sso_port_unlink,
.timeout_ticks = otx2_sso_timeout_ticks,
+ .timer_adapter_caps_get = otx2_tim_caps_get,
+
.xstats_get = otx2_sso_xstats_get,
.xstats_reset = otx2_sso_xstats_reset,
.xstats_get_names = otx2_sso_xstats_get_names,
#include "otx2_evdev.h"
#include "otx2_tim_evdev.h"
+int
+otx2_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,
+ uint32_t *caps,
+ const struct rte_event_timer_adapter_ops **ops)
+{
+ struct otx2_tim_evdev *dev = tim_priv_get();
+
+ RTE_SET_USED(flags);
+ RTE_SET_USED(ops);
+ if (dev == NULL)
+ return -ENODEV;
+
+ /* Store evdev pointer for later use. */
+ dev->event_dev = (struct rte_eventdev *)(uintptr_t)evdev;
+ *caps = RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT;
+
+ return 0;
+}
+
void
otx2_tim_init(struct rte_pci_device *pci_dev, struct otx2_dev *cmn_dev)
{
struct otx2_tim_evdev {
struct rte_pci_device *pci_dev;
+ struct rte_eventdev *event_dev;
struct otx2_mbox *mbox;
uint16_t nb_rings;
uintptr_t bar2;
return mz->addr;
}
+int otx2_tim_caps_get(const struct rte_eventdev *dev, uint64_t flags,
+ uint32_t *caps,
+ const struct rte_event_timer_adapter_ops **ops);
+
void otx2_tim_init(struct rte_pci_device *pci_dev, struct otx2_dev *cmn_dev);
void otx2_tim_fini(void);