/* /proc/net/ip_vs_conn entries Randomly drop connection entries before running out of memory  */
static int todrop_entry(struct ip_vs_conn *cp)
/* /proc/net/ip_vs_conn entries Randomly drop connection entries before running out of memory  */
static int todrop_entry(struct ip_vs_conn *cp)
{
	static const char todrop_rate[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
	static char todrop_counter[9] = {0};
	int i;
	if (time_before(cp->timeout + jiffies, cp->timer.expires + 60*HZ))
		return 0;
	i = atomic_read(&cp->in_pkts);
	if (i > 8 || i < 0) return 0;
	if (!todrop_rate[i]) return 0;
	if (--todrop_counter[i] > 0) return 0;
	todrop_counter[i] = todrop_rate[i];
	return 1;
}