summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorAngus Chen <angus.chen@jaguarmicro.com>2023-05-12 09:01:52 +0800
committerDavid S. Miller <davem@davemloft.net>2023-05-15 08:42:07 +0100
commitb2cbac9b9b28730e9e53be20b6cdf979d3b9f27e (patch)
tree7347f32ea4db6680d4fd8b3dedb4bde4c1d65743 /net/ipv4
parent6d4ff8aed3b3f3afe12b40ff7e48815fc9688889 (diff)
net: Remove low_thresh in ip defrag
As low_thresh has no work in fragment reassembles,del it. And Mark it deprecated in sysctl Document. Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ip_fragment.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 69c00ffdcf3e..0db5eb3dec83 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -553,7 +553,7 @@ EXPORT_SYMBOL(ip_check_defrag);
#ifdef CONFIG_SYSCTL
static int dist_min;
-
+static unsigned long ipfrag_low_thresh_unused;
static struct ctl_table ip4_frags_ns_ctl_table[] = {
{
.procname = "ipfrag_high_thresh",
@@ -609,9 +609,9 @@ static int __net_init ip4_frags_ns_ctl_register(struct net *net)
}
table[0].data = &net->ipv4.fqdir->high_thresh;
- table[0].extra1 = &net->ipv4.fqdir->low_thresh;
- table[1].data = &net->ipv4.fqdir->low_thresh;
- table[1].extra2 = &net->ipv4.fqdir->high_thresh;
+ table[0].extra1 = &ipfrag_low_thresh_unused;
+ table[1].data = &ipfrag_low_thresh_unused;
+ table[1].extra2 = &net->ipv4.fqdir->high_thresh;
table[2].data = &net->ipv4.fqdir->timeout;
table[3].data = &net->ipv4.fqdir->max_dist;
@@ -674,12 +674,9 @@ static int __net_init ipv4_frags_init_net(struct net *net)
* A 64K fragment consumes 129736 bytes (44*2944)+200
* (1500 truesize == 2944, sizeof(struct ipq) == 200)
*
- * We will commit 4MB at one time. Should we cross that limit
- * we will prune down to 3MB, making room for approx 8 big 64K
- * fragments 8x128k.
+ * We will commit 4MB at one time. Should we cross that limit.
*/
net->ipv4.fqdir->high_thresh = 4 * 1024 * 1024;
- net->ipv4.fqdir->low_thresh = 3 * 1024 * 1024;
/*
* Important NOTE! Fragment queue must be destroyed before MSL expires.
* RFC791 is wrong proposing to prolongate timer each fragment arrival