[ovs-dev] [PATCH 5/5] dpif-netdev: Reset RSS hash when recirculating.
Daniele Di Proietto
diproiettod at vmware.com
Wed Apr 15 18:11:50 UTC 2015
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 <ethan at nicira.com>
Signed-off-by: Daniele Di Proietto <diproiettod at 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
More information about the dev
mailing list