Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
rte_class.h(3)			      DPDK			  rte_class.h(3)

NAME
     rte_class.h

SYNOPSIS
     #include <rte_dev.h>

   Data Structures
     struct rte_class

   Macros
     #define RTE_REGISTER_CLASS(nm,  cls)

   Typedefs
     typedef  int(*  rte_class_cmp_t)  (const  struct rte_class *cls, const void
	 *data)

   Functions
     RTE_TAILQ_HEAD (rte_class_list, rte_class)
     struct  rte_class	*  rte_class_find  (const   struct   rte_class	 *start,
	 rte_class_cmp_t cmp, const void *data)
     struct rte_class * rte_class_find_by_name (const char *name)
     void rte_class_register (struct rte_class *cls)
     void rte_class_unregister (struct rte_class *cls)

Detailed Description
     DPDK device class interface.

     This file describes the interface of the device class abstraction layer.

     A device class defines the type of function a device will be used for e.g.:
     Ethernet adapter (eth), cryptographic co-processor (crypto), etc.

     Definition in file rte_class.h.

Macro Definition Documentation
   #define RTE_REGISTER_CLASS(nm, cls)
     Value:.PP
     RTE_INIT_PRIO(classinitfn_ ##nm, CLASS) \
     {\
	 (cls).name = RTE_STR(nm); \
	 rte_class_register(&cls); \
     }
     Helper  for Class registration. The constructor has lower priority than Bus
     constructors. The constructor has higher priority than PMD constructors.

     Definition at line 111 of file rte_class.h.

Typedef Documentation
   typedef int(* rte_class_cmp_t)  (const  struct  rte_class  *cls,  const  void
     *data)
     Class comparison function.

     Parameters
	 cls Class under test.
	 data Data to compare against.

     Returns
	 0  if the class matches the data. !0 if the class does not match. <0 if
	 ordering is possible and the class is lower than the data. >0 if order-
	 ing is possible and the class is greater than the data.

     Definition at line 54 of file rte_class.h.

Function Documentation
   RTE_TAILQ_HEAD (rte_class_list, rte_class)
     Double linked list of classes

   struct  rte_class  *  rte_class_find  (const  struct   rte_class   *   start,
     rte_class_cmp_t cmp, const void * data)
     Class iterator to find a particular class.

     This  function  compares each registered class to find one that matches the
     data passed as parameter.

     If the comparison function returns zero this function will  stop  iterating
     over  any more classes. To continue a search the class of a previous search
     can be passed via the start parameter.

     Parameters
	 start Starting point for the iteration.
	 cmp Comparison function.
	 data Data to pass to comparison function.

     Returns
	 A pointer to a rte_class structure or NULL in case no class matches

   struct rte_class * rte_class_find_by_name (const char * name)
     Find the registered class for a given name.

   void rte_class_register (struct rte_class * cls)
     Register a Class handle.

     Parameters
	 cls A pointer to a rte_class structure describing the class to be  reg-
	 istered.

   void rte_class_unregister (struct rte_class * cls)
     Unregister a Class handle.

     Parameters
	 cls  A  pointer to a rte_class structure describing the class to be un-
	 registered.

Author
     Generated automatically by Doxygen for DPDK from the source code.

Version 25.11.0 		 Thu Aug 27 2026		  rte_class.h(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=rte_class_find&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help