aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/multipath_drr.c
diff options
context:
space:
mode:
authorPravin B. Shelar <pravins@calsoftinc.com>2005-05-29 23:26:44 -0400
committerDavid S. Miller <davem@davemloft.net>2005-05-29 23:26:44 -0400
commit37e20a66db02eff9adbeee043af990cca85d0034 (patch)
treeb61efc508ce4130b508b329f4833cc4cf8deb7ee /net/ipv4/multipath_drr.c
parent79165121bc09c209451487d977df910c4ff6fc94 (diff)
[IPV4]: Kill MULTIPATHHOLDROUTE flag.
It cannot work properly, so just ignore it in drr and rr multipath algorithms just like the random multipath algorithm does. Suggested by Herbert Xu. Signed-off by: Pravin B. Shelar <pravins@calsoftinc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/multipath_drr.c')
-rw-r--r--net/ipv4/multipath_drr.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/net/ipv4/multipath_drr.c b/net/ipv4/multipath_drr.c
index 9349686131fc..cf2e6bcf7973 100644
--- a/net/ipv4/multipath_drr.c
+++ b/net/ipv4/multipath_drr.c
@@ -57,7 +57,6 @@ struct multipath_device {
57 57
58static struct multipath_device state[MULTIPATH_MAX_DEVICECANDIDATES]; 58static struct multipath_device state[MULTIPATH_MAX_DEVICECANDIDATES];
59static DEFINE_SPINLOCK(state_lock); 59static DEFINE_SPINLOCK(state_lock);
60static struct rtable *last_selection = NULL;
61 60
62static int inline __multipath_findslot(void) 61static int inline __multipath_findslot(void)
63{ 62{
@@ -111,11 +110,6 @@ struct notifier_block drr_dev_notifier = {
111 .notifier_call = drr_dev_event, 110 .notifier_call = drr_dev_event,
112}; 111};
113 112
114static void drr_remove(struct rtable *rt)
115{
116 if (last_selection == rt)
117 last_selection = NULL;
118}
119 113
120static void drr_safe_inc(atomic_t *usecount) 114static void drr_safe_inc(atomic_t *usecount)
121{ 115{
@@ -144,14 +138,6 @@ static void drr_select_route(const struct flowi *flp,
144 int devidx = -1; 138 int devidx = -1;
145 int cur_min_devidx = -1; 139 int cur_min_devidx = -1;
146 140
147 /* if necessary and possible utilize the old alternative */
148 if ((flp->flags & FLOWI_FLAG_MULTIPATHOLDROUTE) != 0 &&
149 last_selection != NULL) {
150 result = last_selection;
151 *rp = result;
152 return;
153 }
154
155 /* 1. make sure all alt. nexthops have the same GC related data */ 141 /* 1. make sure all alt. nexthops have the same GC related data */
156 /* 2. determine the new candidate to be returned */ 142 /* 2. determine the new candidate to be returned */
157 result = NULL; 143 result = NULL;
@@ -229,12 +215,10 @@ static void drr_select_route(const struct flowi *flp,
229 } 215 }
230 216
231 *rp = result; 217 *rp = result;
232 last_selection = result;
233} 218}
234 219
235static struct ip_mp_alg_ops drr_ops = { 220static struct ip_mp_alg_ops drr_ops = {
236 .mp_alg_select_route = drr_select_route, 221 .mp_alg_select_route = drr_select_route,
237 .mp_alg_remove = drr_remove,
238}; 222};
239 223
240static int __init drr_init(void) 224static int __init drr_init(void)
@@ -244,7 +228,7 @@ static int __init drr_init(void)
244 if (err) 228 if (err)
245 return err; 229 return err;
246 230
247 err = multipath_alg_register(&drr_ops, IP_MP_ALG_RR); 231 err = multipath_alg_register(&drr_ops, IP_MP_ALG_DRR);
248 if (err) 232 if (err)
249 goto fail; 233 goto fail;
250 234