[PATCH v3 1/2] ip_frag: optimize key compare and hash generation

Stephen Hemminger stephen at networkplumber.org
Tue May 30 05:09:53 CEST 2023


On Mon, 29 May 2023 20:25:01 +0530
<pbhagavatula at marvell.com> wrote:

> +	return (k1->id_key_len != k2->id_key_len) ||
> +	       (k1->key_len == IPV4_KEYLEN ? k1->src_dst[0] != k2->src_dst[0] :
> +					     rte_hash_k32_cmp_eq(k1, k2, 32));

If you make another version, one small comment.
Breaking this into a couple of if statements would make reading easier
for human readers. Compiler doesn't care.


More information about the dev mailing list