From: ext Bill Fischofer [mailto:[email protected]] Sent: Monday, March 30, 2015 11:54 PM To: Savolainen, Petri (Nokia - FI/Espoo) Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [RFC 5/8] api: packet_io: added packet input queue API definitions
On Mon, Mar 30, 2015 at 12:23 PM, Petri Savolainen <[email protected]<mailto:[email protected]>> wrote: API changes enable multiple packet input queues and control hashing of incoming packets into those. Packet IO start and stop were added to have more controlled packet IO setup phase. Signed-off-by: Petri Savolainen <[email protected]<mailto:[email protected]>> --- include/odp/api/packet_io.h | 88 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index d34041c..99a5d5d 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -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
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
