亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tcp_lp.c

?? linux 內核源代碼
?? C
字號:
/* * TCP Low Priority (TCP-LP) * * TCP Low Priority is a distributed algorithm whose goal is to utilize only *   the excess network bandwidth as compared to the ``fair share`` of *   bandwidth as targeted by TCP. * * As of 2.6.13, Linux supports pluggable congestion control algorithms. * Due to the limitation of the API, we take the following changes from * the original TCP-LP implementation: *   o We use newReno in most core CA handling. Only add some checking *     within cong_avoid. *   o Error correcting in remote HZ, therefore remote HZ will be keeped *     on checking and updating. *   o Handling calculation of One-Way-Delay (OWD) within rtt_sample, sicne *     OWD have a similar meaning as RTT. Also correct the buggy formular. *   o Handle reaction for Early Congestion Indication (ECI) within *     pkts_acked, as mentioned within pseudo code. *   o OWD is handled in relative format, where local time stamp will in *     tcp_time_stamp format. * * Original Author: *   Aleksandar Kuzmanovic <akuzma@northwestern.edu> * Available from: *   http://www.ece.rice.edu/~akuzma/Doc/akuzma/TCP-LP.pdf * Original implementation for 2.4.19: *   http://www-ece.rice.edu/networks/TCP-LP/ * * 2.6.x module Authors: *   Wong Hoi Sing, Edison <hswong3i@gmail.com> *   Hung Hing Lun, Mike <hlhung3i@gmail.com> * SourceForge project page: *   http://tcp-lp-mod.sourceforge.net/ */#include <linux/module.h>#include <net/tcp.h>/* resolution of owd */#define LP_RESOL       1000/** * enum tcp_lp_state * @LP_VALID_RHZ: is remote HZ valid? * @LP_VALID_OWD: is OWD valid? * @LP_WITHIN_THR: are we within threshold? * @LP_WITHIN_INF: are we within inference? * * TCP-LP's state flags. * We create this set of state flag mainly for debugging. */enum tcp_lp_state {	LP_VALID_RHZ = (1 << 0),	LP_VALID_OWD = (1 << 1),	LP_WITHIN_THR = (1 << 3),	LP_WITHIN_INF = (1 << 4),};/** * struct lp * @flag: TCP-LP state flag * @sowd: smoothed OWD << 3 * @owd_min: min OWD * @owd_max: max OWD * @owd_max_rsv: resrved max owd * @remote_hz: estimated remote HZ * @remote_ref_time: remote reference time * @local_ref_time: local reference time * @last_drop: time for last active drop * @inference: current inference * * TCP-LP's private struct. * We get the idea from original TCP-LP implementation where only left those we * found are really useful. */struct lp {	u32 flag;	u32 sowd;	u32 owd_min;	u32 owd_max;	u32 owd_max_rsv;	u32 remote_hz;	u32 remote_ref_time;	u32 local_ref_time;	u32 last_drop;	u32 inference;};/** * tcp_lp_init * * Init all required variables. * Clone the handling from Vegas module implementation. */static void tcp_lp_init(struct sock *sk){	struct lp *lp = inet_csk_ca(sk);	lp->flag = 0;	lp->sowd = 0;	lp->owd_min = 0xffffffff;	lp->owd_max = 0;	lp->owd_max_rsv = 0;	lp->remote_hz = 0;	lp->remote_ref_time = 0;	lp->local_ref_time = 0;	lp->last_drop = 0;	lp->inference = 0;}/** * tcp_lp_cong_avoid * * Implementation of cong_avoid. * Will only call newReno CA when away from inference. * From TCP-LP's paper, this will be handled in additive increasement. */static void tcp_lp_cong_avoid(struct sock *sk, u32 ack, u32 in_flight, int flag){	struct lp *lp = inet_csk_ca(sk);	if (!(lp->flag & LP_WITHIN_INF))		tcp_reno_cong_avoid(sk, ack, in_flight, flag);}/** * tcp_lp_remote_hz_estimator * * Estimate remote HZ. * We keep on updating the estimated value, where original TCP-LP * implementation only guest it for once and use forever. */static u32 tcp_lp_remote_hz_estimator(struct sock *sk){	struct tcp_sock *tp = tcp_sk(sk);	struct lp *lp = inet_csk_ca(sk);	s64 rhz = lp->remote_hz << 6;	/* remote HZ << 6 */	s64 m = 0;	/* not yet record reference time	 * go away!! record it before come back!! */	if (lp->remote_ref_time == 0 || lp->local_ref_time == 0)		goto out;	/* we can't calc remote HZ with no different!! */	if (tp->rx_opt.rcv_tsval == lp->remote_ref_time	    || tp->rx_opt.rcv_tsecr == lp->local_ref_time)		goto out;	m = HZ * (tp->rx_opt.rcv_tsval -		  lp->remote_ref_time) / (tp->rx_opt.rcv_tsecr -					  lp->local_ref_time);	if (m < 0)		m = -m;	if (rhz > 0) {		m -= rhz >> 6;	/* m is now error in remote HZ est */		rhz += m;	/* 63/64 old + 1/64 new */	} else		rhz = m << 6; out:	/* record time for successful remote HZ calc */	if ((rhz >> 6) > 0)		lp->flag |= LP_VALID_RHZ;	else		lp->flag &= ~LP_VALID_RHZ;	/* record reference time stamp */	lp->remote_ref_time = tp->rx_opt.rcv_tsval;	lp->local_ref_time = tp->rx_opt.rcv_tsecr;	return rhz >> 6;}/** * tcp_lp_owd_calculator * * Calculate one way delay (in relative format). * Original implement OWD as minus of remote time difference to local time * difference directly. As this time difference just simply equal to RTT, when * the network status is stable, remote RTT will equal to local RTT, and result * OWD into zero. * It seems to be a bug and so we fixed it. */static u32 tcp_lp_owd_calculator(struct sock *sk){	struct tcp_sock *tp = tcp_sk(sk);	struct lp *lp = inet_csk_ca(sk);	s64 owd = 0;	lp->remote_hz = tcp_lp_remote_hz_estimator(sk);	if (lp->flag & LP_VALID_RHZ) {		owd =		    tp->rx_opt.rcv_tsval * (LP_RESOL / lp->remote_hz) -		    tp->rx_opt.rcv_tsecr * (LP_RESOL / HZ);		if (owd < 0)			owd = -owd;	}	if (owd > 0)		lp->flag |= LP_VALID_OWD;	else		lp->flag &= ~LP_VALID_OWD;	return owd;}/** * tcp_lp_rtt_sample * * Implementation or rtt_sample. * Will take the following action, *   1. calc OWD, *   2. record the min/max OWD, *   3. calc smoothed OWD (SOWD). * Most ideas come from the original TCP-LP implementation. */static void tcp_lp_rtt_sample(struct sock *sk, u32 rtt){	struct lp *lp = inet_csk_ca(sk);	s64 mowd = tcp_lp_owd_calculator(sk);	/* sorry that we don't have valid data */	if (!(lp->flag & LP_VALID_RHZ) || !(lp->flag & LP_VALID_OWD))		return;	/* record the next min owd */	if (mowd < lp->owd_min)		lp->owd_min = mowd;	/* always forget the max of the max	 * we just set owd_max as one below it */	if (mowd > lp->owd_max) {		if (mowd > lp->owd_max_rsv) {			if (lp->owd_max_rsv == 0)				lp->owd_max = mowd;			else				lp->owd_max = lp->owd_max_rsv;			lp->owd_max_rsv = mowd;		} else			lp->owd_max = mowd;	}	/* calc for smoothed owd */	if (lp->sowd != 0) {		mowd -= lp->sowd >> 3;	/* m is now error in owd est */		lp->sowd += mowd;	/* owd = 7/8 owd + 1/8 new */	} else		lp->sowd = mowd << 3;	/* take the measured time be owd */}/** * tcp_lp_pkts_acked * * Implementation of pkts_acked. * Deal with active drop under Early Congestion Indication. * Only drop to half and 1 will be handle, because we hope to use back * newReno in increase case. * We work it out by following the idea from TCP-LP's paper directly */static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked, s32 rtt_us){	struct tcp_sock *tp = tcp_sk(sk);	struct lp *lp = inet_csk_ca(sk);	if (rtt_us > 0)		tcp_lp_rtt_sample(sk, rtt_us);	/* calc inference */	if (tcp_time_stamp > tp->rx_opt.rcv_tsecr)		lp->inference = 3 * (tcp_time_stamp - tp->rx_opt.rcv_tsecr);	/* test if within inference */	if (lp->last_drop && (tcp_time_stamp - lp->last_drop < lp->inference))		lp->flag |= LP_WITHIN_INF;	else		lp->flag &= ~LP_WITHIN_INF;	/* test if within threshold */	if (lp->sowd >> 3 <	    lp->owd_min + 15 * (lp->owd_max - lp->owd_min) / 100)		lp->flag |= LP_WITHIN_THR;	else		lp->flag &= ~LP_WITHIN_THR;	pr_debug("TCP-LP: %05o|%5u|%5u|%15u|%15u|%15u\n", lp->flag,		 tp->snd_cwnd, lp->remote_hz, lp->owd_min, lp->owd_max,		 lp->sowd >> 3);	if (lp->flag & LP_WITHIN_THR)		return;	/* FIXME: try to reset owd_min and owd_max here	 * so decrease the chance the min/max is no longer suitable	 * and will usually within threshold when whithin inference */	lp->owd_min = lp->sowd >> 3;	lp->owd_max = lp->sowd >> 2;	lp->owd_max_rsv = lp->sowd >> 2;	/* happened within inference	 * drop snd_cwnd into 1 */	if (lp->flag & LP_WITHIN_INF)		tp->snd_cwnd = 1U;	/* happened after inference	 * cut snd_cwnd into half */	else		tp->snd_cwnd = max(tp->snd_cwnd >> 1U, 1U);	/* record this drop time */	lp->last_drop = tcp_time_stamp;}static struct tcp_congestion_ops tcp_lp = {	.flags = TCP_CONG_RTT_STAMP,	.init = tcp_lp_init,	.ssthresh = tcp_reno_ssthresh,	.cong_avoid = tcp_lp_cong_avoid,	.min_cwnd = tcp_reno_min_cwnd,	.pkts_acked = tcp_lp_pkts_acked,	.owner = THIS_MODULE,	.name = "lp"};static int __init tcp_lp_register(void){	BUILD_BUG_ON(sizeof(struct lp) > ICSK_CA_PRIV_SIZE);	return tcp_register_congestion_control(&tcp_lp);}static void __exit tcp_lp_unregister(void){	tcp_unregister_congestion_control(&tcp_lp);}module_init(tcp_lp_register);module_exit(tcp_lp_unregister);MODULE_AUTHOR("Wong Hoi Sing Edison, Hung Hing Lun Mike");MODULE_LICENSE("GPL");MODULE_DESCRIPTION("TCP Low Priority");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区免费在线观看| 精品国产一区二区精华| 日韩女同互慰一区二区| 国产欧美一区二区精品性 | 欧美体内she精高潮| 国产校园另类小说区| 亚洲成人av福利| 一本大道久久a久久精品综合| 欧美精品一区二区精品网| 亚洲国产视频在线| 99v久久综合狠狠综合久久| 久久久欧美精品sm网站| 日韩电影在线看| 欧美日韩中文另类| 亚洲欧美视频一区| 波多野洁衣一区| 久久精品亚洲精品国产欧美| 免费成人av资源网| 91精品在线免费| 日韩黄色片在线观看| 色哟哟在线观看一区二区三区| 中文字幕成人在线观看| 国产大陆亚洲精品国产| 久久亚洲欧美国产精品乐播 | 亚洲午夜一区二区| 91女人视频在线观看| 国产精品久久久久久久久免费丝袜 | 亚洲图片另类小说| 不卡电影免费在线播放一区| 欧美国产日韩亚洲一区| 国产盗摄一区二区三区| 国产精品欧美久久久久一区二区 | 国产精品污www在线观看| 国产91精品精华液一区二区三区| 久久久蜜桃精品| 国产精品一区二区三区99| wwwwww.欧美系列| 国产精品综合二区| 中文字幕av一区 二区| 成人免费福利片| 亚洲欧美视频在线观看视频| 在线亚洲欧美专区二区| 亚洲午夜私人影院| 51久久夜色精品国产麻豆| 麻豆精品视频在线观看视频| 久久婷婷综合激情| av资源站一区| 亚洲成人av免费| 久久嫩草精品久久久精品一| 成人晚上爱看视频| 亚洲精品欧美激情| 欧美一级片在线观看| 国产毛片精品国产一区二区三区| 中文成人综合网| 欧洲一区在线观看| 精品一区二区在线看| 中文字幕在线不卡视频| 欧美三级一区二区| 国产在线观看一区二区| 亚洲欧洲av另类| 欧美一级午夜免费电影| 国产成人免费视频网站高清观看视频| 亚洲欧洲精品一区二区三区| 欧美一区二区免费视频| 成人免费观看av| 美女网站色91| 亚洲三级视频在线观看| 精品国产青草久久久久福利| k8久久久一区二区三区| 免费成人结看片| 伊人性伊人情综合网| 久久一留热品黄| 欧美嫩在线观看| 北条麻妃国产九九精品视频| 蜜乳av一区二区三区| 日韩久久一区二区| 久久久久久久久97黄色工厂| 欧美亚洲日本一区| 成人性生交大片免费看中文 | 91网站在线播放| 极品少妇一区二区三区精品视频 | 中文字幕亚洲不卡| 日韩欧美国产一区二区在线播放 | 久久久久国产精品麻豆ai换脸 | 免费久久99精品国产| 成人欧美一区二区三区白人| 精品久久久久久综合日本欧美| 色婷婷久久综合| 不卡大黄网站免费看| 国产一区二区三区四区五区美女| 亚洲成av人综合在线观看| 国产精品国产三级国产三级人妇| 精品国产自在久精品国产| 在线观看免费亚洲| 色综合天天性综合| 在线观看不卡一区| 成人性视频网站| 国产精品一二三四五| 久久不见久久见免费视频1| 亚洲一区二区视频| 亚洲精品v日韩精品| 亚洲欧洲色图综合| 欧美国产视频在线| 国产欧美精品一区| 欧美激情中文不卡| 国产欧美一区二区精品久导航 | 久久人人97超碰com| 日韩视频一区在线观看| 在线成人高清不卡| 3d成人h动漫网站入口| 欧美另类高清zo欧美| 在线亚洲人成电影网站色www| 波多野结衣亚洲一区| 99久久国产综合精品女不卡| 成人18视频日本| 国产69精品久久久久毛片| 国产精品一区二区在线看| 国产一区二区不卡| 成人午夜在线播放| 91网站最新网址| 欧美日韩一区二区三区四区 | 亚洲国产成人午夜在线一区| 国产三区在线成人av| 中文字幕不卡在线播放| 亚洲三级视频在线观看| 亚洲福利视频导航| 另类欧美日韩国产在线| 国产麻豆欧美日韩一区| 成人精品视频一区二区三区 | 99国产精品久| 欧美私模裸体表演在线观看| 91麻豆精品国产无毒不卡在线观看| 8x福利精品第一导航| 久久综合色之久久综合| 亚洲国产日韩av| 亚洲va欧美va人人爽| 久久99国产精品尤物| 国产超碰在线一区| 色哟哟日韩精品| 日韩欧美在线网站| 国产精品嫩草影院av蜜臀| 亚洲综合一区在线| 久久国产精品露脸对白| 99久久夜色精品国产网站| 欧美色综合网站| 欧美精品一区二区三区高清aⅴ | 高清在线观看日韩| 在线免费av一区| 欧美成人一级视频| 最新高清无码专区| 另类小说综合欧美亚洲| 成人国产一区二区三区精品| 欧美三级日本三级少妇99| 欧美精品一区二区三区一线天视频 | 亚洲国产精品ⅴa在线观看| 亚洲永久精品国产| 成人一区二区三区视频在线观看| 欧美午夜片在线看| 中文字幕欧美激情| 日韩va亚洲va欧美va久久| 成人av资源网站| 日韩视频一区二区在线观看| 亚洲欧美偷拍三级| 国产盗摄女厕一区二区三区 | 欧美日韩精品综合在线| 欧美高清在线精品一区| 蜜桃精品视频在线| 欧美综合在线视频| 中文字幕第一区综合| 国内精品不卡在线| 欧美精品日韩一区| 亚洲美女一区二区三区| 成人小视频免费在线观看| 欧美电影免费观看高清完整版在 | 一区精品在线播放| 国产剧情一区二区| 91精品视频网| 亚洲成人动漫在线免费观看| 91在线精品一区二区三区| 国产午夜精品福利| 美女网站在线免费欧美精品| 欧美日韩精品欧美日韩精品| 亚洲视频电影在线| 成人av在线资源| 久久久不卡网国产精品一区| 日本成人中文字幕在线视频| 欧美日本在线看| 午夜婷婷国产麻豆精品| 欧洲人成人精品| 亚洲成在人线免费| 欧美日韩一区二区三区高清| 亚洲一区二区三区四区五区黄| av成人免费在线观看| 亚洲国产经典视频| 99久久久精品免费观看国产蜜| 国产精品久久久久久久久快鸭 | 91在线一区二区三区| 国产精品对白交换视频| 成人h动漫精品| 国产精品理论片|