Annotation of wikisrc/projects/project/fast_protocol.mdwn, revision 1.1

1.1     ! jmmv        1: [[!template id=project
        !             2: 
        !             3: title="Fast protocol and port demultiplexing"
        !             4: 
        !             5: contact="""
        !             6: [tech-kern](mailto:tech-kern@NetBSD.org),
        !             7: [tech-net](mailto:tech-net@NetBSD.org),
        !             8: [board](mailto:board@NetBSD.org),
        !             9: [core](mailto:core@NetBSD.org)
        !            10: """
        !            11: 
        !            12: category="networking"
        !            13: difficulty="hard"
        !            14: funded="The NetBSD Foundation"
        !            15: 
        !            16: description="""
        !            17: This project proposal is a subtask of [[smp_networking]] and is elegible
        !            18: for funding independently.
        !            19: 
        !            20: The goal of this project is to enhance the networking protocols to process
        !            21: incoming packets more efficiently.  The basic idea is the following: when a
        !            22: packet is received and it is destined for a socket, simply place the packet
        !            23: in the socket's receive PCQ (see [[atomic_pcq]]) and wake the blocking
        !            24: socket.  Then, the protocol is able to process the next packet.
        !            25: 
        !            26: The typical packet flow from `ip_input` is to `{rip,tcp,udp}_input` which:
        !            27: 
        !            28: * Does the lookup to locate the socket which takes a reader lock on the
        !            29:   appropriate pcbtable's hash bucket.
        !            30: * If found and in the proper state:
        !            31:   * Do not lock the socket since that would might block and therefore stop
        !            32:     packet demultiplexing.
        !            33:   * `pcq_put` the packet to the pcb's pcq.
        !            34:   * `kcont_schedule` the worker continuation with small delay (~100ms).
        !            35:     See [[kernel_continuations]].
        !            36:   * Lock the socket's `cvmutex`.
        !            37:   * Release the pcbtable lock.
        !            38:   * If TCP and in sequence, then if we need to send an immediate ACK:
        !            39:     * Try to lock the socket.
        !            40:     * If successful, send an ACK.
        !            41:   * Set a flag to process the PCQ.
        !            42:   * `cv_signal` the socket's cv.
        !            43:   * Release the cvmutex.
        !            44: * If not found or not in the proper state:
        !            45:   * Release the pcb hash table lock.
        !            46: """
        !            47: ]]
        !            48: 
        !            49: [[!tag smp_networking]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb