|
@@ -487,19 +487,17 @@ is_overloaded(struct ip_vs_dest *dest, struct ip_vs_service *svc)
|
|
|
* Locality-Based (weighted) Least-Connection scheduling
|
|
|
*/
|
|
|
static struct ip_vs_dest *
|
|
|
-ip_vs_lblc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
|
|
|
+ip_vs_lblc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb,
|
|
|
+ struct ip_vs_iphdr *iph)
|
|
|
{
|
|
|
struct ip_vs_lblc_table *tbl = svc->sched_data;
|
|
|
- struct ip_vs_iphdr iph;
|
|
|
struct ip_vs_dest *dest = NULL;
|
|
|
struct ip_vs_lblc_entry *en;
|
|
|
|
|
|
- ip_vs_fill_iph_addr_only(svc->af, skb, &iph);
|
|
|
-
|
|
|
IP_VS_DBG(6, "%s(): Scheduling...\n", __func__);
|
|
|
|
|
|
/* First look in our cache */
|
|
|
- en = ip_vs_lblc_get(svc->af, tbl, &iph.daddr);
|
|
|
+ en = ip_vs_lblc_get(svc->af, tbl, &iph->daddr);
|
|
|
if (en) {
|
|
|
/* We only hold a read lock, but this is atomic */
|
|
|
en->lastuse = jiffies;
|
|
@@ -529,12 +527,12 @@ ip_vs_lblc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
|
|
|
/* If we fail to create a cache entry, we'll just use the valid dest */
|
|
|
spin_lock_bh(&svc->sched_lock);
|
|
|
if (!tbl->dead)
|
|
|
- ip_vs_lblc_new(tbl, &iph.daddr, dest);
|
|
|
+ ip_vs_lblc_new(tbl, &iph->daddr, dest);
|
|
|
spin_unlock_bh(&svc->sched_lock);
|
|
|
|
|
|
out:
|
|
|
IP_VS_DBG_BUF(6, "LBLC: destination IP address %s --> server %s:%d\n",
|
|
|
- IP_VS_DBG_ADDR(svc->af, &iph.daddr),
|
|
|
+ IP_VS_DBG_ADDR(svc->af, &iph->daddr),
|
|
|
IP_VS_DBG_ADDR(svc->af, &dest->addr), ntohs(dest->port));
|
|
|
|
|
|
return dest;
|