config: adjust the number of maz entries per bucket for IP reassembly

This commit is contained in:
luwenpeng
2024-07-30 19:17:29 +08:00
parent 18153550d9
commit 48202b4d0a
5 changed files with 12 additions and 12 deletions

View File

@@ -66,7 +66,7 @@ enum
IP_LAST_FRAG_IDX,
IP_FIRST_FRAG_IDX,
IP_MIN_FRAG_NUM,
IP_MAX_FRAG_NUM = 8,
IP_MAX_FRAG_NUM = 64,
};
struct ip_frag_hdr
@@ -208,9 +208,9 @@ static int check_options(const struct ip_reassembly_options *opts)
return -1;
}
if (opts->bucket_entries < 1 || opts->bucket_entries > 256 || is_power_of_2(opts->bucket_entries) == 0)
if (opts->bucket_entries < 1 || is_power_of_2(opts->bucket_entries) == 0)
{
IP_REASSEMBLE_DEBUG("invalid bucket_entries: %u, supported range: [1, 256] (must be power of 2)", opts->bucket_entries);
IP_REASSEMBLE_DEBUG("invalid bucket_entries: %u, must be power of 2", opts->bucket_entries);
return -1;
}