Handlers registered with dev_add_pack - executed in irq or bh context?

Discussion in 'Linux Networking' started by wzab, Apr 24, 2012.

  1. wzab

    wzab Guest

    Hi,

    I'm writing a packet handler registered with dev_add_pack.
    To assure proper locking it is essential to know in which context are
    those handlers called (I must consider possibility that two packets of
    the same type are processed simultaneously by two different CPUs).
    I don't know if I have to use spin_lock_irqsave (or read/
    write_lock_irqsave) , or it is sufficient to use spin_lock_bh (or read/
    write_lock_bh).
     
    wzab, Apr 24, 2012
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.