summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_fw.h4
-rw-r--r--sys/netinet/tcp_input.c4
-rw-r--r--sys/netinet/tcp_stacks/fastpath.c33
-rw-r--r--sys/netinet/tcp_subr.c4
-rw-r--r--sys/netinet/tcp_timer.c4
-rw-r--r--sys/netinet/tcp_var.h6
6 files changed, 22 insertions, 33 deletions
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index e46abf8..640025d 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -791,9 +791,9 @@ typedef struct _ipfw_obj_tlv {
typedef struct _ipfw_obj_ntlv {
ipfw_obj_tlv head; /* TLV header */
uint16_t idx; /* Name index */
- uint8_t spare; /* unused */
+ uint8_t set; /* set, if applicable */
uint8_t type; /* object type, if applicable */
- uint32_t set; /* set, if applicable */
+ uint32_t spare; /* unused */
char name[64]; /* Null-terminated name */
} ipfw_obj_ntlv;
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index cd400f5..330d305 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -250,7 +250,7 @@ static void
tcp_vnet_init(const void *unused)
{
- COUNTER_ARRAY_ALLOC(VNET(tcps_states), TCP_NSTATES, M_WAITOK);
+ COUNTER_ARRAY_ALLOC(V_tcps_states, TCP_NSTATES, M_WAITOK);
VNET_PCPUSTAT_ALLOC(tcpstat, M_WAITOK);
}
VNET_SYSINIT(tcp_vnet_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
@@ -261,7 +261,7 @@ static void
tcp_vnet_uninit(const void *unused)
{
- COUNTER_ARRAY_FREE(VNET(tcps_states), TCP_NSTATES);
+ COUNTER_ARRAY_FREE(V_tcps_states, TCP_NSTATES);
VNET_PCPUSTAT_FREE(tcpstat);
}
VNET_SYSUNINIT(tcp_vnet_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
diff --git a/sys/netinet/tcp_stacks/fastpath.c b/sys/netinet/tcp_stacks/fastpath.c
index e7807bd..7d573c5 100644
--- a/sys/netinet/tcp_stacks/fastpath.c
+++ b/sys/netinet/tcp_stacks/fastpath.c
@@ -2375,34 +2375,17 @@ tcp_do_segment_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so,
}
struct tcp_function_block __tcp_fastslow = {
- "fastslow",
- tcp_output,
- tcp_do_segment_fastslow,
- tcp_default_ctloutput,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- 0,
- 0
-
+ .tfb_tcp_block_name = "fastslow",
+ .tfb_tcp_output = tcp_output,
+ .tfb_tcp_do_segment = tcp_do_segment_fastslow,
+ .tfb_tcp_ctloutput = tcp_default_ctloutput,
};
struct tcp_function_block __tcp_fastack = {
- "fastack",
- tcp_output,
- tcp_do_segment_fastack,
- tcp_default_ctloutput,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- 0,
- 0
+ .tfb_tcp_block_name = "fastack",
+ .tfb_tcp_output = tcp_output,
+ .tfb_tcp_do_segment = tcp_do_segment_fastack,
+ .tfb_tcp_ctloutput = tcp_default_ctloutput
};
static int
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 64d7124..03526df 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1642,7 +1642,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
*/
if (req->oldptr == NULL) {
n = V_tcbinfo.ipi_count +
- counter_u64_fetch(VNET(tcps_states)[TCPS_SYN_RECEIVED]);
+ counter_u64_fetch(V_tcps_states[TCPS_SYN_RECEIVED]);
n += imax(n / 8, 10);
req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xtcpcb);
return (0);
@@ -1659,7 +1659,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
n = V_tcbinfo.ipi_count;
INP_LIST_RUNLOCK(&V_tcbinfo);
- m = counter_u64_fetch(VNET(tcps_states)[TCPS_SYN_RECEIVED]);
+ m = counter_u64_fetch(V_tcps_states[TCPS_SYN_RECEIVED]);
error = sysctl_wire_old_buffer(req, 2 * (sizeof xig)
+ (n + m) * sizeof(struct xtcpcb));
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 5925f42..837913e 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -604,6 +604,10 @@ tcp_timer_rexmt(void * xtp)
KASSERT((tp->t_timers->tt_flags & TT_REXMT) != 0,
("%s: tp %p rexmt callout should be running", __func__, tp));
tcp_free_sackholes(tp);
+ if (tp->t_fb->tfb_tcp_rexmit_tmr) {
+ /* The stack has a timer action too. */
+ (*tp->t_fb->tfb_tcp_rexmit_tmr)(tp);
+ }
/*
* Retransmission timer went off. Message has not
* been acked within retransmit interval. Back off
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index f2c76a8..2bbd5e3 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -135,6 +135,7 @@ struct tcp_function_block {
uint32_t, u_int);
int (*tfb_tcp_timer_active)(struct tcpcb *, uint32_t);
void (*tfb_tcp_timer_stop)(struct tcpcb *, uint32_t);
+ void (*tfb_tcp_rexmit_tmr)(struct tcpcb *);
volatile uint32_t tfb_refcnt;
uint32_t tfb_flags;
};
@@ -628,8 +629,9 @@ void kmod_tcpstat_inc(int statnum);
* Running TCP connection count by state.
*/
VNET_DECLARE(counter_u64_t, tcps_states[TCP_NSTATES]);
-#define TCPSTATES_INC(state) counter_u64_add(VNET(tcps_states)[state], 1)
-#define TCPSTATES_DEC(state) counter_u64_add(VNET(tcps_states)[state], -1)
+#define V_tcps_states VNET(tcps_states)
+#define TCPSTATES_INC(state) counter_u64_add(V_tcps_states[state], 1)
+#define TCPSTATES_DEC(state) counter_u64_add(V_tcps_states[state], -1)
/*
* TCP specific helper hook point identifiers.
OpenPOWER on IntegriCloud