MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ssovf_vdev_probe

Function ssovf_vdev_probe

dpdk/drivers/event/octeontx/ssovf_evdev.c:846–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

844};
845
846static int
847ssovf_vdev_probe(struct rte_vdev_device *vdev)
848{
849 struct ssovf_info oinfo;
850 struct ssovf_mbox_dev_info info;
851 struct ssovf_evdev *edev;
852 struct rte_eventdev *eventdev;
853 static int ssovf_init_once;
854 const char *name;
855 const char *params;
856 int ret;
857
858 static const char *const args[] = {
859 TIMVF_ENABLE_STATS_ARG,
860 NULL
861 };
862
863 name = rte_vdev_device_name(vdev);
864 /* More than one instance is not supported */
865 if (ssovf_init_once) {
866 ssovf_log_err("Request to create >1 %s instance", name);
867 return -EINVAL;
868 }
869
870 params = rte_vdev_device_args(vdev);
871 if (params != NULL && params[0] != '\0') {
872 struct rte_kvargs *kvlist = rte_kvargs_parse(params, args);
873
874 if (!kvlist) {
875 ssovf_log_info(
876 "Ignoring unsupported params supplied '%s'",
877 name);
878 } else {
879 ret = rte_kvargs_process(kvlist, TIMVF_ENABLE_STATS_ARG,
880 ssovf_parsekv,
881 &timvf_enable_stats);
882 if (ret != 0) {
883 ssovf_log_err("%s: Error in timvf stats", name);
884 rte_kvargs_free(kvlist);
885 return ret;
886 }
887 }
888
889 rte_kvargs_free(kvlist);
890 }
891
892 eventdev = rte_event_pmd_vdev_init(name, sizeof(struct ssovf_evdev),
893 rte_socket_id(), vdev);
894 if (eventdev == NULL) {
895 ssovf_log_err("Failed to create eventdev vdev %s", name);
896 return -ENOMEM;
897 }
898 eventdev->dev_ops = &ssovf_ops;
899
900 timvf_set_eventdevice(eventdev);
901
902 /* For secondary processes, the primary has done all the work */
903 if (rte_eal_process_type() != RTE_PROC_PRIMARY) {

Callers

nothing calls this directly

Calls 15

rte_vdev_device_nameFunction · 0.85
rte_vdev_device_argsFunction · 0.85
rte_kvargs_parseFunction · 0.85
rte_kvargs_processFunction · 0.85
rte_kvargs_freeFunction · 0.85
rte_event_pmd_vdev_initFunction · 0.85
rte_socket_idFunction · 0.85
timvf_set_eventdeviceFunction · 0.85
rte_eal_process_typeFunction · 0.85
ssovf_fastpath_fns_setFunction · 0.85
octeontx_mbox_initFunction · 0.85
ssovf_pmd_privFunction · 0.85

Tested by

no test coverage detected