Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111245
b: refs/heads/master
c: 82dfb6f
h: refs/heads/master
i:
  111243: 932c461
v: v3
  • Loading branch information
Sven Wegener authored and Simon Horman committed Aug 14, 2008
1 parent 7701555 commit 58d7b86
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 124 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: 9a812198ae49967f239789164c55ec3e72b7e0dd
refs/heads/master: 82dfb6f32219d8e6cf6b979a520cb2b11d977d4e
21 changes: 12 additions & 9 deletions trunk/net/ipv4/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,8 @@ ip_vs_add_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest)
svc->num_dests++;

/* call the update_service function of its scheduler */
svc->scheduler->update_service(svc);
if (svc->scheduler->update_service)
svc->scheduler->update_service(svc);

write_unlock_bh(&__ip_vs_svc_lock);
return 0;
Expand Down Expand Up @@ -899,7 +900,8 @@ ip_vs_add_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest)
svc->num_dests++;

/* call the update_service function of its scheduler */
svc->scheduler->update_service(svc);
if (svc->scheduler->update_service)
svc->scheduler->update_service(svc);

write_unlock_bh(&__ip_vs_svc_lock);

Expand Down Expand Up @@ -949,7 +951,8 @@ ip_vs_edit_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest)
IP_VS_WAIT_WHILE(atomic_read(&svc->usecnt) > 1);

/* call the update_service, because server weight may be changed */
svc->scheduler->update_service(svc);
if (svc->scheduler->update_service)
svc->scheduler->update_service(svc);

write_unlock_bh(&__ip_vs_svc_lock);

Expand Down Expand Up @@ -1012,12 +1015,12 @@ static void __ip_vs_unlink_dest(struct ip_vs_service *svc,
*/
list_del(&dest->n_list);
svc->num_dests--;
if (svcupd) {
/*
* Call the update_service function of its scheduler
*/
svc->scheduler->update_service(svc);
}

/*
* Call the update_service function of its scheduler
*/
if (svcupd && svc->scheduler->update_service)
svc->scheduler->update_service(svc);
}


Expand Down
7 changes: 0 additions & 7 deletions trunk/net/ipv4/ipvs/ip_vs_lblc.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,6 @@ static int ip_vs_lblc_done_svc(struct ip_vs_service *svc)
}


static int ip_vs_lblc_update_svc(struct ip_vs_service *svc)
{
return 0;
}


static inline struct ip_vs_dest *
__ip_vs_wlc_schedule(struct ip_vs_service *svc, struct iphdr *iph)
{
Expand Down Expand Up @@ -542,7 +536,6 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler =
.n_list = LIST_HEAD_INIT(ip_vs_lblc_scheduler.n_list),
.init_service = ip_vs_lblc_init_svc,
.done_service = ip_vs_lblc_done_svc,
.update_service = ip_vs_lblc_update_svc,
.schedule = ip_vs_lblc_schedule,
};

Expand Down
7 changes: 0 additions & 7 deletions trunk/net/ipv4/ipvs/ip_vs_lblcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,6 @@ static int ip_vs_lblcr_done_svc(struct ip_vs_service *svc)
}


static int ip_vs_lblcr_update_svc(struct ip_vs_service *svc)
{
return 0;
}


static inline struct ip_vs_dest *
__ip_vs_wlc_schedule(struct ip_vs_service *svc, struct iphdr *iph)
{
Expand Down Expand Up @@ -731,7 +725,6 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler =
.n_list = LIST_HEAD_INIT(ip_vs_lblcr_scheduler.n_list),
.init_service = ip_vs_lblcr_init_svc,
.done_service = ip_vs_lblcr_done_svc,
.update_service = ip_vs_lblcr_update_svc,
.schedule = ip_vs_lblcr_schedule,
};

Expand Down
21 changes: 0 additions & 21 deletions trunk/net/ipv4/ipvs/ip_vs_lc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,6 @@
#include <net/ip_vs.h>


static int ip_vs_lc_init_svc(struct ip_vs_service *svc)
{
return 0;
}


static int ip_vs_lc_done_svc(struct ip_vs_service *svc)
{
return 0;
}


static int ip_vs_lc_update_svc(struct ip_vs_service *svc)
{
return 0;
}


static inline unsigned int
ip_vs_lc_dest_overhead(struct ip_vs_dest *dest)
{
Expand Down Expand Up @@ -99,9 +81,6 @@ static struct ip_vs_scheduler ip_vs_lc_scheduler = {
.refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_lc_scheduler.n_list),
.init_service = ip_vs_lc_init_svc,
.done_service = ip_vs_lc_done_svc,
.update_service = ip_vs_lc_update_svc,
.schedule = ip_vs_lc_schedule,
};

Expand Down
24 changes: 0 additions & 24 deletions trunk/net/ipv4/ipvs/ip_vs_nq.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,6 @@
#include <net/ip_vs.h>


static int
ip_vs_nq_init_svc(struct ip_vs_service *svc)
{
return 0;
}


static int
ip_vs_nq_done_svc(struct ip_vs_service *svc)
{
return 0;
}


static int
ip_vs_nq_update_svc(struct ip_vs_service *svc)
{
return 0;
}


static inline unsigned int
ip_vs_nq_dest_overhead(struct ip_vs_dest *dest)
{
Expand Down Expand Up @@ -137,9 +116,6 @@ static struct ip_vs_scheduler ip_vs_nq_scheduler =
.refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_nq_scheduler.n_list),
.init_service = ip_vs_nq_init_svc,
.done_service = ip_vs_nq_done_svc,
.update_service = ip_vs_nq_update_svc,
.schedule = ip_vs_nq_schedule,
};

Expand Down
7 changes: 0 additions & 7 deletions trunk/net/ipv4/ipvs/ip_vs_rr.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ static int ip_vs_rr_init_svc(struct ip_vs_service *svc)
}


static int ip_vs_rr_done_svc(struct ip_vs_service *svc)
{
return 0;
}


static int ip_vs_rr_update_svc(struct ip_vs_service *svc)
{
svc->sched_data = &svc->destinations;
Expand Down Expand Up @@ -96,7 +90,6 @@ static struct ip_vs_scheduler ip_vs_rr_scheduler = {
.module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_rr_scheduler.n_list),
.init_service = ip_vs_rr_init_svc,
.done_service = ip_vs_rr_done_svc,
.update_service = ip_vs_rr_update_svc,
.schedule = ip_vs_rr_schedule,
};
Expand Down
24 changes: 0 additions & 24 deletions trunk/net/ipv4/ipvs/ip_vs_sed.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,6 @@
#include <net/ip_vs.h>


static int
ip_vs_sed_init_svc(struct ip_vs_service *svc)
{
return 0;
}


static int
ip_vs_sed_done_svc(struct ip_vs_service *svc)
{
return 0;
}


static int
ip_vs_sed_update_svc(struct ip_vs_service *svc)
{
return 0;
}


static inline unsigned int
ip_vs_sed_dest_overhead(struct ip_vs_dest *dest)
{
Expand Down Expand Up @@ -139,9 +118,6 @@ static struct ip_vs_scheduler ip_vs_sed_scheduler =
.refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_sed_scheduler.n_list),
.init_service = ip_vs_sed_init_svc,
.done_service = ip_vs_sed_done_svc,
.update_service = ip_vs_sed_update_svc,
.schedule = ip_vs_sed_schedule,
};

Expand Down
24 changes: 0 additions & 24 deletions trunk/net/ipv4/ipvs/ip_vs_wlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,6 @@
#include <net/ip_vs.h>


static int
ip_vs_wlc_init_svc(struct ip_vs_service *svc)
{
return 0;
}


static int
ip_vs_wlc_done_svc(struct ip_vs_service *svc)
{
return 0;
}


static int
ip_vs_wlc_update_svc(struct ip_vs_service *svc)
{
return 0;
}


static inline unsigned int
ip_vs_wlc_dest_overhead(struct ip_vs_dest *dest)
{
Expand Down Expand Up @@ -127,9 +106,6 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler =
.refcnt = ATOMIC_INIT(0),
.module = THIS_MODULE,
.n_list = LIST_HEAD_INIT(ip_vs_wlc_scheduler.n_list),
.init_service = ip_vs_wlc_init_svc,
.done_service = ip_vs_wlc_done_svc,
.update_service = ip_vs_wlc_update_svc,
.schedule = ip_vs_wlc_schedule,
};

Expand Down

0 comments on commit 58d7b86

Please sign in to comment.