Commit Graph

14 Commits

Author SHA1 Message Date
maxv
94924a7495 Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
2018-07-15 05:16:40 +00:00
msaitoh
3cd62456f9 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
2018-06-26 06:47:57 +00:00
msaitoh
4b508fb16e It's not required to include net/bpfdesc.h. Remove it. 2018-06-22 04:17:40 +00:00
ozaki-r
a1d5203de1 Apply deferred if_start to more drivers
And annotate some XXX_start as it runs in softint to clarify that
it doesn't need deferred if_start.
2017-05-23 02:19:14 +00:00
ozaki-r
dd8638eea5 Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input
The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
2016-12-15 09:28:02 +00:00
ozaki-r
d938d837b3 Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
2016-06-10 13:27:10 +00:00
ozaki-r
9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00
rjs
eebfc9ef1e Add hardware checksumming support. 2015-08-24 18:51:37 +00:00
rjs
40b201d5b9 Fix logic for setting multicast addresses.
Setting CRC values for hashes is broken so all multicast addresses are
accepted for now.
2015-08-24 18:40:57 +00:00
rjs
1300cf4a12 Whitespace. 2015-08-24 18:26:51 +00:00
rjs
f74ff4198b printf -> aprint. 2015-08-24 18:11:12 +00:00
rjs
314f76f867 Add gem versions of collision counters. 2015-08-13 14:51:35 +00:00
ozaki-r
b8199900dc Remove leftover use of AF_NS and NS option
Unnecessary NETISR_NS is also removed.
2015-05-20 09:17:17 +00:00
hkenken
2074c2d050 Initial Zynq (Xilinx) support
Add support for ZedBoard evaluation board and Parallella board.
* cemac(4) Cadence EMAC/GEM(Gigabit) Ethernet Controller driver
  based on at91emac
2015-01-23 12:34:09 +00:00