tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Deferred if_start



Hi,

This proposal introduces the deferred if_start framework
for network device drivers. It provides a means to schedule
if_start that will be executed in softint later.

We need it for MP-ification of bpf because some drivers call
if_start (or equivalent, say drvX_start) from hardware
interrupt, which means that bpf_mtap is also called from
hardware interrupt. That makes MP-ification hard.

Here is a patch:
  http://www.netbsd.org/~ozaki-r/if_deferred_start.diff

The implementation reuses softint of percpuq if_input to
avoid adding yet another softint per interface. Deferred
if_start is called before if_input in the softint handler.

The patch applies the framework only to vioif and wm.
For vioif, we need to just replace vioif_start with
if_schedule_deferred_start. For wm that supports
H/W multiqueue, we need a bit more changes. Once the
proposal is accepted, we apply the framework to remaining
tens of drivers.

Any comments?

BTW, the design to run if_start in softint in conjunction
with if_input recalls the design of pq3etsec driver that
handles both Tx and Rx always in one softint. We would
eventually provide the common framework of the design in
the future. (It would also include multiqueue and poll mode.)

  ozaki-r


Home | Main Index | Thread Index | Old Index