Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agentx thread #16986

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Commits on Oct 2, 2024

  1. lib: agentx change agentx_event_update prototype

    add "struct event *" parameter to agentx_event_update function.
    the function may be called via event_add*** functions.
    
    Signed-off-by: Francois Dumontet <[email protected]>
    fdumontet6WIND committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    81f7790 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. lib: Add threading and synchronization mechanisms for traps to AgentX

    - Introduce a dedicated AgentX thread using `frr_pthread`.
    
    - Add mutex locks (`ax_mtx`, `ax_io_mtx`) to manage thread
    synchronization for trap transfer and I/O operations.
    
    - Implemented ring buffers (`ibuf_ax`) for handling
    "master -> AgentX" communication, improving data handling
    between threads.
    
    - Update the SNMP read operations to use mutex locks to
    ensure thread-safe execution.
    
    - Integrated a new dedicated thread to send SNMP traps,
    ensuring separation of responsibilities between the main
    and AgentX threads.
    
    - Enhanced trap handling to support multi-index traps, with
    excess traps being discarded if the buffer is full,
    preventing overflow.
    
    - Enhanced trap handling to support multi-index traps.
    When more than "RINGBUF_NB_TRAP" traps are pending for
    transmission, subsequent traps are discarded to prevent
    overflow.
    
    This update significantly improves concurrency,
    synchronization, and trap management within the AgentX
    module, with added protection against socket's buffer overflow
    from excessive traps. The socket's buffer overflow is leading
    to process deadlock.
    
    Signed-off-by: Francois Dumontet <[email protected]>
    fdumontet6WIND committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    48685e3 View commit details
    Browse the repository at this point in the history