2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-15 14:17:18 +00:00

dpif-netdev: Correctly update 'key' in emc_processing().

The 'key' pointer must point at the first unused element in the key
array.

Fixes: b89c678b7a ("dpif-netdev: optmizing emc_processing()")
CC: Andy Zhou <azhou@ovn.org>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Andy Zhou <azhou@nicira.com>
This commit is contained in:
Daniele Di Proietto
2016-02-02 20:38:11 -08:00
parent 88779d665a
commit 400486f7bb

View File

@@ -3357,7 +3357,10 @@ emc_processing(struct dp_netdev_pmd_thread *pmd, struct dp_packet **packets,
/* Exact match cache missed. Group missed packets together at
* the beginning of the 'packets' array. */
packets[n_missed] = packet;
key = &keys[n_missed++];
/* 'key[n_missed]' contains the key of the current packet and it
* must be returned to the caller. The next key should be extracted
* to 'keys[n_missed + 1]'. */
key = &keys[++n_missed];
}
}