@@ -581,13 +581,13 @@ mptcp_for_each_sk(mpcb, sk_it) {
581581if (!skb )
582582 return NULL ;
583583
584- if (* reinject ) {
585- * subsk = ratio_get_available_subflow (meta_sk , skb , false);
586- if (!* subsk )
587- return NULL ;
584+ if (* reinject ) {
585+ * subsk = ratio_get_available_subflow (meta_sk , skb , false);
586+ if (!* subsk )
587+ return NULL ;
588588
589- return skb ;
590- }
589+ return skb ;
590+ }
591591
592592
593593retry :
@@ -1108,7 +1108,7 @@ last_rate = 0;
11081108
11091109goto reset;
11101110}*/
1111- if (sysctl_mptcp_ratio_trigger_search ) {
1111+ if (sysctl_mptcp_ratio_trigger_search ) {//Manual trigger
11121112 sysctl_mptcp_ratio_trigger_search = 0 ;
11131113 goto search_start ;
11141114}
@@ -1232,8 +1232,8 @@ if (!meta_tp->rate_delivered && !last_rate) {
12321232}
12331233
12341234// Trigger search or not
1235- printk ("in_search:%d" ,in_search );
1236- printk ("last_rate: %d" , last_rate );
1235+ // printk("in_search:%d",in_search);
1236+ // printk("last_rate: %d", last_rate);
12371237//printk("sysctl_mptcp_ratio_static %d",sysctl_mptcp_ratio_static);
12381238if (!in_search && last_rate && !sysctl_mptcp_ratio_static ) {
12391239 //diff_last = (int)last_rate - (int)meta_tp->rate_delivered;
@@ -1255,11 +1255,11 @@ if (!in_search && last_rate && !sysctl_mptcp_ratio_static) {
12551255 buffer_diff = (int )buffer_total - (int )init_buffer_total ;
12561256 //printk("Curr_diff: %d, Buffer_diff: %d, Rate Trigger Threshold: %u", rate_diff, buffer_diff, trigger_threshold);
12571257 //if (abs(rate_diff) > sysctl_mptcp_trigger_threshold) {
1258- if (abs (rate_diff ) > trigger_threshold ) {
1259- buffer_threshold_cnt = 0 ;
1260- //printk("Cur rate - init_rate: %d - %f", meta_tp->rate_delivered, init_rate);
1261- threshold_cnt ++ ;
1262- //} else if (buffer_diff < -75000) {
1258+ if (abs (rate_diff ) > trigger_threshold ) {
1259+ buffer_threshold_cnt = 0 ;
1260+ //printk("Cur rate - init_rate: %d - %f", meta_tp->rate_delivered, init_rate);
1261+ threshold_cnt ++ ;
1262+ //} else if (buffer_diff < -75000) {
12631263} else if (buffer_diff < meta_tp -> buffer_trigger_threshold ) {
12641264 threshold_cnt = 0 ;
12651265 buffer_threshold_cnt ++ ;
@@ -1289,8 +1289,7 @@ if (!in_search && last_rate && !sysctl_mptcp_ratio_static) {
12891289 }*/
12901290
12911291if (!meta_tp -> init_search ) {
1292- //Initialize ratio seach, this only set one
1293- printk ("Search initiated\n" );
1292+ printk ("INITIAL SEARCH\n" );
12941293 meta_tp -> init_search = true;
12951294 goto search_start ;
12961295}
@@ -1310,19 +1309,29 @@ if (buffer_threshold_cnt == 5 || threshold_cnt == 3) {
13101309 goto nosearch ;
13111310 }
13121311search_start :
1313- printk ("Search started\n" );
1312+ printk ("SEARCH START:\n" );
1313+ if (buffer_threshold_cnt == 5 )
1314+ {
1315+ printk ("DECREASED SEND QUEUE\n" );
1316+ }
1317+ else if (threshold_cnt == 3 )
1318+ {
1319+ printk ("DECREASED THROUGHPUT\n" );
1320+ }
1321+ else
1322+ {
1323+ printk ("INITIAL or PERIODIC SEARCH\n" );
1324+ }
13141325 in_search = true;
13151326 threshold_cnt = 0 ;
13161327 buffer_threshold_cnt = 0 ;
13171328 meta_tp -> ratio_rate_sample = 200 ;
13181329 last_trigger_tstamp = jiffies ;
13191330 if (meta_tp -> num_segments_flow_one < (100 - abs (meta_tp -> ratio_search_step ))) {
1320- //Set ratio = ratio+5
13211331 meta_tp -> search_state = RIGHT_RATIO_SET ;
13221332 meta_tp -> num_segments_flow_one += meta_tp -> ratio_search_step ;
13231333 }
13241334 else {
1325- //Set ratio = ratio+-5
13261335 meta_tp -> search_state = SEARCH_RATE ;
13271336 meta_tp -> ratio_search_step = -1 * abs (meta_tp -> ratio_search_step );
13281337 meta_tp -> num_segments_flow_one += meta_tp -> ratio_search_step ;
@@ -1333,7 +1342,7 @@ if (buffer_threshold_cnt == 5 || threshold_cnt == 3) {
13331342 do_div (last_rate , 3 );
13341343 goto reset ;
13351344nosearch :
1336- printk ("Search skipped \n" );
1345+ printk ("NO SEARCH \n" );
13371346 last_rate = 0 ;
13381347 threshold_cnt = 0 ;
13391348 buffer_threshold_cnt = 0 ;
@@ -1358,7 +1367,6 @@ if (in_search) {
13581367 case RIGHT_RATIO_SET :
13591368 printk ("RIGHT_RATIO_SET" );
13601369 if (meta_tp -> rate_delivered > last_rate + 5 ) {
1361- //printk("Next ratio?: %d", meta_tp->num_segments_flow_one + meta_tp->ratio_search_step);
13621370 if (meta_tp -> num_segments_flow_one + meta_tp -> ratio_search_step < 100 ) {
13631371 meta_tp -> num_segments_flow_one += meta_tp -> ratio_search_step ;
13641372 meta_tp -> search_state = SEARCH_RATE ;
@@ -1404,7 +1412,7 @@ if (in_search) {
14041412 case SEARCH_RATE :
14051413 printk ("SEARCH_RATE" );
14061414 if (meta_tp -> rate_delivered < last_rate ) {
1407- printk ("meta_tp->rate_delivered < last_rate" );
1415+ // printk("meta_tp->rate_delivered < last_rate");
14081416 meta_tp -> num_segments_flow_one -= meta_tp -> ratio_search_step ;
14091417 meta_tp -> ratio_search_step = abs (meta_tp -> ratio_search_step );
14101418 if (meta_tp -> num_segments_flow_one + meta_tp -> ratio_search_step /2 < 100 ) {
@@ -1416,7 +1424,7 @@ if (in_search) {
14161424 }
14171425 goto reset ;
14181426 } else {
1419- printk ("meta_tp->rate_delivered > last_rate" );
1427+ // printk("meta_tp->rate_delivered > last_rate");
14201428 if (meta_tp -> num_segments_flow_one + meta_tp -> ratio_search_step < 100 && meta_tp -> num_segments_flow_one + meta_tp -> ratio_search_step > 0 )
14211429 meta_tp -> num_segments_flow_one += meta_tp -> ratio_search_step ;
14221430 else {
0 commit comments