Hi,

On 16/12/15 12:56, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> >>>+typedef struct odp_pktio_input_queue_param_t {
> >>>+      /** Single thread per queue. Enable performance optimization when
> >>each
> >>>+        * queue has only single user.
> >>>+        * 0: Queue is multi-thread safe
> >>>+        * 1: Queue is used by single thread only */
> >>>+      odp_bool_t single_user;
> >>>+
> >>>+      /** Enable flow hashing
> >>>+        * 0: Do not hash flows
> >>>+        * 1: Hash flows to input queues */
> >>>+      odp_bool_t hash_enable;
> >>>+
> >>>+      /** Protocol field selection for hashing. Multiple protocols can be
> >>>+        * selected. */
> >>>+      odp_pktin_hash_proto_t hash_proto;
> >>>+
> >>>+      /** Number of input queues to be created. More than one input queue
> >>>+        * require input hashing or classifier setup. Hash_proto is ignored
> >>>+        * when hash_enable is zero or num_queues is one. This value must
> >>be
> >>
> >>OVS use the hashes even with one queue, it's useful for fast lookup in
> >>flow tables. Is there any reason to automatically disable it?
> >
> >
> >This describes input queue hashing (hashing of flows into queues).
>
>Let me reword my concerns:
>- What happens if num_queues > 1 and hash_enable = 0? What do we know
>about the distribution of packets between queues?
Not specified yet. But in practice, need to use classifier, or accept that ODP 
does not maintain packet order.



>- If num_queues = 1, hash_proto is ignored (no matter what hashe_enable
>is), so how do we set up hashing? As I said, we still need it.
As said this controls hashing between N queues. No hashing needed with single 
queue.
It is needed. I think the base of our misunderstanding is that your use of "hashing" also includes "distributing it between queues", while mine only includes "generate the hash". DPDK also separate these things, especially because "hashing" is not the only way of deciding where the packet goes, the recently discussed Flow Director (which extends RSS) is also a valid way.


> It does not control or comment about flow hash value stored in the packet. We don't have an API to control is yet.

I think it would be very confusing to have separate setting for "flow hash" and "the hash which decides which queue is chosen", and quite unlikely to implement in hardware when the two differs, as usually the card computes only one kind of hash.



>
>
> >It does not control the hash value stored into the packet.
>It sounds like it does.
It's part of odp_pktio_input_queue_param_t == input queue parameter.


>
> >It may very well be present also when using a single input queue.
>We would need certainty about that.
>
>In DPDK RSS enablement is not tied to have more than 1 RX queue.

Application does not see difference if you "hash" packets into single queue. 
All packets will be stored into the same queue anyway.

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to