Giter Site home page Giter Site logo

nets-cs-pub-ro / ndp Goto Github PK

View Code? Open in Web Editor NEW
72.0 72.0 38.0 2.21 MB

NDP datacenter stack

License: BSD 2-Clause "Simplified" License

Makefile 2.62% C++ 48.78% C 18.37% Gnuplot 0.26% Python 3.27% Shell 0.95% Tcl 8.58% Verilog 16.89% P4 0.27% Awk 0.01%

ndp's People

Contributors

alexandruag avatar craiciu avatar marcinwoj avatar mhandley avatar vlolteanu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ndp's Issues

A bug found

Hi @craiciu, I experienced a bug in a case when running NDP code.

Here is the scenario, I have a message of two packets, the first packet gets payload trimmed, the second packet arrives at the receiver. The cut-payloaded packet of the first packet arrives at the receiver first, the second packet arrives at the receiver later. The receiver generates an NACK for the first packet with pull_no of 2, the receiver then generates an ACK for the second packet, and a PULL packet for the second packet with pull_no of 3; However, due to the multi-path, the PULL packet arrives at the sender earlier than the NACK packet; The PULL packet would first increase the _last_pull to be 3 in the function NdpSrc::pull_packets, because there is not any packet in the retransmission queue, nothing happens. The NACK packet arrives later and also call pull_packets function, because _last_pull has already increased to 3, the NACK packet would not trigger a retransmission. At the end, only timeout can help this packet gets retransmitted. However, as the code already erased the timer when process NACK packet. There is not any timer at retransmit_packet function, thus, no packets get retransmitted even timeout kicks in. At the end, this message never gets finished.

To fix this bug, below is the new function of NdpSrc::pull_packets. Does the change make sense to you?

void NdpSrc::pull_packets(NdpPull::seq_t pull_no, NdpPull::seq_t pacer_no) {
    // Pull number is cumulative both to allow for lost pulls and to
    // reduce reverse-path RTT - if one pull is delayed on one path, a
    // pull that gets there faster on another path can supercede it
    if(pull_no !=0 && pull_no <= _last_pull){
        send_packet(pacer_no);
    }else{
        while (_last_pull < pull_no) {
        send_packet(pacer_no);
        _last_pull++;
        }
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.