Ignore:
Timestamp:
Feb 15, 2015, 8:44:35 PM (10 years ago)
Author:
cfuguet
Message:

reconf: add new mode to the dspin_router

  • Modes are:

+ NORMAL : normal X-first routing

+ PATH_RECOVERY : create contour around the blackhole.

If the destination is the blackhole, send
packet to recovery direction, else use normal
X-first routing.

+ SEGMENT_RECOVERY: Like PATH_RECOVERY but do not create contour, only

reroute packets with the blackhole as destination.

  • Remove deprecated unitary test simple_recovery_routing_test
  • Update the simple_segment_recovery unitary test.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/main.c

    r942 r947  
    2525    /* configure the routers around the blackhole (1, 1) to define a cycle-free
    2626     * contour */
     27    const int PATH_RECOVERY = 1;
    2728    uint32_t val;
    2829
    2930    printf("router(0, 2): configuring as NW\n");
    3031    assert(xcu_get_register(0, 2, XICU_CFG_REG, 0) == BH_NONE);
    31     val = (REQ_SOUTH << 4) | BH_NW;
     32    val = (PATH_RECOVERY << 7) | (REQ_SOUTH << 4) | BH_NW;
    3233    xcu_set_register(0, 2, XICU_CFG_REG, 0, val);     /* configure NW */
    3334
    3435    printf("router(0, 1): configuring as W\n");
    3536    assert(xcu_get_register(0, 1, XICU_CFG_REG, 0) == BH_NONE);
    36     val = (REQ_LOCAL << 4) | BH_W;
     37    val = (PATH_RECOVERY << 7) | (REQ_LOCAL << 4) | BH_W;
    3738    xcu_set_register(0, 1, XICU_CFG_REG, 0, val);     /* configure W */
    3839
    3940    printf("router(0, 0): configuring as SW\n");
    4041    assert(xcu_get_register(0, 0, XICU_CFG_REG, 0) == BH_NONE);
    41     val = (REQ_NORTH << 4) | BH_SW;
     42    val = (PATH_RECOVERY << 7) | (REQ_NORTH << 4) | BH_SW;
    4243    xcu_set_register(0, 0, XICU_CFG_REG, 0, val);     /* configure SW */
    4344
    4445    printf("router(1, 2): configuring as N\n");
    4546    assert(xcu_get_register(1, 2, XICU_CFG_REG, 0) == BH_NONE);
    46     val = (REQ_WEST << 4) | BH_N;
     47    val = (PATH_RECOVERY << 7) | (REQ_WEST << 4) | BH_N;
    4748    xcu_set_register(1, 2, XICU_CFG_REG, 0, val);     /* configure N */
    4849
    4950    printf("router(2, 2): configuring as NE\n");
    5051    assert(xcu_get_register(2, 2, XICU_CFG_REG, 0) == BH_NONE);
    51     val = (REQ_WEST << 4) | BH_NE;
     52    val = (PATH_RECOVERY << 7) | (REQ_WEST << 4) | BH_NE;
    5253    xcu_set_register(2, 2, XICU_CFG_REG, 0, val);     /* configure NE */
    5354
    5455    printf("router(2, 1): configuring as E\n");
    5556    assert(xcu_get_register(2, 1, XICU_CFG_REG, 0) == BH_NONE);
    56     val = (REQ_SOUTH << 4) | BH_E;
     57    val = (PATH_RECOVERY << 7) | (REQ_SOUTH << 4) | BH_E;
    5758    xcu_set_register(2, 1, XICU_CFG_REG, 0, val);     /* configure E */
    5859
    5960    printf("router(2, 0): configuring as SE\n");
    6061    assert(xcu_get_register(2, 0, XICU_CFG_REG, 0) == BH_NONE);
    61     val = (REQ_WEST << 4) | BH_SE;
     62    val = (PATH_RECOVERY << 7) | (REQ_WEST << 4) | BH_SE;
    6263    xcu_set_register(2, 0, XICU_CFG_REG, 0, val);     /* configure SE */
    6364
    6465    printf("router(1, 0): configuring as S\n");
    6566    assert(xcu_get_register(1, 0, XICU_CFG_REG, 0) == BH_NONE);
    66     val = (REQ_WEST << 4) | BH_S;
     67    val = (PATH_RECOVERY << 7) | (REQ_WEST << 4) | BH_S;
    6768    xcu_set_register(1, 0, XICU_CFG_REG, 0, val);     /* configure S */
    6869
Note: See TracChangeset for help on using the changeset viewer.