numam-dpdk/lib/librte_ip_frag
Anatoly Burakov 2505824261 ip_frag: fix order of key compare arguments
When using key compare function, it uses key length of the first
argument to determine how long should be the keys that are compared.
However, currently we are passing a key from the fragmentation table as
first argument. the problem with this is that this key is potentially
uninitialized (i.e. contains all zeroes, including key length). this
leads to a nasty bug of comparing only the key id's and not keys
themselves.

Of course, a safer way would be to do RTE_MAX between key lengths, but
since this compare is done per-packet, every cycle counts, so we just
use the key whose length is guaranteed to be correct because it comes
from an actual packet.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-26 22:51:07 +02:00
..
ip_frag_common.h ip_frag: remove unneeded rte prefixes 2014-06-26 22:49:44 +02:00
ip_frag_internal.c ip_frag: fix order of key compare arguments 2014-06-26 22:51:07 +02:00
Makefile ip_frag: add IPv6 reassembly 2014-06-16 18:55:05 +02:00
rte_ip_frag_common.c ip_frag: clean includes 2014-06-17 02:37:28 +02:00
rte_ip_frag.h ip_frag: fix comment 2014-06-26 22:50:49 +02:00
rte_ipv4_fragmentation.c ip_frag: remove unneeded rte prefixes 2014-06-26 22:49:44 +02:00
rte_ipv4_reassembly.c ip_frag: fix debug macros 2014-06-26 22:50:57 +02:00
rte_ipv6_fragmentation.c ip_frag: remove unneeded rte prefixes 2014-06-26 22:49:44 +02:00
rte_ipv6_reassembly.c ip_frag: remove unneeded rte prefixes 2014-06-26 22:49:44 +02:00