Deleted Added
full compact
flowtable.c (215317) flowtable.c (215701)
1/**************************************************************************
2
3Copyright (c) 2008-2010, BitGravity Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 20 unchanged lines hidden (view full) ---

29
30#include "opt_route.h"
31#include "opt_mpath.h"
32#include "opt_ddb.h"
33#include "opt_inet.h"
34#include "opt_inet6.h"
35
36#include <sys/cdefs.h>
1/**************************************************************************
2
3Copyright (c) 2008-2010, BitGravity Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 20 unchanged lines hidden (view full) ---

29
30#include "opt_route.h"
31#include "opt_mpath.h"
32#include "opt_ddb.h"
33#include "opt_inet.h"
34#include "opt_inet6.h"
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/net/flowtable.c 215317 2010-11-14 20:38:11Z dim $");
37__FBSDID("$FreeBSD: head/sys/net/flowtable.c 215701 2010-11-22 19:32:54Z dim $");
38
39#include <sys/param.h>
40#include <sys/types.h>
41#include <sys/bitstring.h>
42#include <sys/condvar.h>
43#include <sys/callout.h>
44#include <sys/kernel.h>
45#include <sys/kthread.h>

--- 133 unchanged lines hidden (view full) ---

179 uint32_t ft_udp_idle __aligned(CACHE_LINE_SIZE);
180 uint32_t ft_fin_wait_idle;
181 uint32_t ft_syn_idle;
182 uint32_t ft_tcp_idle;
183 boolean_t ft_full;
184} __aligned(CACHE_LINE_SIZE);
185
186static struct proc *flowcleanerproc;
38
39#include <sys/param.h>
40#include <sys/types.h>
41#include <sys/bitstring.h>
42#include <sys/condvar.h>
43#include <sys/callout.h>
44#include <sys/kernel.h>
45#include <sys/kthread.h>

--- 133 unchanged lines hidden (view full) ---

179 uint32_t ft_udp_idle __aligned(CACHE_LINE_SIZE);
180 uint32_t ft_fin_wait_idle;
181 uint32_t ft_syn_idle;
182 uint32_t ft_tcp_idle;
183 boolean_t ft_full;
184} __aligned(CACHE_LINE_SIZE);
185
186static struct proc *flowcleanerproc;
187STATIC_VNET_DEFINE(struct flowtable *, flow_list_head);
188STATIC_VNET_DEFINE(uint32_t, flow_hashjitter);
189STATIC_VNET_DEFINE(uma_zone_t, flow_ipv4_zone);
190STATIC_VNET_DEFINE(uma_zone_t, flow_ipv6_zone);
187static VNET_DEFINE(struct flowtable *, flow_list_head);
188static VNET_DEFINE(uint32_t, flow_hashjitter);
189static VNET_DEFINE(uma_zone_t, flow_ipv4_zone);
190static VNET_DEFINE(uma_zone_t, flow_ipv6_zone);
191
192#define V_flow_list_head VNET(flow_list_head)
193#define V_flow_hashjitter VNET(flow_hashjitter)
194#define V_flow_ipv4_zone VNET(flow_ipv4_zone)
195#define V_flow_ipv6_zone VNET(flow_ipv6_zone)
196
197
198static struct cv flowclean_cv;

--- 26 unchanged lines hidden (view full) ---

225 for flows
226 * - add sysctl / device node / syscall to support exporting and importing
227 * of flows with flag to indicate that a flow was imported so should
228 * not be considered for auto-cleaning
229 * - support explicit connection state (currently only ad-hoc for DSR)
230 * - idetach() cleanup for options VIMAGE builds.
231 */
232VNET_DEFINE(int, flowtable_enable) = 1;
191
192#define V_flow_list_head VNET(flow_list_head)
193#define V_flow_hashjitter VNET(flow_hashjitter)
194#define V_flow_ipv4_zone VNET(flow_ipv4_zone)
195#define V_flow_ipv6_zone VNET(flow_ipv6_zone)
196
197
198static struct cv flowclean_cv;

--- 26 unchanged lines hidden (view full) ---

225 for flows
226 * - add sysctl / device node / syscall to support exporting and importing
227 * of flows with flag to indicate that a flow was imported so should
228 * not be considered for auto-cleaning
229 * - support explicit connection state (currently only ad-hoc for DSR)
230 * - idetach() cleanup for options VIMAGE builds.
231 */
232VNET_DEFINE(int, flowtable_enable) = 1;
233STATIC_VNET_DEFINE(int, flowtable_debug);
234STATIC_VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE;
235STATIC_VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE;
236STATIC_VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE;
237STATIC_VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE;
238STATIC_VNET_DEFINE(int, flowtable_nmbflows);
239STATIC_VNET_DEFINE(int, flowtable_ready) = 0;
233static VNET_DEFINE(int, flowtable_debug);
234static VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE;
235static VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE;
236static VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE;
237static VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE;
238static VNET_DEFINE(int, flowtable_nmbflows);
239static VNET_DEFINE(int, flowtable_ready) = 0;
240
241#define V_flowtable_enable VNET(flowtable_enable)
242#define V_flowtable_debug VNET(flowtable_debug)
243#define V_flowtable_syn_expire VNET(flowtable_syn_expire)
244#define V_flowtable_udp_expire VNET(flowtable_udp_expire)
245#define V_flowtable_fin_wait_expire VNET(flowtable_fin_wait_expire)
246#define V_flowtable_tcp_expire VNET(flowtable_tcp_expire)
247#define V_flowtable_nmbflows VNET(flowtable_nmbflows)

--- 1567 unchanged lines hidden ---
240
241#define V_flowtable_enable VNET(flowtable_enable)
242#define V_flowtable_debug VNET(flowtable_debug)
243#define V_flowtable_syn_expire VNET(flowtable_syn_expire)
244#define V_flowtable_udp_expire VNET(flowtable_udp_expire)
245#define V_flowtable_fin_wait_expire VNET(flowtable_fin_wait_expire)
246#define V_flowtable_tcp_expire VNET(flowtable_tcp_expire)
247#define V_flowtable_nmbflows VNET(flowtable_nmbflows)

--- 1567 unchanged lines hidden ---