fix broadcast handling for clos topols
This commit is contained in:
parent
c9f555c993
commit
46a379632b
|
@ -159,7 +159,11 @@ while (!pqueue.empty()) {
|
|||
printf("packet for port: %x\n", send_to_port);
|
||||
printf("packet timestamp: %ld\n", tsp->timestamp);
|
||||
if (send_to_port == BROADCAST_ADJUSTED) {
|
||||
for (int i = 0; i < NUMPORTS; i++) {
|
||||
#define ADDUPLINK (NUMUPLINKS > 0 ? 1 : 0)
|
||||
// this will only send broadcasts to the first (zeroeth) uplink.
|
||||
// on a switch receiving broadcast packet from an uplink, this should
|
||||
// automatically prevent switch from sending the broadcast to any uplink
|
||||
for (int i = 0; i < NUMDOWNLINKS + ADDUPLINK; i++) {
|
||||
if (i != tsp->sender ) {
|
||||
switchpacket * tsp2 = (switchpacket*)malloc(sizeof(switchpacket));
|
||||
memcpy(tsp2, tsp, sizeof(switchpacket));
|
||||
|
|
Loading…
Reference in New Issue