Skip to content
  • Paolo Abeni's avatar
    net: flush the softnet backlog in process context · 145dd5f9
    Paolo Abeni authored
    
    
    Currently in process_backlog(), the process_queue dequeuing is
    performed with local IRQ disabled, to protect against
    flush_backlog(), which runs in hard IRQ context.
    
    This patch moves the flush operation to a work queue and runs the
    callback with bottom half disabled to protect the process_queue
    against dequeuing.
    Since process_queue is now always manipulated in bottom half context,
    the irq disable/enable pair around the dequeue operation are removed.
    
    To keep the flush time as low as possible, the flush
    works are scheduled on all online cpu simultaneously, using the
    high priority work-queue and statically allocated, per cpu,
    work structs.
    
    Overall this change increases the time required to destroy a device
    to improve slightly the packets reinjection performances.
    
    Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Acked-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    145dd5f9