Unify bpf_mtap & if_ipackets++ on Rx

2016-12-06 Thread Ryota Ozaki
Hi, This is another proposal that unifies bpf_mtap and if_ipackets++, which are executed in each driver now, into the percpuq if_input framework. The benefits of the change are: - We can reduce codes - We can provide the same behavior between drivers - How if_ipackets is counted up - Well, ac

Re: D_MPSAFE drivers

2016-12-06 Thread Michael van Elst
co...@sdf.org writes: >It appears that many "big name" drivers (wd, nvme) do >not have d_flags D_MPSAFE, unless I am reading things >wrong. Yes, many drivers aren't MPSAFE and need the kernel lock. The nvme (cdev) driver is just the control channel. While finally everything should be MPSAFE, it'

re: D_MPSAFE drivers

2016-12-06 Thread matthew green
co...@sdf.org writes: > Hi! > > Poking around I noticed KERNEL_LOCK is occasionally > grabbed by cdev_* for noticeable periods of time. > > Looking at the code, it grabs DEV_LOCK which is effectively > KERNEL_LOCK if the driver is not declared MPSAFE. > > It appears that many "big name" drivers

D_MPSAFE drivers

2016-12-06 Thread coypu
Hi! Poking around I noticed KERNEL_LOCK is occasionally grabbed by cdev_* for noticeable periods of time. Looking at the code, it grabs DEV_LOCK which is effectively KERNEL_LOCK if the driver is not declared MPSAFE. It appears that many "big name" drivers (wd, nvme) do not have d_flags D_MPSAFE,