linux/net/ipv4/tcp_illinois.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * TCP Illinois congestion control.
 * Home page:
 *	http://www.ews.uiuc.edu/~shaoliu/tcpillinois/index.html
 *
 * The algorithm is described in:
 * "TCP-Illinois: A Loss and Delay-Based Congestion Control Algorithm
 *  for High-Speed Networks"
 * http://tamerbasar.csl.illinois.edu/LiuBasarSrikantPerfEvalArtJun2008.pdf
 *
 * Implemented from description in paper and ns-2 simulation.
 * Copyright (C) 2007 Stephen Hemminger <[email protected]>
 */

#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/inet_diag.h>
#include <asm/div64.h>
#include <net/tcp.h>

#define ALPHA_SHIFT
#define ALPHA_SCALE
#define ALPHA_MIN
#define ALPHA_MAX
#define ALPHA_BASE
#define RTT_MAX

#define BETA_SHIFT
#define BETA_SCALE
#define BETA_MIN
#define BETA_MAX
#define BETA_BASE

static int win_thresh __read_mostly =;
module_param(win_thresh, int, 0);
MODULE_PARM_DESC();

static int theta __read_mostly =;
module_param(theta, int, 0);
MODULE_PARM_DESC();

/* TCP Illinois Parameters */
struct illinois {};

static void rtt_reset(struct sock *sk)
{}

static void tcp_illinois_init(struct sock *sk)
{}

/* Measure RTT for each ack. */
static void tcp_illinois_acked(struct sock *sk, const struct ack_sample *sample)
{}

/* Maximum queuing delay */
static inline u32 max_delay(const struct illinois *ca)
{}

/* Average queuing delay */
static inline u32 avg_delay(const struct illinois *ca)
{}

/*
 * Compute value of alpha used for additive increase.
 * If small window then use 1.0, equivalent to Reno.
 *
 * For larger windows, adjust based on average delay.
 * A. If average delay is at minimum (we are uncongested),
 *    then use large alpha (10.0) to increase faster.
 * B. If average delay is at maximum (getting congested)
 *    then use small alpha (0.3)
 *
 * The result is a convex window growth curve.
 */
static u32 alpha(struct illinois *ca, u32 da, u32 dm)
{}

/*
 * Beta used for multiplicative decrease.
 * For small window sizes returns same value as Reno (0.5)
 *
 * If delay is small (10% of max) then beta = 1/8
 * If delay is up to 80% of max then beta = 1/2
 * In between is a linear function
 */
static u32 beta(u32 da, u32 dm)
{}

/* Update alpha and beta values once per RTT */
static void update_params(struct sock *sk)
{}

/*
 * In case of loss, reset to default values
 */
static void tcp_illinois_state(struct sock *sk, u8 new_state)
{}

/*
 * Increase window in response to successful acknowledgment.
 */
static void tcp_illinois_cong_avoid(struct sock *sk, u32 ack, u32 acked)
{}

static u32 tcp_illinois_ssthresh(struct sock *sk)
{}

/* Extract info for Tcp socket info provided via netlink. */
static size_t tcp_illinois_info(struct sock *sk, u32 ext, int *attr,
				union tcp_cc_info *info)
{}

static struct tcp_congestion_ops tcp_illinois __read_mostly =;

static int __init tcp_illinois_register(void)
{}

static void __exit tcp_illinois_unregister(void)
{}

module_init();
module_exit(tcp_illinois_unregister);

MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_VERSION();