svn commit: r305187 - stable/11/sys/netinet
Sepherosa Ziehau
sephe at FreeBSD.org
Thu Sep 1 07:41:50 UTC 2016
Author: sephe
Date: Thu Sep 1 07:41:49 2016
New Revision: 305187
URL: https://svnweb.freebsd.org/changeset/base/305187
Log:
MFC 304202
tcp/lro: Make # of LRO entries tunable
Reviewed by: hps, gallatin
Obtained from: rrs, gallatin
Sponsored by: Netflix (rrs, gallatin), Microsoft (sephe)
Differential Revision: https://reviews.freebsd.org/D7499
Modified:
stable/11/sys/netinet/tcp_lro.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/netinet/tcp_lro.c
==============================================================================
--- stable/11/sys/netinet/tcp_lro.c Thu Sep 1 07:23:47 2016 (r305186)
+++ stable/11/sys/netinet/tcp_lro.c Thu Sep 1 07:41:49 2016 (r305187)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
+#include <sys/sysctl.h>
#include <net/if.h>
#include <net/if_var.h>
@@ -55,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/ip_var.h>
#include <netinet/tcp.h>
#include <netinet/tcp_lro.h>
+#include <netinet/tcp_var.h>
#include <netinet6/ip6_var.h>
@@ -69,6 +71,14 @@ static MALLOC_DEFINE(M_LRO, "LRO", "LRO
static void tcp_lro_rx_done(struct lro_ctrl *lc);
+SYSCTL_NODE(_net_inet_tcp, OID_AUTO, lro, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
+ "TCP LRO");
+
+static unsigned tcp_lro_entries = TCP_LRO_ENTRIES;
+SYSCTL_UINT(_net_inet_tcp_lro, OID_AUTO, entries,
+ CTLFLAG_RDTUN | CTLFLAG_MPSAFE, &tcp_lro_entries, 0,
+ "default number of LRO entries");
+
static __inline void
tcp_lro_active_insert(struct lro_ctrl *lc, struct lro_entry *le)
{
@@ -86,7 +96,7 @@ tcp_lro_active_remove(struct lro_entry *
int
tcp_lro_init(struct lro_ctrl *lc)
{
- return (tcp_lro_init_args(lc, NULL, TCP_LRO_ENTRIES, 0));
+ return (tcp_lro_init_args(lc, NULL, tcp_lro_entries, 0));
}
int
More information about the svn-src-all
mailing list