Commit 8ca885e3 authored by NILANJAN DAW's avatar NILANJAN DAW

Bug Fix - Fixed bug where hot keys were routed to a particular IP

-- Controller IP made dynamic (now set via Control Plane)
-- Also fixed minor controller.py crash bug
parent be13de7c
......@@ -9,4 +9,4 @@ generator/hot.txt
generator/kv.txt
generator/query.txt
log*
*log*
......@@ -51,6 +51,7 @@ f.close()
# Listen hot report
f = open(path_log, "w")
counter = 0
while True:
packet, addr = s.recvfrom(2048)
# print(packet, addr)
......
4 (129, 130, 129, 129)
8 (132, 129, 129, 132)
12 (134, 129, 135, 134)
16 (133, 131, 129, 133)
20 (133, 131, 129, 133)
22 (132, 132, 129, 132)
28 (138, 133, 129, 138)
32 (131, 129, 129, 131)
38 (133, 129, 129, 133)
36 (143, 135, 129, 143)
46 (140, 142, 129, 140)
44 (145, 138, 129, 145)
74 (149, 131, 129, 149)
62 (135, 135, 129, 135)
54 (136, 136, 129, 136)
60 (144, 134, 129, 144)
70 (152, 129, 132, 152)
84 (146, 131, 129, 146)
78 (159, 140, 129, 159)
82 (137, 130, 129, 137)
92 (151, 133, 129, 151)
......@@ -24,6 +24,9 @@ table_set_default hh_bf_2 hh_bf_2_act
table_set_default hh_bf_3 hh_bf_3_act
table_set_default clone_to_controller clone_to_controller_act
table_set_default report_hot report_hot_act
table_add report_hot report_hot_act 10.0.0.2 => 10.0.0.3
table_add report_hot report_hot_act 10.0.0.4 => 10.0.0.5
mirroring_add 1 1
mirroring_add 2 2
mirroring_add 3 3
......
......@@ -23,7 +23,8 @@ table_set_default hh_bf_1 hh_bf_1_act
table_set_default hh_bf_2 hh_bf_2_act
table_set_default hh_bf_3 hh_bf_3_act
table_set_default clone_to_controller clone_to_controller_act
table_set_default report_hot report_hot_act
table_add report_hot report_hot_act 10.0.0.2 => 10.0.0.3
table_add report_hot report_hot_act 10.0.0.4 => 10.0.0.5
mirroring_add 1 1
mirroring_add 2 2
mirroring_add 3 3
......
......@@ -22,7 +22,8 @@ table_set_default hh_bf_1 hh_bf_1_act
table_set_default hh_bf_2 hh_bf_2_act
table_set_default hh_bf_3 hh_bf_3_act
table_set_default clone_to_controller clone_to_controller_act
table_set_default report_hot report_hot_act
table_add report_hot report_hot_act 10.0.0.2 => 10.0.0.3
table_add report_hot report_hot_act 10.0.0.4 => 10.0.0.5
mirroring_add 1 1
mirroring_add 2 2
mirroring_add 3 3
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -227,7 +227,7 @@ control report_hot_step_1 {
}
#define CONTROLLER_IP 0x0a000003
action report_hot_act() {
action report_hot_act(controller_ip) {
modify_field (nc_hdr.op, NC_HOT_READ_REQUEST);
add_header (nc_load);
......@@ -238,10 +238,13 @@ action report_hot_act() {
modify_field (nc_load.load_3, nc_load_md.load_3);
modify_field (nc_load.load_4, nc_load_md.load_4);
modify_field (ipv4.dstAddr, CONTROLLER_IP);
modify_field (ipv4.dstAddr, controller_ip);
}
table report_hot {
reads {
ipv4.dstAddr: exact;
}
actions {
report_hot_act;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment