@@ -18,6 +18,9 @@
extern "C" {
#endif
+#include <odp/queue.h>
+#include <odp/schedule_types.h>
+
/** @defgroup odp_packet_io ODP PACKET IO
* Operations on a packet.
* @{
@@ -58,11 +61,36 @@ enum odp_pktio_input_mode {
};
/**
+ * Packet input queue hashing
+ *
+ * Input queue hashing algorithm is implementation specific. This enumeration
+ * selects the packet fields used in input queue hashing. Queue selection is
+ * implementation specific for packets missing the fields.
+ */
+enum odp_pktio_input_hash {
+ /** No specific fields defined */
+ ODP_PKTIN_HASH_NONE = 0,
+ /** IPv4/v6 addresses */
+ ODP_PKTIN_HASH_IP,
+ /** UDP ports and IPv4/v6 addresses */
+ ODP_PKTIN_HASH_UDP_IP,
+ /** TCP ports and IPv4/v6 addresses */
+ ODP_PKTIN_HASH_TCP_IP
Are these names intended to imply concatenation order for hashing? That is, UDP_IP means has on UDP port followed by IP address? If not then should these be ODP_PKTIN_IP_UDP, etc. to reflect the Layer 4 qualification to the Layer 3 hash?
There’s no algorithm or order (?) defined for the hash.
E.g. ODP_PKTIN_HASH_UDP_IP just defines that inputs for hash function are: IPv4/v6 addresses, IP type/next header == UDP and UDP port numbers. Output from the function is one of the input queues.
-Petri