On Thu, Apr 23, 2015 at 11:40 AM, Daniele Di Proietto <diproiet...@vmware.com> wrote: > Until now the exact match cache processing was able to handle only four > megaflow. The rest of the packets was passed to the megaflow > classifier. > > The limit was arbitraly set to four also because the algorithm used to > group packets in output batches didn't perform well with a lot of > megaflows. > > After changing the algorithm and after some performance testing it seems > much better just share the same output batches between the exact match > cache and the megaflow classifier. > > Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com> > --- ...
> * 'packets' array (they have been moved to the beginning of the vector). > */ > static inline size_t > emc_processing(struct dp_netdev_pmd_thread *pmd, struct dp_packet **packets, > - size_t cnt, struct netdev_flow_key *keys, long long now) > + size_t cnt, struct netdev_flow_key *keys, > + struct packet_batch batches[], size_t *n_batches) > { > - struct netdev_flow_key key; > - struct packet_batch batches[4]; > struct emc_cache *flow_cache = &pmd->flow_cache; > - size_t n_batches, i; > - size_t notfound_cnt = 0; > + struct netdev_flow_key key; > + size_t i, notfound_cnt = 0; > > - n_batches = 0; > miniflow_initialize(&key.mf, key.buf); > for (i = 0; i < cnt; i++) { > struct dp_netdev_flow *flow; > @@ -3152,8 +3142,7 @@ emc_processing(struct dp_netdev_pmd_thread *pmd, struct > dp_packet **packets, > > flow = emc_lookup(flow_cache, &key); > if (OVS_UNLIKELY(!dp_netdev_queue_batches(packets[i], flow, &key.mf, > - batches, &n_batches, > - ARRAY_SIZE(batches)))) { > + batches, n_batches))) { Can you move the flow NULL check from dp_netdev_queue_batches(). It makes this code bit clear on the packet processing flow. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev