> -----Original Message-----
> From: EXT Zoltan Kiss [mailto:[email protected]]
> Sent: Friday, February 19, 2016 6:13 PM
> To: Elo, Matias (Nokia - FI/Espoo) <[email protected]>; lng-
> [email protected]
> Cc: Savolainen, Petri (Nokia - FI/Espoo) <[email protected]>
> Subject: Re: [lng-odp] [API-NEXT PATCH v4 10/13] linux-generic: dpdk: add
> odp_pktio_input_queues_config()
> 
> Hi,
> 
> I'm implementing multiqueue for ODP-DPDK as well, where I'm taking a lot
> of your code, so finally I'm doing a bigger review of this code:
> 

Hi,

Great to have feedback. I'll hopefully have time to test and review you patches 
tomorrow.

-Matias

> On 15/02/16 10:49, Matias Elo wrote:
> > @@ -309,6 +335,29 @@ static int odp_dpdk_pktio_init_local(void)
> >     return 0;
> >   }
> >
> > +static int dpdk_input_queues_config(pktio_entry_t *pktio_entry,
> > +                               const odp_pktin_queue_param_t *p)
> > +{
> > +   odp_pktin_mode_t mode = pktio_entry->s.param.in_mode;
> > +   odp_bool_t lockless;
> > +
> > +   /**
> > +    * Scheduler synchronizes input queue polls. Only single thread
> > +    * at a time polls a queue */
> > +   if (mode == ODP_PKTIN_MODE_SCHED ||
> > +       p->op_mode == ODP_PKTIO_OP_MT_UNSAFE)
> > +           lockless = 1;
> > +   else
> > +           lockless = 0;
> > +
> > +   if (p->hash_enable && p->num_queues > 1)
> > +           pktio_entry->s.pkt_dpdk.hash = p->hash_proto;
> 
> We had a discussion about this when the API was introduced. The final
> take for me was that this should not influence whether an actual hash is
> generated, only the fact that hash is used to distribute packets between
> queues. In DPDK you can't actually make difference between the two, so
> even if these conditions are not met you have to generate something for
> odp_packet_flow_hash().
> I've simply added this else branch:
> 
>       else
>               pktio_entry->s.pkt_dpdk.hash.all_bits = UINT32_MAX;
> 

Good catch, I had missed the original API discussion. Instead of enabling all 
the hash protocols I'd rather go with a minimal default DPDK hash. ETH_RSS_IP 
seems like a good candidate for this. In the future odp_pktin_hash_proto_t may 
include more protocols and some of the combinations may not be supported by the 
DPDK drivers. I minimal default value would be more future proof and support 
more drivers.

This 'default hash' can be set in dpdk_setup_port() helper. I'll make a patch 
to implement this.

> 
> 
> > +
> > +   pktio_entry->s.pkt_dpdk.lockless_rx = lockless;
> > +
> > +   return 0;
> > +}
> > +
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to