linux/net/dccp/ccids/ccid2.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright (c) 2005, 2006 Andrea Bittau <[email protected]>
 *
 *  Changes to meet Linux coding standards, and DCCP infrastructure fixes.
 *
 *  Copyright (c) 2006 Arnaldo Carvalho de Melo <[email protected]>
 */

/*
 * This implementation should follow RFC 4341
 */
#include <linux/slab.h>
#include "../feat.h"
#include "ccid2.h"


#ifdef CONFIG_IP_DCCP_CCID2_DEBUG
static bool ccid2_debug;
#define ccid2_pr_debug(format, a...)
#else
#define ccid2_pr_debug
#endif

static int ccid2_hc_tx_alloc_seq(struct ccid2_hc_tx_sock *hc)
{}

static int ccid2_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
{}

static void ccid2_change_l_ack_ratio(struct sock *sk, u32 val)
{}

static void ccid2_check_l_ack_ratio(struct sock *sk)
{}

static void ccid2_change_l_seq_window(struct sock *sk, u64 val)
{}

static void dccp_tasklet_schedule(struct sock *sk)
{}

static void ccid2_hc_tx_rto_expire(struct timer_list *t)
{}

/*
 *	Congestion window validation (RFC 2861).
 */
static bool ccid2_do_cwv =;
module_param(ccid2_do_cwv, bool, 0644);
MODULE_PARM_DESC();

/**
 * ccid2_update_used_window  -  Track how much of cwnd is actually used
 * @hc: socket to update window
 * @new_wnd: new window values to add into the filter
 *
 * This is done in addition to CWV. The sender needs to have an idea of how many
 * packets may be in flight, to set the local Sequence Window value accordingly
 * (RFC 4340, 7.5.2). The CWV mechanism is exploited to keep track of the
 * maximum-used window. We use an EWMA low-pass filter to filter out noise.
 */
static void ccid2_update_used_window(struct ccid2_hc_tx_sock *hc, u32 new_wnd)
{}

/* This borrows the code of tcp_cwnd_application_limited() */
static void ccid2_cwnd_application_limited(struct sock *sk, const u32 now)
{}

/* This borrows the code of tcp_cwnd_restart() */
static void ccid2_cwnd_restart(struct sock *sk, const u32 now)
{}

static void ccid2_hc_tx_packet_sent(struct sock *sk, unsigned int len)
{}

/**
 * ccid2_rtt_estimator - Sample RTT and compute RTO using RFC2988 algorithm
 * @sk: socket to perform estimator on
 * @mrtt: measured RTT
 *
 * This code is almost identical with TCP's tcp_rtt_estimator(), since
 * - it has a higher sampling frequency (recommended by RFC 1323),
 * - the RTO does not collapse into RTT due to RTTVAR going towards zero,
 * - it is simple (cf. more complex proposals such as Eifel timer or research
 *   which suggests that the gain should be set according to window size),
 * - in tests it was found to work well with CCID2 [gerrit].
 */
static void ccid2_rtt_estimator(struct sock *sk, const long mrtt)
{}

static void ccid2_new_ack(struct sock *sk, struct ccid2_seq *seqp,
			  unsigned int *maxincr)
{}

static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp)
{}

static int ccid2_hc_tx_parse_options(struct sock *sk, u8 packet_type,
				     u8 option, u8 *optval, u8 optlen)
{}

static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
{}

static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
{}

static void ccid2_hc_tx_exit(struct sock *sk)
{}

static void ccid2_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
{}

struct ccid_operations ccid2_ops =;

#ifdef CONFIG_IP_DCCP_CCID2_DEBUG
module_param(ccid2_debug, bool, 0644);
MODULE_PARM_DESC();
#endif