CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2026/11/12 20:07:13

Modified files:
        sys/net        : if_gre.c 

Log message:
shuffle nvgre packet processing to simplify nvgre ioctls.

nvgre_start could be called both with and without NET_LOCK, so it
had to try and coordinate with nvgre_up and _down without relying
on NET_LOCK, but then it also had to defer sending encapsulated
packets to a task so it could control the scope of NET_LOCK before
calling ip_output and ip6_output.

tom smyth reported issues with the nvgre_down coordination, which
led to restructuring this code.

nvgre now forces all transmit calls to be run from their own task
in the softnet threads, which in turn allows it to take NET_LOCK
itself and rely on it to coordinate access to the gre tunnel
configuration parameters. this simplifies nvgre_down, and also
allows us to remove the extra send task, because the NET_LOCK scope
is already known and controlled. packet reception is done as part
of the ip stack processing, so it already has NET_LOCK arounds its
use of the tunnel config.

forcing the transmit (nvgre_start) call into it's own task on a
softnet taskq is how rport(4) managed the problem of NET_LOCK scope,
and it seems robust there.

reported by and tested by tom smyth
"makes sense" jmatthew@

Reply via email to