diff options
author | michael-west <michael.west@ettus.com> | 2014-03-18 16:33:52 -0700 |
---|---|---|
committer | Nicholas Corgan <nick.corgan@ettus.com> | 2014-03-19 12:47:49 -0700 |
commit | 1c378003e591c5fbaffafbd810701a611dde8314 (patch) | |
tree | 86bdf7323130502caaf29de987489d05955bbe35 | |
parent | 839ee08d48027e3dc74c1b1cc59ed12a8aaef0c7 (diff) | |
download | uhd-1c378003e591c5fbaffafbd810701a611dde8314.tar.gz uhd-1c378003e591c5fbaffafbd810701a611dde8314.tar.bz2 uhd-1c378003e591c5fbaffafbd810701a611dde8314.zip |
BUG #396: Mid-Burst Sequence Errors
- Restored link state handling.
- Enabled forwarding of packets not addressed to this device's MAC address.
- Kept forwarding of broadcast packets disabled.
NOTE: This is a workaround and not a permanent fix.
-rw-r--r-- | firmware/x300/x300/x300_init.c | 3 | ||||
-rw-r--r-- | firmware/x300/x300/x300_main.c | 15 |
2 files changed, 10 insertions, 8 deletions
diff --git a/firmware/x300/x300/x300_init.c b/firmware/x300/x300/x300_init.c index 978168b09..66fb120f3 100644 --- a/firmware/x300/x300/x300_init.c +++ b/firmware/x300/x300/x300_init.c @@ -76,8 +76,7 @@ static void init_network(void) printf("PKT RAM0 BASE 0x%x\n", (&pkt_config)->base); u3_net_stack_init(&pkt_config); - //FIXME: Uncomment when feature is required - //link_state_route_proto_init(); + link_state_route_proto_init(); //read everything from eeprom static const uint8_t eeprom_cmd[2] = {0, 0}; //the command is 16 bits of address offset diff --git a/firmware/x300/x300/x300_main.c b/firmware/x300/x300/x300_main.c index 92368ec9c..809f181ba 100644 --- a/firmware/x300/x300/x300_main.c +++ b/firmware/x300/x300/x300_main.c @@ -372,22 +372,26 @@ static void handle_uarts(void) **********************************************************************/ static void update_forwarding(const uint8_t e) { - /* FIXME: This code is broken. + /* FIXME: This code is broken. * It blindly enables forwarding without regard to whether or not * packets can be forwarded. If one of the Ethernet interfaces is not * connected, data backs up until the first interface becomes unresponsive. - * Uncomment and fix when topologies requiring forwarding are supported. * + * And for more fun, we had to re-enable forwarding of packets that were not + * addressed to this device's MAC address to work around an issue that was + * causing sequence errors. + */ //update forwarding rules uint32_t forward = 0; if (!link_state_route_proto_causes_cycle_cached(e, (e+1)%2)) { - forward |= (1 << 0); //forward bcast + //FIXME: Uncomment when forwarding of broadcasts is properly handled + //forward |= (1 << 0); //forward bcast forward |= (1 << 1); //forward not mac dest } const uint32_t eth_base = (e == 0)? SR_ETHINT0 : SR_ETHINT1; wb_poke32(SR_ADDR(SET0_BASE, eth_base + 8 + 4), forward); - */ + } static void handle_link_state(void) @@ -445,8 +449,7 @@ int main(void) static const uint32_t tick_delta = CPU_CLOCK/1000; if (ticks_passed > tick_delta) { - //FIXME: Uncomment when feature is required - //handle_link_state(); //deal with router table update + handle_link_state(); //deal with router table update handle_claim(); //deal with the host claim register update_leds(); //run the link and activity leds garp(); //send periodic garps |