linux/net/ipv4/tcp_dctcp.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* DataCenter TCP (DCTCP) congestion control.
 *
 * http://simula.stanford.edu/~alizade/Site/DCTCP.html
 *
 * This is an implementation of DCTCP over Reno, an enhancement to the
 * TCP congestion control algorithm designed for data centers. DCTCP
 * leverages Explicit Congestion Notification (ECN) in the network to
 * provide multi-bit feedback to the end hosts. DCTCP's goal is to meet
 * the following three data center transport requirements:
 *
 *  - High burst tolerance (incast due to partition/aggregate)
 *  - Low latency (short flows, queries)
 *  - High throughput (continuous data updates, large file transfers)
 *    with commodity shallow buffered switches
 *
 * The algorithm is described in detail in the following two papers:
 *
 * 1) Mohammad Alizadeh, Albert Greenberg, David A. Maltz, Jitendra Padhye,
 *    Parveen Patel, Balaji Prabhakar, Sudipta Sengupta, and Murari Sridharan:
 *      "Data Center TCP (DCTCP)", Data Center Networks session
 *      Proc. ACM SIGCOMM, New Delhi, 2010.
 *   http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp-final.pdf
 *
 * 2) Mohammad Alizadeh, Adel Javanmard, and Balaji Prabhakar:
 *      "Analysis of DCTCP: Stability, Convergence, and Fairness"
 *      Proc. ACM SIGMETRICS, San Jose, 2011.
 *   http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp_analysis-full.pdf
 *
 * Initial prototype from Abdul Kabbani, Masato Yasuda and Mohammad Alizadeh.
 *
 * Authors:
 *
 *	Daniel Borkmann <[email protected]>
 *	Florian Westphal <[email protected]>
 *	Glenn Judd <[email protected]>
 */

#include <linux/btf.h>
#include <linux/btf_ids.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <net/tcp.h>
#include <linux/inet_diag.h>
#include "tcp_dctcp.h"

#define DCTCP_MAX_ALPHA

struct dctcp {};

static unsigned int dctcp_shift_g __read_mostly =; /* g = 1/2^4 */

static int dctcp_shift_g_set(const char *val, const struct kernel_param *kp)
{}

static const struct kernel_param_ops dctcp_shift_g_ops =;

module_param_cb();
MODULE_PARM_DESC();

static unsigned int dctcp_alpha_on_init __read_mostly =;
module_param(dctcp_alpha_on_init, uint, 0644);
MODULE_PARM_DESC();

static struct tcp_congestion_ops dctcp_reno;

static void dctcp_reset(const struct tcp_sock *tp, struct dctcp *ca)
{}

__bpf_kfunc static void dctcp_init(struct sock *sk)
{}

__bpf_kfunc static u32 dctcp_ssthresh(struct sock *sk)
{}

__bpf_kfunc static void dctcp_update_alpha(struct sock *sk, u32 flags)
{}

static void dctcp_react_to_loss(struct sock *sk)
{}

__bpf_kfunc static void dctcp_state(struct sock *sk, u8 new_state)
{}

__bpf_kfunc static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
{}

static size_t dctcp_get_info(struct sock *sk, u32 ext, int *attr,
			     union tcp_cc_info *info)
{}

__bpf_kfunc static u32 dctcp_cwnd_undo(struct sock *sk)
{}

static struct tcp_congestion_ops dctcp __read_mostly =;

static struct tcp_congestion_ops dctcp_reno __read_mostly =;

BTF_KFUNCS_START(tcp_dctcp_check_kfunc_ids)
BTF_ID_FLAGS()
BTF_ID_FLAGS()
BTF_ID_FLAGS()
BTF_ID_FLAGS()
BTF_ID_FLAGS()
BTF_ID_FLAGS()
BTF_KFUNCS_END()

static const struct btf_kfunc_id_set tcp_dctcp_kfunc_set =;

static int __init dctcp_register(void)
{}

static void __exit dctcp_unregister(void)
{}

module_init();
module_exit(dctcp_unregister);

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_AUTHOR();

MODULE_LICENSE();
MODULE_DESCRIPTION();