I don't really like this. For one thing, Suppose in a particular stage no changes to the packet are made. There's a good chance you'll recompute the same hash and still collide.
What if instead, in the emc code if the depth > 0, you folded it into the hash for the lookup? Very simple change that I think addresses these issues. Ethan On Wed, Apr 15, 2015 at 11:11 AM, Daniele Di Proietto <diproiet...@vmware.com> wrote: > Having the same RSS hash after recirculation can cause unnecessary > collisions in the exact match cache. Setting the RSS hash to 0 forces > the datapath to compute a new value and account for the changes in the > packet or in the metadata. > > Requested-by: Ethan Jackson <et...@nicira.com> > Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com> > --- > lib/dpif-netdev.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c > index 20bb498..28262e6 100644 > --- a/lib/dpif-netdev.c > +++ b/lib/dpif-netdev.c > @@ -3404,6 +3404,10 @@ dp_execute_cb(void *aux_, struct dp_packet **packets, > int cnt, > > err = push_tnl_action(dp, a, packets, cnt); > if (!err) { > + for (i = 0; i < cnt; i++) { > + dp_packet_set_rss_hash(packets[i], 0); > + } > + > (*depth)++; > dp_netdev_input(pmd, packets, cnt); > (*depth)--; > @@ -3433,6 +3437,7 @@ dp_execute_cb(void *aux_, struct dp_packet **packets, > int cnt, > > for (i = 0; i < cnt; i++) { > packets[i]->md.in_port.odp_port = portno; > + dp_packet_set_rss_hash(packets[i], 0); > } > > (*depth)++; > @@ -3491,6 +3496,7 @@ dp_execute_cb(void *aux_, struct dp_packet **packets, > int cnt, > > for (i = 0; i < cnt; i++) { > packets[i]->md.recirc_id = nl_attr_get_u32(a); > + dp_packet_set_rss_hash(packets[i], 0); > } > > (*depth)++; > -- > 2.1.4 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev