Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78715
b: refs/heads/master
c: 90754f8
h: refs/heads/master
i:
  78713: bd67b9c
  78711: 40e5762
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jan 28, 2008
1 parent 829b7ba commit a3efa03
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 89 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5ccd792fa413f9336273cb8fa3b9dd3a7ec1735
refs/heads/master: 90754f8ec011c91382ece2849a43b8f8aa8a0105
3 changes: 3 additions & 0 deletions trunk/include/net/ip_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <asm/types.h> /* For __uXX types */
#include <linux/types.h> /* For __beXX types in userland */

#include <linux/sysctl.h> /* For ctl_path */

#define IP_VS_VERSION_CODE 0x010201
#define NVERSION(version) \
(version >> 16) & 0xFF, \
Expand Down Expand Up @@ -854,6 +856,7 @@ extern int sysctl_ip_vs_expire_quiescent_template;
extern int sysctl_ip_vs_sync_threshold[2];
extern int sysctl_ip_vs_nat_icmp_send;
extern struct ip_vs_stats ip_vs_stats;
extern struct ctl_path net_vs_ctl_path[];

extern struct ip_vs_service *
ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport);
Expand Down
35 changes: 7 additions & 28 deletions trunk/net/ipv4/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,34 +1591,13 @@ static struct ctl_table vs_vars[] = {
{ .ctl_name = 0 }
};

static ctl_table vs_table[] = {
{
.procname = "vs",
.mode = 0555,
.child = vs_vars
},
{ .ctl_name = 0 }
};

static ctl_table ipvs_ipv4_table[] = {
{
.ctl_name = NET_IPV4,
.procname = "ipv4",
.mode = 0555,
.child = vs_table,
},
{ .ctl_name = 0 }
};

static ctl_table vs_root_table[] = {
{
.ctl_name = CTL_NET,
.procname = "net",
.mode = 0555,
.child = ipvs_ipv4_table,
},
{ .ctl_name = 0 }
struct ctl_path net_vs_ctl_path[] = {
{ .procname = "net", .ctl_name = CTL_NET, },
{ .procname = "ipv4", .ctl_name = NET_IPV4, },
{ .procname = "vs", },
{ }
};
EXPORT_SYMBOL_GPL(net_vs_ctl_path);

static struct ctl_table_header * sysctl_header;

Expand Down Expand Up @@ -2345,7 +2324,7 @@ int ip_vs_control_init(void)
proc_net_fops_create(&init_net, "ip_vs", 0, &ip_vs_info_fops);
proc_net_fops_create(&init_net, "ip_vs_stats",0, &ip_vs_stats_fops);

sysctl_header = register_sysctl_table(vs_root_table);
sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars);

/* Initialize ip_vs_svc_table, ip_vs_svc_fwm_table, ip_vs_rtable */
for(idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++) {
Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv4/ipvs/ip_vs_est.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/sysctl.h>

#include <net/ip_vs.h>

Expand Down
31 changes: 1 addition & 30 deletions trunk/net/ipv4/ipvs/ip_vs_lblc.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,35 +123,6 @@ static ctl_table vs_vars_table[] = {
{ .ctl_name = 0 }
};

static ctl_table vs_table[] = {
{
.procname = "vs",
.mode = 0555,
.child = vs_vars_table
},
{ .ctl_name = 0 }
};

static ctl_table ipvs_ipv4_table[] = {
{
.ctl_name = NET_IPV4,
.procname = "ipv4",
.mode = 0555,
.child = vs_table
},
{ .ctl_name = 0 }
};

static ctl_table lblc_root_table[] = {
{
.ctl_name = CTL_NET,
.procname = "net",
.mode = 0555,
.child = ipvs_ipv4_table
},
{ .ctl_name = 0 }
};

static struct ctl_table_header * sysctl_header;

/*
Expand Down Expand Up @@ -582,7 +553,7 @@ static int __init ip_vs_lblc_init(void)
int ret;

INIT_LIST_HEAD(&ip_vs_lblc_scheduler.n_list);
sysctl_header = register_sysctl_table(lblc_root_table);
sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars_table);
ret = register_ip_vs_scheduler(&ip_vs_lblc_scheduler);
if (ret)
unregister_sysctl_table(sysctl_header);
Expand Down
31 changes: 1 addition & 30 deletions trunk/net/ipv4/ipvs/ip_vs_lblcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,35 +311,6 @@ static ctl_table vs_vars_table[] = {
{ .ctl_name = 0 }
};

static ctl_table vs_table[] = {
{
.procname = "vs",
.mode = 0555,
.child = vs_vars_table
},
{ .ctl_name = 0 }
};

static ctl_table ipvs_ipv4_table[] = {
{
.ctl_name = NET_IPV4,
.procname = "ipv4",
.mode = 0555,
.child = vs_table
},
{ .ctl_name = 0 }
};

static ctl_table lblcr_root_table[] = {
{
.ctl_name = CTL_NET,
.procname = "net",
.mode = 0555,
.child = ipvs_ipv4_table
},
{ .ctl_name = 0 }
};

static struct ctl_table_header * sysctl_header;

/*
Expand Down Expand Up @@ -771,7 +742,7 @@ static int __init ip_vs_lblcr_init(void)
int ret;

INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list);
sysctl_header = register_sysctl_table(lblcr_root_table);
sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars_table);
ret = register_ip_vs_scheduler(&ip_vs_lblcr_scheduler);
if (ret)
unregister_sysctl_table(sysctl_header);
Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv4/ipvs/ip_vs_sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/interrupt.h>
#include <asm/string.h>
#include <linux/kmod.h>
#include <linux/sysctl.h>

#include <net/ip_vs.h>

Expand Down

0 comments on commit a3efa03

Please sign in to comment.