The NetBSD Project

CVS log for src/sys/dev/pci/if_vioif.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / pci

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.82 / (download) - annotate - [select for diffs], Mon Sep 12 07:26:04 2022 UTC (4 months, 2 weeks ago) by knakahara
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.81: +28 -36 lines
Diff to previous 1.81 (colored)

Uniform vioif's link status to if_link_state.  Implemented by yamaguchi@n.o.

Let vioif(4) know LINK_STATE_UNKNOWN.

Revision 1.81 / (download) - annotate - [select for diffs], Wed May 4 02:38:27 2022 UTC (8 months, 4 weeks ago) by simonb
Branch: MAIN
Changes since 1.80: +4 -4 lines
Diff to previous 1.80 (colored)

White space KNF nits.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Apr 16 18:15:22 2022 UTC (9 months, 2 weeks ago) by andvar
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored)

fix various typos in comments and log messages.

Revision 1.79 / (download) - annotate - [select for diffs], Wed Apr 13 10:42:12 2022 UTC (9 months, 2 weeks ago) by uwe
Branch: MAIN
Changes since 1.78: +25 -25 lines
Diff to previous 1.78 (colored)

virtio: use the new syntax for snprintb(3) format strings.

The old syntax is limited to 32 bits only (and has 1-based bit numbers
which is rather incovenient too).

Revision 1.78 / (download) - annotate - [select for diffs], Wed Apr 13 02:28:01 2022 UTC (9 months, 2 weeks ago) by yamaguchi
Branch: MAIN
Changes since 1.77: +32 -11 lines
Diff to previous 1.77 (colored)

vioif(4): issue VIRTIO_NET_CTRL_MAC_ADDR_SET command only when
VIRTIO_NET_F_CTRL_MAC_ADDR is negotiated

Revision 1.77 / (download) - annotate - [select for diffs], Thu Mar 31 06:17:34 2022 UTC (10 months ago) by yamaguchi
Branch: MAIN
Changes since 1.76: +15 -40 lines
Diff to previous 1.76 (colored)

vioif(4): remove unnecessary lock acquirement

The lock was hold to wait for completion of interrupt handlers.
But, they are already stopped by rxq_stopping and txq_stopping
flags.

pointed out by riastradh@n.o, thanks.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Mar 29 01:57:51 2022 UTC (10 months ago) by yamaguchi
Branch: MAIN
Changes since 1.75: +31 -15 lines
Diff to previous 1.75 (colored)

vioif(4): Added a comment about stopping packet processing

Revision 1.75 / (download) - annotate - [select for diffs], Thu Mar 24 08:02:21 2022 UTC (10 months, 1 week ago) by yamaguchi
Branch: MAIN
Changes since 1.74: +85 -77 lines
Diff to previous 1.74 (colored)

vioif(4): adopt ether_set_ifflags_cb

Revision 1.74 / (download) - annotate - [select for diffs], Thu Mar 24 07:57:10 2022 UTC (10 months, 1 week ago) by yamaguchi
Branch: MAIN
Changes since 1.73: +73 -10 lines
Diff to previous 1.73 (colored)

vioif(4): register MAC address to a device

Revision 1.73 / (download) - annotate - [select for diffs], Thu Mar 24 07:51:14 2022 UTC (10 months, 1 week ago) by yamaguchi
Branch: MAIN
Changes since 1.72: +4 -2 lines
Diff to previous 1.72 (colored)

vioif(4): fix missing error handling

Revision 1.72 / (download) - annotate - [select for diffs], Thu Mar 24 07:47:50 2022 UTC (10 months, 1 week ago) by yamaguchi
Branch: MAIN
Changes since 1.71: +12 -2 lines
Diff to previous 1.71 (colored)

vioif(4): do not schedule packet processing while stopping the device

Revision 1.71 / (download) - annotate - [select for diffs], Thu Oct 28 01:36:43 2021 UTC (15 months ago) by yamaguchi
Branch: MAIN
Changes since 1.70: +9 -3 lines
Diff to previous 1.70 (colored)

virtio: stop reinit for safety when a device resetting is failed

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:46 2021 UTC (21 months, 4 weeks ago) by thorpej
Branch: thorpej-futex
Changes since 1.65: +130 -101 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Sync with HEAD.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Feb 8 06:56:26 2021 UTC (23 months, 3 weeks ago) by skrll
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.69: +5 -5 lines
Diff to previous 1.69 (colored)

Trailing whitespace

Revision 1.69 / (download) - annotate - [select for diffs], Wed Feb 3 21:04:41 2021 UTC (23 months, 3 weeks ago) by reinoud
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

Oops, made a mistake in my last commit

Revision 1.68 / (download) - annotate - [select for diffs], Wed Feb 3 20:27:59 2021 UTC (23 months, 3 weeks ago) by reinoud
Branch: MAIN
Changes since 1.67: +4 -4 lines
Diff to previous 1.67 (colored)

Allocate enough space for the bus_dmamap_t arrays for rxq_hdr_dmamaps[] and
txq_hdr_maps[]

Revision 1.67 / (download) - annotate - [select for diffs], Sun Jan 31 14:17:48 2021 UTC (23 months, 4 weeks ago) by reinoud
Branch: MAIN
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

Although the header structure can be smaller, the headers *are* indexed as if
they are full sized so allocate enough memory so the indexing works as
expected and we are not scribbling outside bounds.

Revision 1.66 / (download) - annotate - [select for diffs], Wed Jan 20 19:46:48 2021 UTC (2 years ago) by reinoud
Branch: MAIN
Changes since 1.65: +130 -101 lines
Diff to previous 1.65 (colored)

Add VirtIO PCI v1.0 attachments and fix the drivers affected.

The vioif, ld, scsi, viornd and viomb devices were adjusted when needed and
tested both in legacy 0.9 and v1.0 attachments trough PCI on amd64, sparc64,
aarch64 and aarch64-eb. ACPI/FDT attachments also tested on
aarch64/aarch64-eb.

Known issues

* viomb on aarch64 works only with ACPI/FDT attachment but not with PCI
  attachment. PCI and ACPI/FDT attachment works on aarch64-eb.

* virtio on sparc64 attaches but is it not functioning though not a
  regression.

Revision 1.65 / (download) - annotate - [select for diffs], Thu May 28 23:25:17 2020 UTC (2 years, 8 months ago) by riastradh
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.64: +12 -13 lines
Diff to previous 1.64 (colored)

Allocate proper storage for the event counter group names.

Can't use a stack buffer for these because the evcnt remembers the
pointer!

Revision 1.64 / (download) - annotate - [select for diffs], Mon May 25 09:45:40 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.63: +11 -12 lines
Diff to previous 1.63 (colored)

Stop all processing related to rx before that related to tx for safety

Revision 1.63 / (download) - annotate - [select for diffs], Mon May 25 09:41:27 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.62: +59 -19 lines
Diff to previous 1.62 (colored)

Use evcnt(9) to record error status in vioif(4)

Revision 1.62 / (download) - annotate - [select for diffs], Mon May 25 09:36:18 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.61: +13 -2 lines
Diff to previous 1.61 (colored)

Introduce the lock for vioif_softc to avoid a race condition
in vioif_update_link_status()

The function is called in both vioif_init() and softint.

Revision 1.61 / (download) - annotate - [select for diffs], Mon May 25 09:31:09 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.60: +7 -36 lines
Diff to previous 1.60 (colored)

 Populate mbufs in the packet receiving process, not in a softint

Revision 1.60 / (download) - annotate - [select for diffs], Mon May 25 09:25:31 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.59: +5 -6 lines
Diff to previous 1.59 (colored)

Always hold tx lock in deferred transmit to send all packets

There may be packets that enqueued before another transmission
releases the lock after finish of its transmission.
When using mutex_try_enter(), vioif_deferred_transmit() can not
sends them.

pointed out by knakahara@n.o

Revision 1.59 / (download) - annotate - [select for diffs], Mon May 25 09:07:43 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.58: +4 -6 lines
Diff to previous 1.58 (colored)

Remove redundant checks.
There is the same check in vioif_send_common_locked()

Revision 1.58 / (download) - annotate - [select for diffs], Mon May 25 08:41:13 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.57: +128 -77 lines
Diff to previous 1.57 (colored)

Replace macros with static functions for refactoring

Revision 1.57 / (download) - annotate - [select for diffs], Mon May 25 08:25:28 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.56: +4 -4 lines
Diff to previous 1.56 (colored)

Fix typo in comments

Revision 1.56 / (download) - annotate - [select for diffs], Mon May 25 08:22:39 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

Fix the wrong segment size in vioif(4)

Revision 1.55 / (download) - annotate - [select for diffs], Mon May 25 08:16:23 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.54: +473 -54 lines
Diff to previous 1.54 (colored)

Introduce packet handling in softint or kthread for vioif(4)

Revision 1.54 / (download) - annotate - [select for diffs], Mon May 25 07:52:16 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.53: +34 -25 lines
Diff to previous 1.53 (colored)

Set handlers implemented in child device of virtio(4) to virtqueue
instead of the commonized function

Revision 1.53 / (download) - annotate - [select for diffs], Mon May 25 07:20:15 2020 UTC (2 years, 8 months ago) by yamaguchi
Branch: MAIN
Changes since 1.52: +2 -28 lines
Diff to previous 1.52 (colored)

Obsolete VIOIF_SOFTINT_INTR

The kernel option is introduced to realize softint-based if_input.
Since the same scheme has been implemented in if_percpuq_enqueue(),
the option is no longer needed.

pointed out by ozaki-r@n.o.

Revision 1.41.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:26 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.41.2.2: +72 -131 lines
Diff to previous 1.41.2.2 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.41.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:09 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.41.2.1: +7 -5 lines
Diff to previous 1.41.2.1 (colored) to branchpoint 1.41 (colored)

Merge changes from current as of 20200406

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:11 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.51: +7 -5 lines
Diff to previous 1.51 (colored) next main 1.52 (colored)

Sync with head.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Jan 30 14:02:14 2020 UTC (3 years ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Changes since 1.51: +7 -5 lines
Diff to previous 1.51 (colored)

Adopt <net/if_stats.h>.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Oct 1 18:00:08 2019 UTC (3 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.50: +8 -23 lines
Diff to previous 1.50 (colored)

in many device attach paths, allocate memory with KM_SLEEP instead of KM_NOSLEEP
and remove code to handle failures that can no longer happen.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Sep 14 21:09:00 2019 UTC (3 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.49: +68 -112 lines
Diff to previous 1.49 (colored)

- KNF
- fix typo in error message
- use aprint* everywhere
- use loops to initialize mac
- remove unused variables

Revision 1.41.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:16 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.41: +1034 -538 lines
Diff to previous 1.41 (colored)

Sync with HEAD

Revision 1.49 / (download) - annotate - [select for diffs], Thu May 23 13:10:52 2019 UTC (3 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored)

 Whitespace fix (mainly tabify).

Revision 1.48 / (download) - annotate - [select for diffs], Thu May 23 10:40:39 2019 UTC (3 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.47: +42 -35 lines
Diff to previous 1.47 (colored)

-No functional change:
  - Simplify struct ethercom's pointer near ETHER_FIRST_MULTI().
  - Simplify MII structure initialization.
  - u_int*_t -> uint*_t.
  - KNF

Revision 1.47 / (download) - annotate - [select for diffs], Mon Feb 4 02:49:28 2019 UTC (3 years, 11 months ago) by yamaguchi
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.46: +4 -2 lines
Diff to previous 1.46 (colored)

Do not call virtio_start_vq_intr() for ctrlq
unless the iface has a control queue

Revision 1.39.2.3 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:27 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.39.2.2: +1009 -522 lines
Diff to previous 1.39.2.2 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored)

Synch with HEAD

Revision 1.46 / (download) - annotate - [select for diffs], Mon Jan 14 15:00:27 2019 UTC (4 years ago) by yamaguchi
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118
Changes since 1.45: +629 -247 lines
Diff to previous 1.45 (colored)

Add multiqueue support, vioif(4)

Revision 1.45 / (download) - annotate - [select for diffs], Mon Jan 14 14:57:25 2019 UTC (4 years ago) by yamaguchi
Branch: MAIN
Changes since 1.44: +5 -2 lines
Diff to previous 1.44 (colored)

Set IFEF_MPSAFE flag

Revision 1.44 / (download) - annotate - [select for diffs], Mon Jan 14 14:52:57 2019 UTC (4 years ago) by yamaguchi
Branch: MAIN
Changes since 1.43: +140 -116 lines
Diff to previous 1.43 (colored)

Functionize the same code related to ctrl vq in vioif(4)

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jan 14 14:35:52 2019 UTC (4 years ago) by yamaguchi
Branch: MAIN
Changes since 1.42: +392 -295 lines
Diff to previous 1.42 (colored)

Divide some elements of vioif_softc into txq, rxq, and ctrlq

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jan 14 14:32:13 2019 UTC (4 years ago) by yamaguchi
Branch: MAIN
Changes since 1.41: +72 -91 lines
Diff to previous 1.41 (colored)

Make macros not depend on vioif_softc

Revision 1.39.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:46 2018 UTC (4 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.39.2.1: +3 -3 lines
Diff to previous 1.39.2.1 (colored) to branchpoint 1.39 (colored)

Sync with HEAD

Revision 1.41 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:01 2018 UTC (4 years, 7 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

 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.

Revision 1.39.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:25:52 2018 UTC (4 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.39: +2 -5 lines
Diff to previous 1.39 (colored)

Sync with HEAD

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jun 10 14:59:23 2018 UTC (4 years, 7 months ago) by jakllsch
Branch: MAIN
CVS Tags: pgoyette-compat-0625
Changes since 1.39: +2 -5 lines
Diff to previous 1.39 (colored)

remove irrelevant pci(9) #includes from virtio child drivers

Revision 1.39 / (download) - annotate - [select for diffs], Thu Feb 8 09:05:19 2018 UTC (4 years, 11 months ago) by dholland
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.38: +12 -12 lines
Diff to previous 1.38 (colored)

Typos.

Revision 1.2.12.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:08 2017 UTC (5 years, 1 month ago) by jdolecek
Branch: tls-maxphys
Changes since 1.2.12.2: +400 -202 lines
Diff to previous 1.2.12.2 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

update from HEAD

Revision 1.11.2.10 / (download) - annotate - [select for diffs], Mon Aug 28 17:52:05 2017 UTC (5 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.11.2.9: +243 -159 lines
Diff to previous 1.11.2.9 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

Sync with HEAD

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jun 1 02:45:11 2017 UTC (5 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.37: +2 -5 lines
Diff to previous 1.37 (colored)

remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.34.4.1 / (download) - annotate - [select for diffs], Fri May 19 00:22:57 2017 UTC (5 years, 8 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.34: +53 -45 lines
Diff to previous 1.34 (colored) next main 1.35 (colored)

Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.37 / (download) - annotate - [select for diffs], Wed May 17 20:13:02 2017 UTC (5 years, 8 months ago) by jdolecek
Branch: MAIN
CVS Tags: prg-localcount2-base3
Changes since 1.36: +6 -5 lines
Diff to previous 1.36 (colored)

more precise m_freem() on error paths, and update m after the m_defrag() call

Revision 1.36 / (download) - annotate - [select for diffs], Wed May 17 20:04:50 2017 UTC (5 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.35: +52 -42 lines
Diff to previous 1.35 (colored)

simplify vioif_start() - remove the delivery attempts on failure and retries,
leave that for the dedicated thread

if dma map load fails, retry after m_defrag(), but continue processing
other queue items regardless

set interface queue length according to the length of virtio queue, so that
higher layer won't queue more than interface can manage to keep in flight

use the mutexes always, not just with NET_MPSAFE, so they continue
being exercised and hence working; they also enforce proper IPL level

inspired by discussion around PR kern/52211, thanks to Masanobu SAITOH
for the m_defrag() idea and code

Revision 1.35 / (download) - annotate - [select for diffs], Wed May 17 18:21:40 2017 UTC (5 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.34: +3 -6 lines
Diff to previous 1.34 (colored)

do not set IFF_OACTIVE if dma map load or the virtio reserve fails;
this causes interface to ignore any further TX requests if this happens
when there are no other TX requests in progress

fixes kern/52211 by Juergen Hannken-Illjes

Revision 1.24.2.4 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:12 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.24.2.3: +192 -113 lines
Diff to previous 1.24.2.3 (colored) to branchpoint 1.24 (colored) next main 1.25 (colored)

Sync with HEAD

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:47 2017 UTC (5 years, 9 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.30: +196 -116 lines
Diff to previous 1.30 (colored) next main 1.31 (colored)

Sync with HEAD

Revision 1.34 / (download) - annotate - [select for diffs], Tue Mar 28 04:10:33 2017 UTC (5 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: prg-localcount2
Changes since 1.33: +97 -5 lines
Diff to previous 1.33 (colored)

Handle config change interrupts to inhibit sending packets while link down

PR kern/52103 by s-yamaguchi@IIJ

Revision 1.33 / (download) - annotate - [select for diffs], Tue Mar 28 04:09:52 2017 UTC (5 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.32: +17 -27 lines
Diff to previous 1.32 (colored)

Don't write to read-only VIRTIO_NET_S_LINK_UP bit

The bit is defined as read-only in the Virtio PCI Card Specification.
The fix is inspired by FreeBSD.

PR kern/52103 by s-yamaguchi@IIJ

Revision 1.32 / (download) - annotate - [select for diffs], Sat Mar 25 18:02:06 2017 UTC (5 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.31: +93 -96 lines
Diff to previous 1.31 (colored)

reorganize the attachment process for virtio child devices, so that
more common code is shared among the drivers, and it's possible for
the drivers to be correctly dynamically loaded; forbid direct access
to struct virtio_softc from the child driver code

Revision 1.24.2.3 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:29 2017 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.24.2.2: +6 -5 lines
Diff to previous 1.24.2.2 (colored) to branchpoint 1.24 (colored)

Sync with HEAD

Revision 1.11.2.9 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:30 2017 UTC (5 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.11.2.8: +10 -7 lines
Diff to previous 1.11.2.8 (colored) to branchpoint 1.11 (colored)

Sync with HEAD

Revision 1.7.2.1.4.1 / (download) - annotate - [select for diffs], Wed Jan 18 08:46:27 2017 UTC (6 years ago) by skrll
Branch: netbsd-7-nhusb
Changes since 1.7.2.1: +4 -4 lines
Diff to previous 1.7.2.1 (colored) next main 1.7.2.2 (colored)

Sync with netbsd-5

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jan 17 01:25:21 2017 UTC (6 years ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, nick-nhusb-base-20170204
Changes since 1.30: +6 -5 lines
Diff to previous 1.30 (colored)

Fix unlocking in vioif_rx_filter

Revision 1.24.2.2 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:33 2017 UTC (6 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.24.2.1: +7 -6 lines
Diff to previous 1.24.2.1 (colored) to branchpoint 1.24 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.30 / (download) - annotate - [select for diffs], Wed Dec 28 07:32:16 2016 UTC (6 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.29: +5 -2 lines
Diff to previous 1.29 (colored)

Protect ec_multi* with mutex

The data can be accessed from sysctl, ioctl, interface watchdog
(if_slowtimo) and interrupt handlers. We need to protect the data against
parallel accesses from them.

Currently the mutex is applied to some drivers, we need to apply it to all
drivers in the future.

Note that the mutex is adaptive one for ease of implementation but some
drivers access the data in interrupt context so we cannot apply the mutex
to every drivers as is. We have two options: one is to replace the mutex
with a spin one, which requires some additional works (see
ether_multicast_sysctl), and the other is to modify the drivers to access
the data not in interrupt context somehow.

Revision 1.7.2.3 / (download) - annotate - [select for diffs], Fri Dec 23 05:57:40 2016 UTC (6 years, 1 month ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Changes since 1.7.2.2: +3 -3 lines
Diff to previous 1.7.2.2 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

Pull up following revision(s) (requested by bsiegert in ticket #1337):
	sys/dev/pci/if_vioif.c: revision 1.21
	sys/dev/pci/virtio.c: revision 1.14
PR/50636: Ryo ONODERA: Fix incorrect kmem_free()
--
PR/50636: Ryo ONODERA: Reduce memory use

Revision 1.29 / (download) - annotate - [select for diffs], Thu Dec 15 09:28:05 2016 UTC (6 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.28: +2 -4 lines
Diff to previous 1.28 (colored)

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

Revision 1.28 / (download) - annotate - [select for diffs], Thu Dec 8 01:12:01 2016 UTC (6 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.27: +4 -3 lines
Diff to previous 1.27 (colored)

Apply deferred if_start framework

if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.

Revision 1.11.2.8 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:02 2016 UTC (6 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.11.2.7: +2 -3 lines
Diff to previous 1.11.2.7 (colored) to branchpoint 1.11 (colored)

Sync with HEAD

Revision 1.27 / (download) - annotate - [select for diffs], Tue Nov 29 21:54:11 2016 UTC (6 years, 2 months ago) by uwe
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.26: +2 -3 lines
Diff to previous 1.26 (colored)

vioif_start() - do not call virtio_enqueue_abort() after error from
virtio_enqueue_reserve(), as it's already done by the latter, so we
ended up with a kind of "double free" that messed up out free list of
vq_entry's.

This is even documented in a "typical usage" comment in virtio.c (and
those quotes are not intended to be sarcastic).

PR 51132 - virtio net device stuck for UDP burst transmission

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:09 2016 UTC (6 years, 2 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.24: +34 -2 lines
Diff to previous 1.24 (colored)

Sync with HEAD

Revision 1.11.2.7 / (download) - annotate - [select for diffs], Wed Oct 5 20:55:43 2016 UTC (6 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.11.2.6: +35 -3 lines
Diff to previous 1.11.2.6 (colored) to branchpoint 1.11 (colored)

Sync with HEAD

Revision 1.26 / (download) - annotate - [select for diffs], Tue Sep 27 03:33:32 2016 UTC (6 years, 4 months ago) by pgoyette
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161004
Changes since 1.25: +34 -2 lines
Diff to previous 1.25 (colored)

Modularize the ld driver and all of its attachments.  Ensure that all
parents are capable of rescan (or otherwise provide a means of attaching
children post-initialization).

Revision 1.2.14.3 / (download) - annotate - [select for diffs], Sat Sep 24 13:21:10 2016 UTC (6 years, 4 months ago) by bouyer
Branch: netbsd-6-0
Changes since 1.2.14.2: +3 -3 lines
Diff to previous 1.2.14.2 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1401):
	sys/dev/pci/if_vioif.c: revision 1.25
Fix initializing wrong queues
Pointed out by Mike Larkin.
PR kern/51448

Revision 1.2.8.1.2.2 / (download) - annotate - [select for diffs], Sat Sep 24 13:21:06 2016 UTC (6 years, 4 months ago) by bouyer
Branch: netbsd-6-1
Changes since 1.2.8.1.2.1: +3 -3 lines
Diff to previous 1.2.8.1.2.1 (colored) to branchpoint 1.2.8.1 (colored) next main 1.2.8.2 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1401):
	sys/dev/pci/if_vioif.c: revision 1.25
Fix initializing wrong queues
Pointed out by Mike Larkin.
PR kern/51448

Revision 1.2.8.3 / (download) - annotate - [select for diffs], Sat Sep 24 12:56:16 2016 UTC (6 years, 4 months ago) by bouyer
Branch: netbsd-6
Changes since 1.2.8.2: +3 -3 lines
Diff to previous 1.2.8.2 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1401):
	sys/dev/pci/if_vioif.c: revision 1.25
Fix initializing wrong queues
Pointed out by Mike Larkin.
PR kern/51448

Revision 1.7.2.1.2.1 / (download) - annotate - [select for diffs], Sun Sep 18 05:57:17 2016 UTC (6 years, 4 months ago) by snj
Branch: netbsd-7-0
CVS Tags: netbsd-7-0-2-RELEASE
Changes since 1.7.2.1: +3 -3 lines
Diff to previous 1.7.2.1 (colored) next main 1.7.2.2 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1244):
	sys/dev/pci/if_vioif.c: revision 1.25
Fix initializing wrong queues
Pointed out by Mike Larkin.
PR kern/51448

Revision 1.7.2.2 / (download) - annotate - [select for diffs], Sun Sep 18 05:57:00 2016 UTC (6 years, 4 months ago) by snj
Branch: netbsd-7
Changes since 1.7.2.1: +3 -3 lines
Diff to previous 1.7.2.1 (colored) to branchpoint 1.7 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1244):
	sys/dev/pci/if_vioif.c: revision 1.25
Fix initializing wrong queues
Pointed out by Mike Larkin.
PR kern/51448

Revision 1.25 / (download) - annotate - [select for diffs], Mon Aug 29 04:21:25 2016 UTC (6 years, 5 months ago) by ozaki-r
Branch: MAIN
CVS Tags: localcount-20160914
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

Fix initializing wrong queues

Pointed out by Mike Larkin.

PR kern/51448

Revision 1.11.2.6 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:04 2016 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.11.2.5: +3 -3 lines
Diff to previous 1.11.2.5 (colored) to branchpoint 1.11 (colored)

Sync with HEAD

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:14 2016 UTC (6 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

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.

Revision 1.11.2.5 / (download) - annotate - [select for diffs], Sun May 29 08:44:22 2016 UTC (6 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.11.2.4: +5 -2 lines
Diff to previous 1.11.2.4 (colored) to branchpoint 1.11 (colored)

Sync with HEAD

Revision 1.23 / (download) - annotate - [select for diffs], Tue May 17 10:05:31 2016 UTC (6 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.22: +5 -2 lines
Diff to previous 1.22 (colored)

Try to get more packets going if the transmit interrupt indicates
some were sent.  Doing so avoids a situation where vioif_start never
gets called in case the sendqueue fills up and therefore the interface
perpetually drops all packets due to the queue being full.
(not sure why all drivers need to do this themselves; just keeping
up with the joneses)

Problem reported and patch tested by jmmlmendes and yasukata at
repo.rumpkernel.org/rumprun

Revision 1.11.2.4 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:10 2016 UTC (6 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.11.2.3: +4 -4 lines
Diff to previous 1.11.2.3 (colored) to branchpoint 1.11 (colored)

Sync with HEAD

Revision 1.22 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:11 2016 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

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!

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jan 10 03:07:50 2016 UTC (7 years ago) by christos
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

PR/50636: Ryo ONODERA: Reduce memory use

Revision 1.11.2.3 / (download) - annotate - [select for diffs], Sun Dec 27 12:09:50 2015 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.11.2.2: +92 -56 lines
Diff to previous 1.11.2.2 (colored) to branchpoint 1.11 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.20 / (download) - annotate - [select for diffs], Thu Oct 29 02:29:41 2015 UTC (7 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.19: +6 -12 lines
Diff to previous 1.19 (colored)

simplify

Revision 1.19 / (download) - annotate - [select for diffs], Thu Oct 29 02:09:02 2015 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.18: +30 -27 lines
Diff to previous 1.18 (colored)

Name virtqueue index

Revision 1.18 / (download) - annotate - [select for diffs], Tue Oct 27 15:56:21 2015 UTC (7 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.17: +28 -4 lines
Diff to previous 1.17 (colored)

- Print the negotiated feature bits.
- Use aprint_error_dev on error, instead of printf
- Add missing abort call.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Oct 26 01:44:48 2015 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.16: +43 -28 lines
Diff to previous 1.16 (colored)

Support MSI-X in virtio

Currently only vioif(4) uses the feature.

knakahara@ helped to migrate to pci_intr_alloc(9). Thanks!

Revision 1.11.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:09 2015 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.11.2.1: +4 -4 lines
Diff to previous 1.11.2.1 (colored) to branchpoint 1.11 (colored)

Sync with HEAD

Revision 1.16 / (download) - annotate - [select for diffs], Tue May 5 10:56:13 2015 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Use NULL for initialization of sc_config_change

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:10 2015 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.11: +41 -9 lines
Diff to previous 1.11 (colored)

Sync with HEAD

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jan 16 10:36:14 2015 UTC (8 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.14: +6 -2 lines
Diff to previous 1.14 (colored)

Introduce defflag for NET_MPSAFE

Revision 1.7.2.1 / (download) - annotate - [select for diffs], Mon Dec 29 17:01:01 2014 UTC (8 years, 1 month ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-1-RELEASE
Branch point for: netbsd-7-nhusb, netbsd-7-0
Changes since 1.7: +5 -4 lines
Diff to previous 1.7 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #354):
	sys/dev/pci/if_vioif.c: revision 1.14
Reuse mbuf when retrying in vioif_start
Otherwise, the old mbuf will leak.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Dec 25 06:39:26 2014 UTC (8 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.13: +5 -4 lines
Diff to previous 1.13 (colored)

Reuse mbuf when retrying in vioif_start

Otherwise, the old mbuf will leak.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 24 02:48:24 2014 UTC (8 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.12: +7 -2 lines
Diff to previous 1.12 (colored)

Take TX/RX locks when sc_stopping = true in if_stop

Taking the locks is needed to ensure ongoing TX/RX operations finish.
Otherwise, if_stop may run during TX/RX operations.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Dec 19 06:54:40 2014 UTC (8 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.11: +29 -7 lines
Diff to previous 1.11 (colored)

Implement softint-based interrupt handling in if_vioif

Softint-based interrupt handling is considered as a future direction
of the (network) device driver architecture in NetBSD. pq3etsec of
ppc is already implemented based on the architecture (unlike pq3etsec,
this change doesn't include softint-based if_start). In this
architecture, a hardware interrupt handler just schedules a softint
and the softint performs actual interrupt processing. It reduces
processing in hardware interrupt context and allows Layer 2 network
stack (e.g., bridge, vlan and even bpf) run in softint context,
which makes it easy to implement fine-grain locking in the layer.

This is an experimental implementation of the architecture in if_viof.

virtio introduces a new flag VIRTIO_F_PCI_INTR_SOFTINT. If a driver
of virtio sets it to sc_flags of virtio_softc, virtio calls
softint_schedule in virtio_intr instead of directly calling the
interrupt handler of the driver.

When VIOIF_SOFTINT_INTR is on, vioif doesn't use the existing softint
(vioif_rx_softint) that is called from vioif_rx_vq_done. Because
vioif_rx_softint already runs in softint context and another softint
isn't needed. This change actually improves performance in some cases.

The feature is disabled by default and enabled when SOFTINT_INTR is
set somewhere (normally in a kernel configuration).

Revision 1.11 / (download) - annotate - [select for diffs], Thu Oct 9 04:58:42 2014 UTC (8 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.10: +4 -2 lines
Diff to previous 1.10 (colored)

Add ETHERCAP_VLAN_MTU capability to vioif

Revision 1.10 / (download) - annotate - [select for diffs], Wed Oct 8 03:34:44 2014 UTC (8 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Add missing semicolon

Revision 1.9 / (download) - annotate - [select for diffs], Wed Oct 8 01:45:14 2014 UTC (8 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.8: +5 -4 lines
Diff to previous 1.8 (colored)

Don't turn promisc off in vioif_deferred_init if already configured as promisc

Revision 1.2.12.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:42 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.2.12.1: +132 -9 lines
Diff to previous 1.2.12.1 (colored) to branchpoint 1.2 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Aug 13 14:35:46 2014 UTC (8 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.7: +11 -5 lines
Diff to previous 1.7 (colored)

Don't use config_deferred_interrupts() for vioif_deferred_init(),
just run it once as part of if_init().  The problem with the former
is that it will execute the deferred init routine in-place when !cold,
and since vioif_deferred_init() finishing depends on virtio interrupts
which are established only after config_deferred_interrupts() is called,
the vioif attach method would deadlock when !cold.

Revision 1.4.6.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:54:54 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.4: +134 -11 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

Rebase.

Revision 1.2.14.2 / (download) - annotate - [select for diffs], Thu Aug 7 09:35:22 2014 UTC (8 years, 5 months ago) by msaitoh
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-6-RELEASE
Changes since 1.2.14.1: +3 -3 lines
Diff to previous 1.2.14.1 (colored) to branchpoint 1.2 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1102):
	sys/dev/pci/if_vioif.c: revision 1.5
Don't set SOFTINT_MPSAFE to vioif_rx_softint
vioif_rx_softint calls vioif_populate_rx_mbufs that is not MPSAFE.
vioif_populate_rx_mbufs is also called via vioif_ioctl and so can
be called by two LWPs simultaneously, resulting in kernel panic.
PR kern/49007

Revision 1.2.8.1.2.1 / (download) - annotate - [select for diffs], Thu Aug 7 09:34:21 2014 UTC (8 years, 5 months ago) by msaitoh
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-5-RELEASE
Changes since 1.2.8.1: +3 -3 lines
Diff to previous 1.2.8.1 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1102):
	sys/dev/pci/if_vioif.c: revision 1.5
Don't set SOFTINT_MPSAFE to vioif_rx_softint
vioif_rx_softint calls vioif_populate_rx_mbufs that is not MPSAFE.
vioif_populate_rx_mbufs is also called via vioif_ioctl and so can
be called by two LWPs simultaneously, resulting in kernel panic.
PR kern/49007

Revision 1.2.8.2 / (download) - annotate - [select for diffs], Thu Aug 7 09:31:09 2014 UTC (8 years, 5 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.2.8.1: +3 -3 lines
Diff to previous 1.2.8.1 (colored) to branchpoint 1.2 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1102):
	sys/dev/pci/if_vioif.c: revision 1.5
Don't set SOFTINT_MPSAFE to vioif_rx_softint
vioif_rx_softint calls vioif_populate_rx_mbufs that is not MPSAFE.
vioif_populate_rx_mbufs is also called via vioif_ioctl and so can
be called by two LWPs simultaneously, resulting in kernel panic.
PR kern/49007

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 22 02:21:50 2014 UTC (8 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.6: +133 -11 lines
Diff to previous 1.6 (colored)

Make if_vioif MPSAFE

- Introduce VIOIF_MPSAFE
  - It's enabled only when NET_MPSAFE is defined in if.h or the kernel config
- Add tx and rx mutex locks
  - Locking them is performance sensitive, so it's not used when !VIOIF_MPSAFE
- Set SOFTINT_MPSAFE to vioif_rx_softint only when VIOIF_MPSAFE

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jul 22 01:55:54 2014 UTC (8 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored)

Introduce VIRTIO_F_PCI_INTR_MPSAFE for virtio

It is set by a child driver, e.g., if_vioif. If set, virtio sets
PCI_INTR_MPSAFE for pci_intr_establish.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 18 02:10:55 2014 UTC (8 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Don't set SOFTINT_MPSAFE to vioif_rx_softint

vioif_rx_softint calls vioif_populate_rx_mbufs that is not MPSAFE.
vioif_populate_rx_mbufs is also called via vioif_ioctl and so can
be called by two LWPs simultaneously, resulting in kernel panic.

PR kern/49007

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:40:25 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.1.2.1: +8 -9 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.2.12.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:18 2013 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.2: +8 -9 lines
Diff to previous 1.2 (colored)

resync from head

Revision 1.2.6.3 / (download) - annotate - [select for diffs], Sun Jun 9 11:51:40 2013 UTC (9 years, 7 months ago) by msaitoh
Branch: netbsd-5
Changes since 1.2.6.2: +3 -4 lines
Diff to previous 1.2.6.2 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Pull up following revision(s) (requested by minoura in ticket #1861):
	sys/dev/pci/if_vioif.c: revision 1.4
Fix a typo, and remove an unused member.
This should fix the problem that recent Qemu dies during configuring a vioif.
Fixes PR#47780.

Revision 1.2.14.1 / (download) - annotate - [select for diffs], Sun May 12 16:38:33 2013 UTC (9 years, 8 months ago) by riz
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE
Changes since 1.2: +3 -4 lines
Diff to previous 1.2 (colored)

Pull up following revision(s) (requested by minoura in ticket #890):
	sys/dev/pci/if_vioif.c: revision 1.4
Fix a typo, and remove an unused member.
This should fix the problem that recent Qemu dies during configuring a vioif.

Revision 1.2.8.1 / (download) - annotate - [select for diffs], Sun May 12 16:38:06 2013 UTC (9 years, 8 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE
Branch point for: netbsd-6-1
Changes since 1.2: +3 -4 lines
Diff to previous 1.2 (colored)

Pull up following revision(s) (requested by minoura in ticket #890):
	sys/dev/pci/if_vioif.c: revision 1.4
Fix a typo, and remove an unused member.
This should fix the problem that recent Qemu dies during configuring a vioif.

Revision 1.4 / (download) - annotate - [select for diffs], Thu May 9 12:23:17 2013 UTC (9 years, 8 months ago) by minoura
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: tls-earlyentropy
Changes since 1.3: +3 -4 lines
Diff to previous 1.3 (colored)

Fix a typo, and remove an unused member.
This should fix the problem that recent Qemu dies during configuring a vioif.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Mar 30 03:21:08 2013 UTC (9 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: khorben-n900
Changes since 1.2: +7 -7 lines
Diff to previous 1.2 (colored)

remove trailing whitespace

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:49 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.1: +7 -3 lines
Diff to previous 1.1 (colored)

sync with head

Revision 1.2.6.2 / (download) - annotate - [select for diffs], Wed Jan 25 21:18:15 2012 UTC (11 years ago) by riz
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Changes since 1.2.6.1: +1321 -0 lines
Diff to previous 1.2.6.1 (colored) to branchpoint 1.2 (colored)

Pull up following revision(s) (requested by hannken in ticket #1715):
- Be robust against an invalid timer period value.
sys/dev/ic/hpetreg.h			Rev. 1.4
sys/dev/ic/hpet.c			Rev. 1.8

- Fix wrong definition of LAPIC_LEVEL_ASSERT / _MASK
sys/arch/x86/include/i82489reg.h	Rev. 1.11

- Add virtio driver - speed up disk and network access in virtual environments
sys/arch/i386/conf/GENERIC		Rev. 1.1055
sys/arch/i386/conf/ALL			Rev. 1.325
sys/arch/amd64/conf/GENERIC		Rev. 1.338
sys/dev/pci/files.pci			Rev. 1.350
sys/dev/pci/if_vioif.c			Rev. 0-1.2
sys/dev/pci/ld_virtio.c			Rev. 0-1.4
sys/dev/pci/viomb.c			Rev. 0-1.1
sys/dev/pci/virtio.c			Rev. 0-1.3
sys/dev/pci/virtioreg.h			Rev. 0-1.1
sys/dev/pci/virtiovar.h			Rev. 0-1.1
distrib/sets/lists/man/mi		Rev. 1.1352 and 1.1358
share/man/man4/Makefile			Rev. 1.573 and 1.575
share/man/man4/ld.4			Rev. 1.19
share/man/man4/virtio.4			Rev. 0-1.4
share/man/man4/vioif.4			Rev. 0-1.2
share/man/man4/viomb.4			Rev. 0-1.2

Allow NetBSD to run unmodified under Linux/kvm.

Revision 1.2.6.1, Sat Nov 19 12:32:54 2011 UTC (11 years, 2 months ago) by riz
Branch: netbsd-5
Changes since 1.2: +0 -1311 lines
FILE REMOVED

file if_vioif.c was added on branch netbsd-5 on 2012-01-25 21:18:15 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Sat Nov 19 12:32:54 2011 UTC (11 years, 2 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, agc-symver-base, agc-symver
Branch point for: tls-maxphys, netbsd-6-0, netbsd-6, netbsd-5
Changes since 1.1: +7 -3 lines
Diff to previous 1.1 (colored)

fix build when ALTQ is defined

Revision 1.1 / (download) - annotate - [select for diffs], Sun Oct 30 12:12:21 2011 UTC (11 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache

Import of the virtio driver written by MINOURA Makoto <minoura@netbsd.org>
with minor changes to make it compile an run on -current.  This driver
speeds up disk and network access in virtual environments like KVM.

Enabled on i386 and amd64.  Tested with a CentOS 5.7 x86_64 host.

See http://ozlabs.org/~rusty/virtio-spec/virtio.pdf for the specification.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>