The NetBSD Project

CVS log for src/sys/arch/xen/xen/if_xennet_xenbus.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / xen / xen

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.128.20.2 / (download) - annotate - [select for diffs], Sun Jan 14 15:25:54 2024 UTC (3 months ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3
Changes since 1.128.20.1: +8 -2 lines
Diff to previous 1.128.20.1 (colored) to branchpoint 1.128 (colored) next main 1.129 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by jdolecek in ticket #543):

	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.130

disable TX checksum optimization, it's causing ARP lossage in some
configurations using Linux dom0

PR port-xen/57743 by Brian Marcotte, thanks for the patch

Revision 1.130 / (download) - annotate - [select for diffs], Tue Jan 9 18:39:53 2024 UTC (3 months, 1 week ago) by jdolecek
Branch: MAIN
CVS Tags: HEAD
Changes since 1.129: +8 -2 lines
Diff to previous 1.129 (colored) to selected 1.14.2.1 (colored)

disable TX checksum optimization, it's causing ARP lossage in some
configurations using Linux dom0

PR port-xen/57743 by Brian Marcotte, thanks for the patch

Revision 1.70.6.3 / (download) - annotate - [select for diffs], Mon Jul 31 15:31:43 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-8
Changes since 1.70.6.2: +3 -3 lines
Diff to previous 1.70.6.2 (colored) to branchpoint 1.70 (colored) next main 1.71 (colored) to selected 1.14.2.1 (colored)

Apply patch, requested by riastradh in ticket #1863, pulling up
the essential part of

	sys/arch/xen/xen/if_xennet_xenbus.c		1.129

xennet(4): Add missing membar.

Revision 1.86.4.1 / (download) - annotate - [select for diffs], Mon Jul 31 15:29:23 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-9
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored) next main 1.87 (colored) to selected 1.14.2.1 (colored)

Apply patch, requested by riastradh in ticket #1680, pulling up
the essential part of

	sys/arch/xen/xen/if_xennet_xenbus.c		1.129

xennet(4): Add missing membar.

Revision 1.128.20.1 / (download) - annotate - [select for diffs], Mon Jul 31 15:23:02 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.128: +5 -5 lines
Diff to previous 1.128 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by riastradh in ticket #268):

	sys/arch/xen/xenbus/xenbus_comms.c: revision 1.25
	sys/arch/xen/xenbus/xenbus_comms.c: revision 1.26
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.110
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.111
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.112
	sys/arch/xen/x86/cpu.c: revision 1.144
	sys/arch/xen/x86/cpu.c: revision 1.145
	sys/arch/xen/include/hypervisor.h: revision 1.56
	sys/arch/xen/include/hypervisor.h: revision 1.57
	sys/arch/xen/xen/xbdback_xenbus.c: revision 1.102
	sys/arch/xen/xen/xbdback_xenbus.c: revision 1.103
	sys/arch/xen/include/xenring.h: revision 1.7
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.109
	sys/arch/xen/xen/xengnt.c: revision 1.40
	sys/arch/xen/xen/xengnt.c: revision 1.41
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.129
	sys/arch/xen/xen/xencons.c: revision 1.51
	sys/arch/xen/xen/xencons.c: revision 1.52
	sys/arch/xen/xen/xencons.c: revision 1.53
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.130 (patch)
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.131 (patch)

xen: Fix sense of xen_rmb/wmb to make sense.

Use membar_acquire and membar_release, not membar_consumer and
membar_producer, out of paranoia -- that better matches Linux's
rmb/wmb (at least for non-I/O loads and stores).

Proposed on port-xen:
https://mail-index.netbsd.org/port-xen/2022/07/13/msg010248.html

xen/x86/cpu.c: Membar audit.

I see no reason for store-before-load ordering here; as far as I'm
aware, evtchn_upcall_mask is only shared between a (v)CPU and its
(hypervisor) interrupts, not other (v)CPUs.

xennet(4): Membar audit.
- xennet_tx_complete: Other side owns rsp_prod, giving us responses
  to tx commands.  We own rsp_cons, recording which responess we've
  processed already.
  1. Other side initializes responses before advancing rsp_prod, so
     we must observe rsp_prod before trying to examine the responses.
     Hence load from rsp_prod must be followed by xen_rmb.
     (Can this just use atomic_load_acquire?)
  2. As soon as other side observes rsp_event, it may start to
     overwrite now-unused response slots, so we must finish using the
     response before advancing rsp_cons.  Hence we must issue xen_wmb
     before store to rsp_event.
     (Can this just use atomic_store_release?)
     (Should this use RING_FINAL_CHECK_FOR_RESPONSES?)
  3. When loop is done and we set rsp_event, we must ensure the other
     side has had a chance to see that we want more before we check
     whether there is more to consume; otherwise the other side might
     not bother to send us an interrupt.  Hence after setting
     rsp_event, we must issue xen_mb (store-before-load) before
     re-checking rsp_prod.
- xennet_handler (rx): Same deal, except the xen_mb is buried in
  RING_FINAL_CHECK_FOR_RESPONSES.  Unclear why xennet_tx_complete has
  this open-coded while xennet_handler (rx) uses the macro.

xbd(4): Membar audit.
After consuming slots, must issue xen_wmb before notifying the other
side that we've consumed them in RING_FINAL_CHECK_FOR_RESPONSES.
xbdback(4): Membar audit.

After consuming request slots, must issue xen_wmb notifying the other
side that we've consumed them in RING_FINAL_CHECK_FOR_REQUESTS.

xencons(4): Membar audit.
- xenconscn_getc: Once we have consumed an input slot, it is clearer
  to issue xen_wmb (release, i.e., load/store-before-store) before
  advancing in_cons so that the update becomes a store-release
  freeing the input slot for the other side to reuse.
- xenconscn_putc: After filling an output slot, must issue xen_wmb
  (release, i.e., load/store-before-store) before advancing out_prod,
  and another one before notifying the other side of the advance.

xencons(4): Reduce unnecessary membars.
- xencons_handler: After advancing in_cons, only need one xen_wmb
  before notifying the hypervisor that we're ready for more.
  (XXX Should this do xen_mb and re-check in_prod at that point, or
  does hypervisor_notify_via_evtchn obviate the need for this?)
- xenvonscn_getc: After reading in_prod, only need one xen_rmb before
  using the slots it is telling us are now ready.

xengnt(4): Membar audit.
This had the sense of membars reversed, presumably because xen_rmb
and xen_wmb had gotten reversed at some point.
xenbus_comms.c: Membar audit.

This had the sense of membars reversed, presumably because xen_rmb
and xen_wmb had gotten reversed at some point.

xennetback(4): Fix xennetback_evthandler loop.
- After observing the other side has produced pending tx requests by
  reading sring->req_prod, must issue xen_rmb before touching them.
  Despite all the effort to use the heavy-weight
  RING_FINAL_CHECK_FOR_REQUESTS on each request in the loop, this
  barrier was missing.
- No need to update req_cons at each iteration in the loop.  It's
  private.  Just update it once at the end.
- After consuming requests, must issue xen_wmb before releasing the
  slots with RING_FINAL_CHECK_FOR_REQUEST for the other side to
  reuse.

xennetback(4): Fix membars in xennetback_rx_copy_process.
- No need for barrier around touching req_cons and rsp_prod_pvt,
  which are private.
- RING_PUSH_RESPONSES_AND_CHECK_NOTIFY already issues xen_wmb, no
  need to add one explicitly.
- After pushing responses, must issue xen_wmb (not xen_rmb) before
  hypervisor_notify_via_evtchn.

xennetback(4): Omit needless membars in xennetback_connect.
xneti is a private data structure to which we have exclusive access
here; ordering the stores doesn't make sense.

xen/hypervisor.h: Nix trailing whitespace.
No functional change intended.

xen/x86/cpu.c: Nix trailing whitespace.
No functional change intended.

xbd(4): Nix trailing whitespace.

xbdback(4): Nix trailing whitespace.
No functional change intended.

xencons(4): Nix trailing whitespace.
No functional change intended.

xengnt(4): Nix trailing whitespace.
No functional change intended.

xenbus_comms.c: Nix trailing whitespace.
No functional change intended.

xennetback(4): Nix trailing whitespace.
No functional change intended.

Revision 1.129 / (download) - annotate - [select for diffs], Sat Feb 25 00:32:49 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.128: +5 -5 lines
Diff to previous 1.128 (colored) to selected 1.14.2.1 (colored)

xennet(4): Membar audit.

- xennet_tx_complete: Other side owns rsp_prod, giving us responses
  to tx commands.  We own rsp_cons, recording which responess we've
  processed already.

  1. Other side initializes responses before advancing rsp_prod, so
     we must observe rsp_prod before trying to examine the responses.
     Hence load from rsp_prod must be followed by xen_rmb.

     (Can this just use atomic_load_acquire?)

  2. As soon as other side observes rsp_event, it may start to
     overwrite now-unused response slots, so we must finish using the
     response before advancing rsp_cons.  Hence we must issue xen_wmb
     before store to rsp_event.

     (Can this just use atomic_store_release?)

     (Should this use RING_FINAL_CHECK_FOR_RESPONSES?)

  3. When loop is done and we set rsp_event, we must ensure the other
     side has had a chance to see that we want more before we check
     whether there is more to consume; otherwise the other side might
     not bother to send us an interrupt.  Hence after setting
     rsp_event, we must issue xen_mb (store-before-load) before
     re-checking rsp_prod.

- xennet_handler (rx): Same deal, except the xen_mb is buried in
  RING_FINAL_CHECK_FOR_RESPONSES.  Unclear why xennet_tx_complete has
  this open-coded while xennet_handler (rx) uses the macro.

XXX pullup-8 (at least the xen_mb part; requires patch)
XXX pullup-9 (at least the xen_mb part; requires patch)
XXX pullup-10

Revision 1.128 / (download) - annotate - [select for diffs], Wed Aug 26 15:54:10 2020 UTC (3 years, 7 months ago) by riastradh
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-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, netbsd-10-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.127: +12 -12 lines
Diff to previous 1.127 (colored) to selected 1.14.2.1 (colored)

Nix trailing whitespace and mixed space/tab indentation.

Revision 1.127 / (download) - annotate - [select for diffs], Wed Jun 24 14:33:08 2020 UTC (3 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored) to selected 1.14.2.1 (colored)

fix tyop in KASSERT() condition which made it an assignment rather than a check

the field indeed is supposed to be set to GRANT_INVALID_REF at this moment,
the grant must be already revoked by this time

pointed out by Taylor R Campbell

Revision 1.126 / (download) - annotate - [select for diffs], Thu May 14 13:25:40 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.125: +11 -17 lines
Diff to previous 1.125 (colored) to selected 1.14.2.1 (colored)

fix resume for xennet, now the network continues working after resume

we can't read feature-rx-copy in resume, at that time the new backend
device is not filled yet; convert it just to feature flag read on interface
attach, can assume any backend would support rx-copy anyway

fix compile with XENNET_DEBUG

part of PR port-xen/55207

Revision 1.125 / (download) - annotate - [select for diffs], Thu May 14 09:47:25 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.124: +53 -46 lines
Diff to previous 1.124 (colored) to selected 1.14.2.1 (colored)

rearrange so that suspend & resume doesn't cause panics, and interface
is more likely to work - particularly, don't try to xengnt_revoke_access()
after resume, move xen_intr_disestablish() call to resume, also
unmask the event channel on resume

XXX right now xennet device detaches immediately after resume, which is not
desirable and needs to be fixed

part of PR port-xen/55207

Revision 1.124 / (download) - annotate - [select for diffs], Tue May 5 09:52:13 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.123: +11 -2 lines
Diff to previous 1.123 (colored) to selected 1.14.2.1 (colored)

due to the locking wild west for if_ioctl can't assert IFNET_LOCKED()
in xennet_ioctl(), so just do splnet() like other drivers do, and hope for best

fixes failed KASSERT() e.g. when starting rpcbind(), which ends
up calling this via sys_setsockopt()->sosetopt()->...->in6_addmulti()->
if_mcast_op(), this path doesn't currently take IFNET_LOCK()

Revision 1.123 / (download) - annotate - [select for diffs], Mon May 4 10:03:45 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.122: +3 -3 lines
Diff to previous 1.122 (colored) to selected 1.14.2.1 (colored)

fix delet-o

Revision 1.122 / (download) - annotate - [select for diffs], Mon May 4 08:22:45 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.121: +6 -8 lines
Diff to previous 1.121 (colored) to selected 1.14.2.1 (colored)

remove IPv4 csum offloading for xennet(4) - it's not complete, and even
if it was, it doesn't work with Linux Dom0 as it expects the IPv4 csum present

Revision 1.121 / (download) - annotate - [select for diffs], Fri May 1 19:53:17 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.120: +14 -5 lines
Diff to previous 1.120 (colored) to selected 1.14.2.1 (colored)

make the csum blank/undefer counters per interface

Revision 1.120 / (download) - annotate - [select for diffs], Thu Apr 30 11:19:39 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.119: +9 -7 lines
Diff to previous 1.119 (colored) to selected 1.14.2.1 (colored)

NETTXF_csum_blank and NETTXF_data_validated should be set only for first
fragment of the packet

Revision 1.119 / (download) - annotate - [select for diffs], Sun Apr 26 12:58:28 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.118: +239 -74 lines
Diff to previous 1.118 (colored) to selected 1.14.2.1 (colored)

support feature-sg

practical offshot of this xennet(4) now supports jumbo frames, it is
also necessary for eventual TSO support

always defrag short Tx packets before passing to backend - even
with feature-sg it's way faster to process the packet if it's
passed as single fragment

Revision 1.118 / (download) - annotate - [select for diffs], Sat Apr 25 15:26:18 2020 UTC (3 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.117: +3 -2 lines
Diff to previous 1.117 (colored) to selected 1.14.2.1 (colored)

Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM
guests in GENERIC.
Xen support can be disabled at runtime with
boot -c
disable hypervisor

Revision 1.117 / (download) - annotate - [select for diffs], Sat Apr 25 11:33:28 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.116: +9 -27 lines
Diff to previous 1.116 (colored) to selected 1.14.2.1 (colored)

use m_defrag() instead of local code now that it returns single mbuf

Revision 1.109.2.3 / (download) - annotate - [select for diffs], Sat Apr 25 11:23:58 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.109.2.2: +8 -4 lines
Diff to previous 1.109.2.2 (colored) to branchpoint 1.109 (colored) next main 1.110 (colored) to selected 1.14.2.1 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.116 / (download) - annotate - [select for diffs], Thu Apr 23 15:06:49 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.115: +8 -2 lines
Diff to previous 1.115 (colored) to selected 1.14.2.1 (colored)

also let backend know that feature-ipv6-csum-offload is supported

Revision 1.115 / (download) - annotate - [select for diffs], Thu Apr 23 14:54:48 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.114: +2 -4 lines
Diff to previous 1.114 (colored) to selected 1.14.2.1 (colored)

g/c unused macro

Revision 1.77.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:13 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.77.2.3: +4 -2 lines
Diff to previous 1.77.2.3 (colored) to branchpoint 1.77 (colored) next main 1.78 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.109.2.2 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:01 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.109.2.1: +121 -132 lines
Diff to previous 1.109.2.1 (colored) to branchpoint 1.109 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.109.2.1 / (download) - annotate - [select for diffs], Thu Apr 16 08:46:36 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.109: +3 -2 lines
Diff to previous 1.109 (colored) to selected 1.14.2.1 (colored)

Reorganise sources to make it possible to include Xen PVHVM support in
native kernels. Among others:
- move xen/include/amd64/hypercall.h to amd64/include/xen and
  xen/include/i386/hypercall.h to i386/include/xen
- exclude some native files from the build for xenpv
- add xen to "machine" config statement for amd64 and i386
- split arch/xen/conf/files.xen to arch/xen/conf/files.xen (for pv drivers)
  and arch/xen/conf/files.xen.pv (for full pv support)
- add GENERIC_XENHVM kernel config which includes GENERIC and add Xen PV
  drivers.

Revision 1.77.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:12 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.77.2.2: +165 -218 lines
Diff to previous 1.77.2.2 (colored) to branchpoint 1.77 (colored) to selected 1.14.2.1 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.114 / (download) - annotate - [select for diffs], Sun Apr 12 13:57:07 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base1
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored) to selected 1.14.2.1 (colored)

move IFNET_UNLOCK() immediatelly after xennet_stop() call in detach,
doesn't need to be held for the disestablish

Revision 1.113 / (download) - annotate - [select for diffs], Sun Apr 12 13:55:06 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.112: +6 -4 lines
Diff to previous 1.112 (colored) to selected 1.14.2.1 (colored)

fix locking against myself panic in xennet_stop() on 'ifconfig xennet0 down'

xennet_stop() is called with IFNET already held

Revision 1.112 / (download) - annotate - [select for diffs], Sat Apr 11 11:01:12 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20200411
Changes since 1.111: +17 -15 lines
Diff to previous 1.111 (colored) to selected 1.14.2.1 (colored)

put xenbus dmat into xenbus_device so it's available also for backend
devices which don't use autoconfig, remove from attach args

Revision 1.111 / (download) - annotate - [select for diffs], Fri Apr 10 19:08:10 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored) to selected 1.14.2.1 (colored)

use ETHER_ADDR_LEN on one more place

Revision 1.110 / (download) - annotate - [select for diffs], Fri Apr 10 18:03:06 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.109: +114 -129 lines
Diff to previous 1.109 (colored) to selected 1.14.2.1 (colored)

convert to bus_dma(9), remove now not necessary XENPVHVM redefines

Revision 1.77.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:59 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.77.2.1: +133 -356 lines
Diff to previous 1.77.2.1 (colored) to branchpoint 1.77 (colored) to selected 1.14.2.1 (colored)

Merge changes from current as of 20200406

Revision 1.109 / (download) - annotate - [select for diffs], Tue Apr 7 11:47:06 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
CVS Tags: bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.108: +8 -30 lines
Diff to previous 1.108 (colored) to selected 1.14.2.1 (colored)

change xenbus_read() interface so that caller supplies the buffer and it's
size, caller doesn't free(9) the returned value any more

Revision 1.108 / (download) - annotate - [select for diffs], Mon Apr 6 19:58:09 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.107: +10 -10 lines
Diff to previous 1.107 (colored) to selected 1.14.2.1 (colored)

adjust previous - set the Tx flag only when the feature supported, instead
of first setting it and then masking it when unsupported

Revision 1.107 / (download) - annotate - [select for diffs], Mon Apr 6 19:52:38 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.106: +20 -3 lines
Diff to previous 1.106 (colored) to selected 1.14.2.1 (colored)

pass and use feature-ipv6-csum-offload for ipv6 csum support, matches
Linux Dom0/DomU

Revision 1.106 / (download) - annotate - [select for diffs], Mon Apr 6 18:23:21 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.105: +30 -65 lines
Diff to previous 1.105 (colored) to selected 1.14.2.1 (colored)

convert to IFEF_MPSAFE, also enable interrupt handler without biglock

no performance difference observed compared to version before change,
for neither UP nor MP DomU

Revision 1.105 / (download) - annotate - [select for diffs], Mon Apr 6 16:43:34 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20200406
Changes since 1.104: +68 -58 lines
Diff to previous 1.104 (colored) to selected 1.14.2.1 (colored)

make a pass on locking, replacing spl*() calls with mutexes:
- sc_tx_lock covers any access to tx list, tx ring, and writes to
  if_flags and if_itimer
- sc_rx_lock covers any access to rx list, tx ring, and free tx counter

fix suspend and detach to work again - recent softintr changes made
xennet_tx_complete() not actually being called, because the call
in xennet_handler() was after IFF_RUNNING check; now it's called
directly rather than triggering softint, with updates locking it's safe

enable DVF_DETACH_SHUTDOWN for xennet(4), though the call only
triggers notification to backend to close, leaves actual detach to
xenwatch_thread

Revision 1.104 / (download) - annotate - [select for diffs], Mon Apr 6 15:30:52 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored) to selected 1.14.2.1 (colored)

#undef XENNET_DEBUG, accidentaly left enabled in previous commit

Revision 1.103 / (download) - annotate - [select for diffs], Mon Apr 6 10:44:44 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.102: +6 -23 lines
Diff to previous 1.102 (colored) to selected 1.14.2.1 (colored)

remove some XENNET_DEBUG code which causes kernel faults

Revision 1.102 / (download) - annotate - [select for diffs], Mon Apr 6 10:33:10 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.101: +9 -10 lines
Diff to previous 1.101 (colored) to selected 1.14.2.1 (colored)

remove some unnecessary spl*() calls, and fix the rxreq va/pa deallocation
in xennet_xenbus_detach()

Revision 1.101 / (download) - annotate - [select for diffs], Mon Apr 6 10:05:38 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.100: +7 -12 lines
Diff to previous 1.100 (colored) to selected 1.14.2.1 (colored)

save some memory - no need to embed sc inside struct xennet_rxreq

Revision 1.100 / (download) - annotate - [select for diffs], Mon Apr 6 08:26:32 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.99: +3 -4 lines
Diff to previous 1.99 (colored) to selected 1.14.2.1 (colored)

set rxreq_gntref to GRANT_INVALID_REF immediately after revoking
access, so it's clear where it comes from

Revision 1.99 / (download) - annotate - [select for diffs], Sun Apr 5 17:26:46 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.98: +16 -180 lines
Diff to previous 1.98 (colored) to selected 1.14.2.1 (colored)

remove support for legacy rx-flip mode for xennet(4)/xvif(4), making
rx-copy (first shipped in NetBSD 6.0 in 2012) the only supported
mode

this is mostly to simplify maintenance and future development

rx-flip is not supported by Linux Dom0/DomU, and NetBSD Dom0/DomU
defaults to rx-copy for over 8 years now too, so there is little
need to keep the support for compatibility

besides compatibility there is no other reason to keep rx-flip -
page transfer is generally slower than copy due to necessary MMU/TLB
manipulation, especially on MP systems

Revision 1.98 / (download) - annotate - [select for diffs], Sun Apr 5 14:20:18 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.97: +3 -3 lines
Diff to previous 1.97 (colored) to selected 1.14.2.1 (colored)

no need to pollute dmesg by xennet_watchdog(), turn the message into DPRINTFN()

Revision 1.97 / (download) - annotate - [select for diffs], Fri Mar 27 18:37:30 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.96: +13 -44 lines
Diff to previous 1.96 (colored) to selected 1.14.2.1 (colored)

use standard deferred if_start framework instead of custom variant

Revision 1.96 / (download) - annotate - [select for diffs], Thu Mar 26 18:50:16 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.95: +3 -8 lines
Diff to previous 1.95 (colored) to selected 1.14.2.1 (colored)

in xennet_tx_complete() replace the grant status condition with just KASSERT()

it's really a possible programming error rather than something actually
happening in wild - since rev. 1.57 in 2012 this condition leaked
locked mutex, and nobody noticed

Revision 1.95 / (download) - annotate - [select for diffs], Thu Mar 26 18:32:21 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.94: +17 -31 lines
Diff to previous 1.94 (colored) to selected 1.14.2.1 (colored)

Stop using IFF_OACTIVE, just keep processing until we fill the Tx ring

xennet_tx_complete() is now called only in xennet_softstart() just
before processing Tx queue; xennet_handler() just schedules the
softint for xennet_softstart() iff the Tx ring list is completely empty

no performance changes observed

XXX the detach and suspend code expects xennet_handler() to collect
XXX the Tx responses, the tsleep() loop should still work since the tsleep()
XXX would allow the softint to trigger; untested though

Revision 1.94 / (download) - annotate - [select for diffs], Sun Mar 22 11:20:59 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.93: +6 -6 lines
Diff to previous 1.93 (colored) to selected 1.14.2.1 (colored)

actually in data_validated case, there is no need to inspect the data for Rx,
simply set the supported csum offload flags to skip the software csum
verification

Revision 1.93 / (download) - annotate - [select for diffs], Sun Mar 22 00:11:02 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.92: +11 -5 lines
Diff to previous 1.92 (colored) to selected 1.14.2.1 (colored)

add support for skipping IPv6 checksum validation aka offloading -
for xennet(4) both Rx and Tx, for xvif(4) only Tx for now

Revision 1.92 / (download) - annotate - [select for diffs], Thu Mar 19 10:53:43 2020 UTC (4 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.91: +5 -4 lines
Diff to previous 1.91 (colored) to selected 1.14.2.1 (colored)

add support for skipping IPv4 checksums

Revision 1.91 / (download) - annotate - [select for diffs], Wed Mar 18 19:23:13 2020 UTC (4 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.90: +6 -5 lines
Diff to previous 1.90 (colored) to selected 1.14.2.1 (colored)

use NET[RT]XF_data_validated flag to mark when Tx packet has valid
checksum; this is used to skip software checksum validation on
xennet Rx side when configured for Rx offloading

in Dom0 assume that checksum is valid when the Tx mbuf has no offload flags
- in that case either it's local packet where checksum has just been
computed in software, or forwarded external packet already
verified when received on Dom0

practical offshot of this is that DomU doesn't re-verify checksum of
packets forwarded from external hosts, e.g. via bridge(4)

Revision 1.90 / (download) - annotate - [select for diffs], Mon Mar 16 20:51:36 2020 UTC (4 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored) to selected 1.14.2.1 (colored)

drop the disabled M_EXT_ROMAP mbuf code, convert xennet_checksum_fill()
to use in_undefer_cksum() instead of custom code to compute the checksum
for Rx packets, and set csum_data appropriately for eventual hw offloading

make it possible to skip the sw checksum computation by appropriate Rx
flag similarily as we do for Tx

XXX for now, the Rx flag is mostly for testing as it only works for
dom0<->domu, need some further network stack changes to arrange for
the checksum to be eventually computed when packets goes outside xen

Revision 1.89 / (download) - annotate - [select for diffs], Mon Mar 16 20:49:22 2020 UTC (4 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.88: +6 -9 lines
Diff to previous 1.88 (colored) to selected 1.14.2.1 (colored)

drop the disabled M_EXT_ROMAP mbuf code, and convert xennet_checksum_fill()
to use in_undefer_cksum() instead of custom code to compute the checksum
for incoming packets

make it possible to defer/skip the checksum computation by appropriate Rx
flag similarily as we do for Tx; with

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:18:34 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.87: +8 -8 lines
Diff to previous 1.87 (colored) next main 1.88 (colored) to selected 1.14.2.1 (colored)

Sync with head.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Jan 29 05:41:48 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.87: +8 -8 lines
Diff to previous 1.87 (colored) to selected 1.14.2.1 (colored)

Adopt <net/if_stats.h>.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Oct 30 07:40:06 2019 UTC (4 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.86: +7 -7 lines
Diff to previous 1.86 (colored) to selected 1.14.2.1 (colored)

Switch to new PTE bits.

Revision 1.77.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:56 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.77: +30 -12 lines
Diff to previous 1.77 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.86 / (download) - annotate - [select for diffs], Sat Mar 9 08:42:25 2019 UTC (5 years, 1 month ago) by maxv
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, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.85: +4 -4 lines
Diff to previous 1.85 (colored) to selected 1.14.2.1 (colored)

Start replacing the x86 PTE bits.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Feb 14 08:18:26 2019 UTC (5 years, 2 months ago) by cherry
Branch: MAIN
Changes since 1.84: +15 -2 lines
Diff to previous 1.84 (colored) to selected 1.14.2.1 (colored)

Welcome XENPVHVM mode.

It is UP only, has xbd(4) and xennet(4) as PV drivers.

The console is com0 at isa and the native portion is very
rudimentary AT architecture, so is probably suboptimal to
run without PV support.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Feb 5 06:17:02 2019 UTC (5 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored) to selected 1.14.2.1 (colored)

 Remove very old IFF_NOTRAILERS flag.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Feb 2 12:32:55 2019 UTC (5 years, 2 months ago) by cherry
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored) to selected 1.14.2.1 (colored)

Switch NetBSD/xen to use XEN api tag RELEASE-4.11.1

The headers for this api are in sys/external/mit/xen-include-public/dist/

Revision 1.70.6.2 / (download) - annotate - [select for diffs], Mon Jan 21 20:12:15 2019 UTC (5 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.70.6.1: +3 -3 lines
Diff to previous 1.70.6.1 (colored) to branchpoint 1.70 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1166):

	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.74

Don't call xennet_softstart from hard interrupt; schedule softint.

Fixes panic in bpf_mtap which expects to be called only in softint.

Revision 1.74.2.5 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:46 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.74.2.4: +5 -5 lines
Diff to previous 1.74.2.4 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.82 / (download) - annotate - [select for diffs], Mon Dec 24 14:55:42 2018 UTC (5 years, 3 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.81: +5 -5 lines
Diff to previous 1.81 (colored) to selected 1.14.2.1 (colored)

Bifurcate the interrupt establish functions between XEN and non-XEN

Thus intr_establish_xname() becomes xen_intr_establish_xname() etc.

One consequence of this is that dom0 devices expect the native
function calls to be available and we thus provide weak aliasing for
dom0 builds to succeed. XEN and non-XEN devices are distinguished by
the PIC they are established on. XEN interrupts are exclusively
established on xen_pic, while dom0 interrupts are established on
natively available PICs.

This allows us an orthogonal path to xen device management (eg:
xenstore events) in XENPVHVM, without having to worry about unifying
the vector entry paths, etc., which is quite challenging.

Revision 1.74.2.4 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:28 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.74.2.3: +4 -4 lines
Diff to previous 1.74.2.3 (colored) to branchpoint 1.74 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.81 / (download) - annotate - [select for diffs], Fri Oct 26 05:33:21 2018 UTC (5 years, 5 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored) to selected 1.14.2.1 (colored)

Decompose hypervisor_enable_event() into functional steps.

The hypervisor_unmask_event() step is relevant for any event.

The pirq related step is only relevant for pirq bound events.

Prune blanket usage of this, so that usage is semantically appropriate.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Oct 24 03:59:33 2018 UTC (5 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) to selected 1.14.2.1 (colored)

When using the intr_establish_xname() interface to register
XEN events, follow established x86/intr.c conventions - set
the 'legacy' irq value to -1, to indicate that the pic, pin
combination (&xen_pic, port) is used for registration.

Revision 1.74.2.3 / (download) - annotate - [select for diffs], Thu Sep 6 06:55:44 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.74.2.2: +9 -4 lines
Diff to previous 1.74.2.2 (colored) to branchpoint 1.74 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.79 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:29 2018 UTC (5 years, 7 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored) to selected 1.14.2.1 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.78 / (download) - annotate - [select for diffs], Fri Aug 10 06:23:12 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.77: +8 -3 lines
Diff to previous 1.77 (colored) to selected 1.14.2.1 (colored)

Don't unconditionally call pmap_extract_ma, it is part of XENNET_DEBUG.
This call costs us.

Revision 1.74.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:43 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.74.2.1: +3 -3 lines
Diff to previous 1.74.2.1 (colored) to branchpoint 1.74 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.70.6.1 / (download) - annotate - [select for diffs], Thu Jul 26 23:55:29 2018 UTC (5 years, 8 months ago) by snj
Branch: netbsd-8
Changes since 1.70: +2 -3 lines
Diff to previous 1.70 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #938):
	sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
	sys/arch/amiga/dev/if_es.c: revision 1.58
	sys/arch/amiga/dev/if_qn.c: revision 1.45
	sys/arch/arm/at91/at91emac.c: revision 1.20
	sys/arch/arm/ep93xx/epe.c: revision 1.37
	sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
	sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
	sys/arch/mac68k/dev/if_mc.c: revision 1.46
	sys/arch/macppc/dev/am79c950.c: revision 1.39
	sys/arch/newsmips/apbus/if_sn.c: revision 1.40
	sys/arch/next68k/dev/mb8795.c: revision 1.59
	sys/arch/playstation2/dev/if_smap.c: revision 1.25
	sys/arch/playstation2/dev/if_smap.c: revision 1.26
	sys/arch/sun2/dev/if_ec.c: revision 1.28
	sys/arch/sun3/dev/if_ie.c: revision 1.63
	sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
	sys/dev/bi/if_ni.c: revision 1.45
	sys/dev/cadence/if_cemac.c: revision 1.12
	sys/dev/ic/am7990.c: revision 1.78
	sys/dev/ic/am79900.c: revision 1.27
	sys/dev/ic/an.c: revision 1.67
	sys/dev/ic/cs89x0.c: revision 1.40
	sys/dev/ic/dm9000.c: revision 1.13
	sys/dev/ic/dm9000.c: revision 1.14
	sys/dev/ic/dp8390.c: revision 1.88
	sys/dev/ic/elink3.c: revision 1.141
	sys/dev/ic/elinkxl.c: revision 1.122
	sys/dev/ic/hme.c: revision 1.98
	sys/dev/ic/i82586.c: revision 1.77
	sys/dev/ic/lance.c: revision 1.53
	sys/dev/ic/mb86950.c: revision 1.27
	sys/dev/ic/mb86960.c: revision 1.86
	sys/dev/ic/mtd803.c: revision 1.34
	sys/dev/ic/pdq_ifsubr.c: revision 1.59
	sys/dev/ic/rrunner.c: revision 1.86
	sys/dev/ic/seeq8005.c: revision 1.58
	sys/dev/ic/sgec.c: revision 1.47
	sys/dev/ic/smc90cx6.c: revision 1.72
	sys/dev/ic/smc91cxx.c: revision 1.96
	sys/dev/ic/tropic.c: revision 1.49
	sys/dev/ic/wi.c: revision 1.245
	sys/dev/isa/if_eg.c: revision 1.93
	sys/dev/isa/if_el.c: revision 1.95
	sys/dev/isa/if_iy.c: revision 1.101
	sys/dev/ofw/ofnet.c: revision 1.58
	sys/dev/pci/if_alc.c: revision 1.27
	sys/dev/pci/if_de.c: revision 1.152
	sys/dev/pci/if_fpa.c: revision 1.61
	sys/dev/pci/if_jme.c: revision 1.34
	sys/dev/pci/if_tl.c: revision 1.108
	sys/dev/pci/if_vte.c: revision 1.19
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
	sys/dev/pcmcia/if_cnw.c: revision 1.62
	sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
	sys/dev/pcmcia/if_ray.c: revision 1.89
	sys/dev/pcmcia/if_xi.c: revision 1.81
	sys/dev/pcmcia/mhzc.c: revision 1.51
	sys/dev/pcmcia/xirc.c: revision 1.34
	sys/dev/qbus/if_de.c: revision 1.33
	sys/dev/qbus/if_qe.c: revision 1.78
	sys/dev/qbus/if_qt.c: revision 1.22
	sys/dev/sbus/be.c: revision 1.87
	sys/dev/sbus/qe.c: revision 1.68
	sys/dev/scsipi/if_se.c: revision 1.96
	sys/dev/usb/if_atu.c: revision 1.59
	sys/net/if_l2tp.c: revision 1.28 via patch
	sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.

Revision 1.77 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:00 2018 UTC (5 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728
Branch point for: phil-wifi
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored) to selected 1.14.2.1 (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.74.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:25:48 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.74: +9 -6 lines
Diff to previous 1.74 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.76 / (download) - annotate - [select for diffs], Sun Jun 24 20:28:58 2018 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-0625
Changes since 1.75: +9 -5 lines
Diff to previous 1.75 (colored) to selected 1.14.2.1 (colored)

mark with XXXSMP all remaining spl*() and tsleep() calls

Revision 1.75 / (download) - annotate - [select for diffs], Fri Jun 22 04:17:41 2018 UTC (5 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.74: +2 -3 lines
Diff to previous 1.74 (colored) to selected 1.14.2.1 (colored)

 It's not required to include net/bpfdesc.h. Remove it.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Jan 25 17:41:49 2018 UTC (6 years, 2 months ago) by riastradh
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.73: +3 -3 lines
Diff to previous 1.73 (colored) to selected 1.14.2.1 (colored)

Don't call xennet_softstart from hard interrupt; schedule softint.

Fixes panic in bpf_mtap which expects to be called only in softint.

Revision 1.62.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:51 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.62.2.1: +54 -47 lines
Diff to previous 1.62.2.1 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored) to selected 1.14.2.1 (colored)

update from HEAD

Revision 1.73 / (download) - annotate - [select for diffs], Sat Nov 11 21:03:01 2017 UTC (6 years, 5 months ago) by riastradh
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.72: +4 -4 lines
Diff to previous 1.72 (colored) to selected 1.14.2.1 (colored)

Restore MP-safety annotations in intr_establish_xname.

In the old API, event_set_handler would assume MP-unsafe for IPL_VM
and MP-safe for all other levels (IPL_SCHED, IPL_HIGH).  The recent
Xen interrupt rototill started passing known_mpsafe=true for _all_
interrupt handlers.  Change it to known_mpsafe=false for the IPL_VM
(= IPL_CLOCK, IPL_NET) ones.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Nov 6 15:27:09 2017 UTC (6 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.71: +9 -7 lines
Diff to previous 1.71 (colored) to selected 1.14.2.1 (colored)

Switch XEN drivers to use intr_establish_xname()/intr_disestablish()

This completes the API transition.

Revision 1.63.2.3 / (download) - annotate - [select for diffs], Sun Sep 24 20:05:03 2017 UTC (6 years, 6 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.63.2.2: +3 -2 lines
Diff to previous 1.63.2.2 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by manu in ticket #1409):
	sys/arch/xen/xen/if_xennet_xenbus.c: 1.65
	sys/arch/xen/xen/xennetback_xenbus.c: 1.53, 1.56 via patch
	sys/net/if_bridge.c: 1.105
	sys/net/if_ether.h: 1.65
	sys/net/if_ethersubr.c: 1.215, 1.235
	sys/net/if_vlan.c: 1.76, 1.77, 1.83, 1.88, 1.94
Protect vlan_unconfig with a mutex
It is not thread-safe but is likely to be executed in concurrent.
See PR 49264 for more detail.
--
Tweak vlan_unconfig
No functional change.
--
Add handling of VLAN packets in if_bridge where the parent interface supports
them (Jean-Jacques.Puig%espci.fr@localhost). Factor out the vlan_mtu enabling and
disabling code.
--
Enable the VLAN mtu capability and check for the adjusted packet size
(Jean-Jacques.Puig at espci.fr).
Factor out the packet-size checking function for clarity.
--
Don't increment the reference count only when it was 0...
From Jean-Jacques.Puig
--
Account for the CRC len (Jean-Jacques.Puig)
--
Fix a bug that the parent interface's callback wasn't called when the vlan
interface is configured. A callback function uses VLAN_ATTACHED() function
which check ec->ec_nvlans, the value should be incremented before calling the
callback. This bug was added in if_vlan.c rev. 1.83 (2015/11/19).

Revision 1.71 / (download) - annotate - [select for diffs], Wed Aug 30 16:01:55 2017 UTC (6 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.70: +21 -20 lines
Diff to previous 1.70 (colored) to selected 1.14.2.1 (colored)

Make these pages non-executable, and style.

Revision 1.63.4.6 / (download) - annotate - [select for diffs], Mon Aug 28 17:51:57 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.63.4.5: +26 -17 lines
Diff to previous 1.63.4.5 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:39 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.69: +26 -17 lines
Diff to previous 1.69 (colored) next main 1.70 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.63.2.2 / (download) - annotate - [select for diffs], Sun Mar 26 16:08:12 2017 UTC (7 years ago) by snj
Branch: netbsd-7
Changes since 1.63.2.1: +26 -17 lines
Diff to previous 1.63.2.1 (colored) to branchpoint 1.63 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1379):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.70 via patch
Try to be smarted in the rx path: if the packet is small enough copy the
data to the mbuf's data area instead of allocating a new page from the pool.
While there fix a struct xennet_rxreq leak if xennet_checksum_fill()
fails with ENOMEM.

Revision 1.68.2.2 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:23 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.68.2.1: +26 -17 lines
Diff to previous 1.68.2.1 (colored) to branchpoint 1.68 (colored) next main 1.69 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.70 / (download) - annotate - [select for diffs], Sat Mar 4 19:11:01 2017 UTC (7 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.69: +26 -17 lines
Diff to previous 1.69 (colored) to selected 1.14.2.1 (colored)

Try to be smarted in the rx path: if the packet is small enough copy the
data to the mbuf's data area instead of allocating a new page from the pool.
While there fix a struct xennet_rxreq leak if xennet_checksum_fill()
fails with ENOMEM.

Revision 1.63.4.5 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:24 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.63.4.4: +2 -8 lines
Diff to previous 1.63.4.4 (colored) to branchpoint 1.63 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.68.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:29 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.68: +2 -8 lines
Diff to previous 1.68 (colored) to selected 1.14.2.1 (colored)

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

Revision 1.69 / (download) - annotate - [select for diffs], Thu Dec 15 09:28:04 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.68: +2 -8 lines
Diff to previous 1.68 (colored) to selected 1.14.2.1 (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.63.4.4 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:00 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.63.4.3: +3 -3 lines
Diff to previous 1.63.4.3 (colored) to branchpoint 1.63 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.68 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:13 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored) to selected 1.14.2.1 (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.63.4.3 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:07 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.63.4.2: +4 -4 lines
Diff to previous 1.63.4.2 (colored) to branchpoint 1.63 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Sun Mar 6 18:52:06 2016 UTC (8 years, 1 month ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, 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.63: +3 -3 lines
Diff to previous 1.63 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1125):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.67
In xennet_xenbus_detach(), remove the event handler early (just after
xennet_stop()) so that we don't get events while slepping (e.g.
in softint_disestablish()) when some structures have already been
freed.
Problem reported and patch tested by Rohan Desai.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Feb 16 08:41:32 2016 UTC (8 years, 2 months ago) by bouyer
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored) to selected 1.14.2.1 (colored)

In xennet_xenbus_detach(), remove the event handler early (just after
xennet_stop()) so that we don't get events while slepping (e.g.
in softint_disestablish()) when some structures have already been
freed.
Problem reported and patch tested by Rohan Desai.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:10 2016 UTC (8 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored) to selected 1.14.2.1 (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.63.4.2 / (download) - annotate - [select for diffs], Sun Dec 27 12:09:45 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.63.4.1: +3 -2 lines
Diff to previous 1.63.4.1 (colored) to branchpoint 1.63 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.65 / (download) - annotate - [select for diffs], Thu Nov 19 17:01:40 2015 UTC (8 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.64: +3 -2 lines
Diff to previous 1.64 (colored) to selected 1.14.2.1 (colored)

Enable the VLAN mtu capability and check for the adjusted packet size
(Jean-Jacques.Puig at espci.fr).
Factor out the packet-size checking function for clarity.

Revision 1.63.4.1 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:05 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.64 / (download) - annotate - [select for diffs], Mon Apr 13 21:18:40 2015 UTC (9 years ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored) to selected 1.14.2.1 (colored)

MD rnd.h cleanups.  Please let me know if I broke anything!

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:30 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored) to selected 1.14.2.1 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Aug 10 16:44:35 2014 UTC (9 years, 8 months ago) by tls
Branch: MAIN
CVS Tags: tls-maxphys-base, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Branch point for: nick-nhusb, netbsd-7
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored) to selected 1.14.2.1 (colored)

Merge tls-earlyentropy branch into HEAD.

Revision 1.62.12.1 / (download) - annotate - [select for diffs], Mon Apr 7 03:37:31 2014 UTC (10 years ago) by tls
Branch: tls-earlyentropy
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored) next main 1.63 (colored) to selected 1.14.2.1 (colored)

Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
   RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
   and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
   places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
   that had stubbed out code, other minor cleanups.

Revision 1.53.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:20:36 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.53.2.1: +12 -14 lines
Diff to previous 1.53.2.1 (colored) to branchpoint 1.53 (colored) next main 1.54 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.62 / (download) - annotate - [select for diffs], Sat Jun 30 23:36:20 2012 UTC (11 years, 9 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-earlyentropy-base, 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, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys, tls-earlyentropy
Changes since 1.61: +5 -4 lines
Diff to previous 1.61 (colored) to selected 1.14.2.1 (colored)

Use setter to set xenguest_handles.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Jun 30 22:50:37 2012 UTC (11 years, 9 months ago) by jym
Branch: MAIN
Changes since 1.60: +7 -9 lines
Diff to previous 1.60 (colored) to selected 1.14.2.1 (colored)

Extend the xpmap API, as described in [1]. This change is mechanical and
avoids exposing the MD phys_to_machine/machine_to_phys tables directly.
Added:

- xpmap_ptom handles PFN (pseudo physical) to MFN (machine frame number)
translations, and is under control of the domain.
- xpmap_mtop is its counterpart (MFN to PFN), and is under control of
hypervisor.

xpmap_ptom_map()      map a pseudo-phys address to a machine address
xpmap_ptom_unmap()    unmap a pseudo-phys address (invalidation)
xpmap_ptom_isvalid()  check for pseudo-phys address validity

The parameters are physical/machine addresses, like bus_dma/bus_space(9).
As x86 MFNs are tracked by u_long (Xen's choice) while machine addresses
can be 64 bits entities (PAE), use ptoa() to avoid truncation when bit
shifting by PAGE_SHIFT.

I kept the same namespace (xpmap_) to avoid code churn.

[1] http://mail-index.netbsd.org/port-xen/2009/05/09/msg004951.html

XXX will document ptoa/atop/trunc_page separately.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Jun 27 00:37:10 2012 UTC (11 years, 9 months ago) by jym
Branch: MAIN
Changes since 1.59: +7 -8 lines
Diff to previous 1.59 (colored) to selected 1.14.2.1 (colored)

Retire XEN_COMPAT_030001 as detailed on port-xen@:

http://mail-index.netbsd.org/port-xen/2012/06/25/msg007431.html

The xen_p2m API comes next.

ok bouyer@.
Tested on i386 PAE and amd64 (Xen 3.3 on private test bed, and
Xen 3.4 for Amazon EC2).

FWIW, Amazon always reported:

hypervisor0 at mainbus0: Xen version 3.4.3-kaos_t1micro

multiple times for Europe and US West-1, so I guess they are now at
3.4 (32 and 64 bits).

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:12 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.53: +85 -90 lines
Diff to previous 1.53 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.29.2.7 / (download) - annotate - [select for diffs], Fri Feb 24 17:45:29 2012 UTC (12 years, 1 month ago) by sborrill
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.29.2.6: +55 -52 lines
Diff to previous 1.29.2.6 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored) to selected 1.14.2.1 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #1730):
	sys/arch/xen/xen/if_xennet_xenbus.c:	revision 1.59 via patch

Fix receive stall on the domU side when buffers stay a long time in the
network stack or socket buffers.

Revision 1.54.2.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:37 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.54.2.1: +59 -82 lines
Diff to previous 1.54.2.1 (colored) to branchpoint 1.54 (colored) next main 1.55 (colored) to selected 1.14.2.1 (colored)

sync to -current.

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Thu Feb 23 02:30:16 2012 UTC (12 years, 1 month ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.58: +59 -82 lines
Diff to previous 1.58 (colored) next main 1.59 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #33):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.59
Allocating a fixed, limited number of buffers for receive and sending them
to the network stack is a bad idea, because if all receive buffers sits
in socket queues, the interface receive stalls by lack of buffers.
Instead, get receive pages from a pool_cache(9). Copying to a mbuf cluser
would work too, but testings shows this has an important performance hit.
This also simplifies locking.
While there, notify the dom0 when we add some receive buffers (older
linux dom0 didn't care, but newer one do).
Problem reported and fix tested by Brian Marcotte on port-xen

Revision 1.59 / (download) - annotate - [select for diffs], Wed Feb 22 18:54:51 2012 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base10
Changes since 1.58: +59 -82 lines
Diff to previous 1.58 (colored) to selected 1.14.2.1 (colored)

Allocating a fixed, limited number of buffers for receive and sending them
to the network stack is a bad idea, because if all receive buffers sits
in socket queues, the interface receive stalls by lack of buffers.
Instead, get receive pages from a pool_cache(9). Copying to a mbuf cluser
would work too, but testings shows this has an important performance hit.
This also simplifies locking.

While there, notify the dom0 when we add some receive buffers (older
linux dom0 didn't care, but newer one do).

Problem reported and fix tested by Brian Marcotte on port-xen

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:33:46 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.54: +57 -39 lines
Diff to previous 1.54 (colored) to selected 1.14.2.1 (colored)

merge to -current.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Feb 2 19:43:01 2012 UTC (12 years, 2 months ago) by tls
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.57: +2 -15 lines
Diff to previous 1.57 (colored) to selected 1.14.2.1 (colored)

Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Jan 4 10:48:24 2012 UTC (12 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.56: +38 -18 lines
Diff to previous 1.56 (colored) to selected 1.14.2.1 (colored)

Tighten up locking in the network driver.
This probably needs more attention since xennet_rx_mbuf_free() hooks
into the network layer.
The locking can also be made finer grained. Performance testing could
add some insights.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Dec 7 15:47:43 2011 UTC (12 years, 4 months ago) by cegger
Branch: MAIN
Changes since 1.55: +5 -5 lines
Diff to previous 1.55 (colored) to selected 1.14.2.1 (colored)

switch from xen3-public to xen-public.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Dec 4 15:15:41 2011 UTC (12 years, 4 months ago) by cherry
Branch: MAIN
Changes since 1.54: +30 -19 lines
Diff to previous 1.54 (colored) to selected 1.14.2.1 (colored)

[merging from cherry-xenmp]
Make MP aware: use mutex(9) instead of spl(9)

Revision 1.54 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:21 2011 UTC (12 years, 5 months ago) by tls
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored) to selected 1.14.2.1 (colored)

First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Sep 26 21:44:09 2011 UTC (12 years, 6 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.52: +5 -5 lines
Diff to previous 1.52 (colored) to selected 1.14.2.1 (colored)

Fix a fallout with my xensuspend merge: talk_to_backend() returns a
boolean, so checking for "true" with "== 0" is... wrong.

Now xennet(4) should work as expected, and not stay in the InitWait state
(which blocks network communication with the backend).

Thanks to riz@ and sborrill@ for reporting breakage with -current
xennet(4) after my merge.

Revision 1.51.2.2 / (download) - annotate - [select for diffs], Tue Sep 20 18:57:53 2011 UTC (12 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.51.2.1: +28 -21 lines
Diff to previous 1.51.2.1 (colored) to branchpoint 1.51 (colored) next main 1.52 (colored) to selected 1.14.2.1 (colored)

Remove the "xpq lock", since we have per-cpu mmu queues now. This may need further testing. Also add some preliminary locking around queue-ops in the network backend driver

Revision 1.52 / (download) - annotate - [select for diffs], Tue Sep 20 00:12:24 2011 UTC (12 years, 7 months ago) by jym
Branch: MAIN
Changes since 1.51: +116 -26 lines
Diff to previous 1.51 (colored) to selected 1.14.2.1 (colored)

Merge jym-xensuspend branch in -current. ok bouyer@.

Goal: save/restore support in NetBSD domUs, for i386, i386 PAE and amd64.

Executive summary:
- split all Xen drivers (xenbus(4), grant tables, xbd(4), xennet(4))
in two parts: suspend and resume, and hook them to pmf(9).
- modify pmap so that Xen hypervisor does not cry out loud in case
it finds "unexpected" recursive memory mappings
- provide a sysctl(7), machdep.xen.suspend, to command suspend from
userland via powerd(8). Note: a suspend can only be handled correctly
when dom0 requested it, so provide a mechanism that will prevent
kernel to blindly validate user's commands

The code is still in experimental state, use at your own risk: restore
can corrupt backend communications rings; this can completely thrash
dom0 as it will loop at a high interrupt level trying to honor
all domU requests.

XXX PAE suspend does not work in amd64 currently, due to (yet again!)
page validation issues with hypervisor. Will fix.

XXX secondary CPUs are not suspended, I will write the handlers
in sync with cherry's Xen MP work.

Tested under i386 and amd64, bear in mind ring corruption though.

No build break expected, GENERICs and XEN* kernels should be fine.
./build.sh distribution still running. In any case: sorry if it does
break for you, contact me directly for reports.

Revision 1.33.2.13 / (download) - annotate - [select for diffs], Sat Aug 27 15:37:32 2011 UTC (12 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.12: +3 -3 lines
Diff to previous 1.33.2.12 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Sun Aug 21 11:24:10 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.51: +4 -2 lines
Diff to previous 1.51 (colored) to selected 1.14.2.1 (colored)

add locking around mmu flush xpq ops

Revision 1.33.2.12 / (download) - annotate - [select for diffs], Mon Jul 25 00:18:28 2011 UTC (12 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.11: +16 -7 lines
Diff to previous 1.33.2.11 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

Pull-up to my branch some of the improvements I committed to HEAD, but
forgot to reflect here.

Improvements in the attachement routines: in case of error, don't forget
to free() the allocated rings. Should not happen anyway, more a matter
of staying clean.

Revision 1.46.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:07:11 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.46: +22 -8 lines
Diff to previous 1.46 (colored) next main 1.47 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.40.4.4 / (download) - annotate - [select for diffs], Tue May 31 03:04:24 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.40.4.3: +19 -5 lines
Diff to previous 1.40.4.3 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.51 / (download) - annotate - [select for diffs], Mon May 30 13:03:56 2011 UTC (12 years, 10 months ago) by joerg
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, jym-xensuspend-nbase, jym-xensuspend-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored) to selected 1.14.2.1 (colored)

Use proper format string

Revision 1.33.2.11 / (download) - annotate - [select for diffs], Thu May 26 22:30:31 2011 UTC (12 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.10: +8 -4 lines
Diff to previous 1.33.2.10 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

Split allocation and initialization of ring I/O for xbd(4) and xennet(4):
- allocation belongs to _attach()
- init to _resume(), so that it can be used by suspend/resume code too.

Revision 1.29.2.6 / (download) - annotate - [select for diffs], Thu May 19 21:13:07 2011 UTC (12 years, 11 months ago) by bouyer
Branch: netbsd-5
Changes since 1.29.2.5: +4 -2 lines
Diff to previous 1.29.2.5 (colored) to branchpoint 1.29 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by jym in ticket #1609):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.50
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.43
Check that xvif(4) is not already connected before proceeding in the
XenbusStateConnected mode. Under rare occasions, the xenbus watcher
can fire multiple times, overwriting the I/O ring memory mappings with
invalid values. This will lead sooner or later to dom0 panic().
Will ask for pullup. FWIW, xbdback(4) is not affected.
Check status before proceeding further. Avoids spurious watch calls.

Revision 1.29.2.5 / (download) - annotate - [select for diffs], Thu May 19 21:11:15 2011 UTC (12 years, 11 months ago) by bouyer
Branch: netbsd-5
Changes since 1.29.2.4: +18 -6 lines
Diff to previous 1.29.2.4 (colored) to branchpoint 1.29 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by jym in ticket #1608):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.49
Separate xennet(4) backend initialization code ("resume") from the part
that talks with Xenstore to query backend's information. Resuming is now
performed just after xennet(4) attachment instead of waiting for backend
to announce its features in Xenstore and change it state.
This fixes the race observed by Urban Boquist when the domU boots with
root on NFS.
FWIW, the boot code (when root is NFS-backed) can innit() the xennet(4)
interface very early: it tried to access ifnet structures that were not
yet allocated.
Will ask for a pullup. Thanks to Urban for reporting the issue and
investigate it. Confirmed fixed. No regression observed by me for
dynamic attach/detach of xvif(4) and xennet(4) interfaces.
See also http://mail-index.netbsd.org/port-xen/2011/04/18/msg006647.html

Revision 1.33.2.10 / (download) - annotate - [select for diffs], Sat May 7 17:42:09 2011 UTC (12 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.9: +6 -7 lines
Diff to previous 1.33.2.9 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

When it successfully resume a device, return true instead of 0 aka false.

Revision 1.33.2.9 / (download) - annotate - [select for diffs], Mon May 2 22:49:59 2011 UTC (12 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.8: +18 -8 lines
Diff to previous 1.33.2.8 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

Sync with head.

Revision 1.50 / (download) - annotate - [select for diffs], Mon Apr 25 17:01:54 2011 UTC (12 years, 11 months ago) by jym
Branch: MAIN
Changes since 1.49: +4 -2 lines
Diff to previous 1.49 (colored) to selected 1.14.2.1 (colored)

Check status before proceeding further. Avoids spurious watch calls.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Apr 25 00:00:50 2011 UTC (12 years, 11 months ago) by jym
Branch: MAIN
Changes since 1.48: +18 -6 lines
Diff to previous 1.48 (colored) to selected 1.14.2.1 (colored)

Separate xennet(4) backend initialization code ("resume") from the part
that talks with Xenstore to query backend's information. Resuming is now
performed just after xennet(4) attachment instead of waiting for backend
to announce its features in Xenstore and change it state.

This fixes the race observed by Urban Boquist when the domU boots with
root on NFS.

FWIW, the boot code (when root is NFS-backed) can innit() the xennet(4)
interface very early: it tried to access ifnet structures that were not
yet allocated.

Will ask for a pullup. Thanks to Urban for reporting the issue and
investigate it. Confirmed fixed. No regression observed by me for
dynamic attach/detach of xvif(4) and xennet(4) interfaces.

See also http://mail-index.netbsd.org/port-xen/2011/04/18/msg006647.html

Revision 1.40.4.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:41:34 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.40.4.2: +1 -1 lines
Diff to previous 1.40.4.2 (colored) to branchpoint 1.40 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.33.2.8 / (download) - annotate - [select for diffs], Wed Mar 30 23:15:06 2011 UTC (13 years ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.7: +3 -3 lines
Diff to previous 1.33.2.7 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

Sync with my commits in HEAD.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Mar 30 18:33:05 2011 UTC (13 years ago) by jym
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored) to selected 1.14.2.1 (colored)

Do not clobber autoconf messages (and variables, for error reporting)
in xennet(4) handler. Keep if_xname though.

Reported by dyoung@, thanks.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Mar 30 00:17:04 2011 UTC (13 years ago) by jym
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored) to selected 1.14.2.1 (colored)

printf("xennet: ...") => aprint_error_ifnet()

Revision 1.33.2.7 / (download) - annotate - [select for diffs], Mon Mar 28 23:04:56 2011 UTC (13 years ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.6: +8 -2 lines
Diff to previous 1.33.2.6 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD. TODO before merge:
- shortcut for suspend code in sysmon, when powerd(8) is not running.
Borrow ``xs_watch'' thread context?
- bug hunting in xbd + xennet resume. Rings are currently thrashed upon
resume, so current implementation force flush them on suspend. It's not
really needed.

Revision 1.40.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:52:34 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.40.4.1: +196 -115 lines
Diff to previous 1.40.4.1 (colored) to branchpoint 1.40 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.46 / (download) - annotate - [select for diffs], Tue Jan 11 23:22:19 2011 UTC (13 years, 3 months ago) by jym
Branch: MAIN
CVS Tags: uebayasi-xip-base7, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.45: +8 -2 lines
Diff to previous 1.45 (colored) to selected 1.14.2.1 (colored)

Introduce "vifname" keys for Xen domains. Its value is the interface
name for the vif, e.g. xvif(4) for dom0, and xennet(4) for domU.

ok bouyer@.

See http://mail-index.netbsd.org/port-xen/2011/01/11/msg006405.html

Revision 1.29.2.4 / (download) - annotate - [select for diffs], Sun Nov 21 23:55:58 2010 UTC (13 years, 5 months ago) by riz
Branch: netbsd-5
CVS Tags: matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.29.2.3: +190 -115 lines
Diff to previous 1.29.2.3 (colored) to branchpoint 1.29 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by jym in ticket #1473):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.42
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.43
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.45
Features (like feature-rx-copy) are set during XenbusStateInitWait in
backend. So delay xennet_xenbus_resume() up to notification of
backend state change.
This avoids a race that happens during dynamic attach/detach of network
interfaces with xm(1), where frontend queries xenstore for features not
yet reported by backend. This does not happen during normal domU boot,
as the backend has enough time to fill in these entries before frontend
asks for them.
Issue was reported by sborrill@: detaching xennet interfaces with RX copy
mode enabled turns them back during attach to RX flip mode due to the race.
feature-rx-copy support is part of another patch.
Handle error case (avoid changing to XenbusStateConnected when resume
failed)
Implement feature-rx-copy support in xennet (domU network frontend).
Instead of flipping pages back and forth between dom0 and domU for the
network RX queue, feature-rx-copy tells frontend to use content copy
instead.
This is the only mode supported by the dom0 Linux pv_ops backend. NetBSD
domU and dom0 can still fall back to flipping, when needed.
Copy is supposed to be faster than flipping, as it does not require
MMU manipulation and TLB shootdowns.
Based on patch provided by Hideki ONO. Thanks!
See also http://mail-index.netbsd.org/port-xen/2010/09/24/msg006265.html
and http://mail-index.netbsd.org/port-xen/2010/10/16/msg006312.html
ok bouyer@.
XXX will ask for a pull-up after 5.1 is branched.

Revision 1.33.2.6 / (download) - annotate - [select for diffs], Sun Oct 24 22:48:22 2010 UTC (13 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.5: +196 -127 lines
Diff to previous 1.33.2.5 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.40.2.2 / (download) - annotate - [select for diffs], Fri Oct 22 07:21:44 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.40.2.1: +188 -113 lines
Diff to previous 1.40.2.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD (-D20101022).

Revision 1.45 / (download) - annotate - [select for diffs], Sun Oct 17 17:10:44 2010 UTC (13 years, 6 months ago) by jym
Branch: MAIN
CVS Tags: uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, matt-mips64-premerge-20101231
Changes since 1.44: +184 -103 lines
Diff to previous 1.44 (colored) to selected 1.14.2.1 (colored)

Implement feature-rx-copy support in xennet (domU network frontend).

Instead of flipping pages back and forth between dom0 and domU for the
network RX queue, feature-rx-copy tells frontend to use content copy
instead.

This is the only mode supported by the dom0 Linux pv_ops backend. NetBSD
domU and dom0 can still fall back to flipping, when needed.

Copy is supposed to be faster than flipping, as it does not require
MMU manipulation and TLB shootdowns.

Based on patch provided by Hideki ONO. Thanks!

See also http://mail-index.netbsd.org/port-xen/2010/09/24/msg006265.html
and http://mail-index.netbsd.org/port-xen/2010/10/16/msg006312.html

ok bouyer@.

XXX will ask for a pull-up after 5.1 is branched.

Revision 1.44 / (download) - annotate - [select for diffs], Sat Oct 16 00:20:05 2010 UTC (13 years, 6 months ago) by jym
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored) to selected 1.14.2.1 (colored)

size_t: %d => %zd

Revision 1.43 / (download) - annotate - [select for diffs], Sat Oct 16 00:18:06 2010 UTC (13 years, 6 months ago) by jym
Branch: MAIN
Changes since 1.42: +5 -4 lines
Diff to previous 1.42 (colored) to selected 1.14.2.1 (colored)

Handle error case (avoid changing to XenbusStateConnected when resume
failed)

Revision 1.42 / (download) - annotate - [select for diffs], Sat Oct 16 00:12:08 2010 UTC (13 years, 6 months ago) by jym
Branch: MAIN
Changes since 1.41: +6 -13 lines
Diff to previous 1.41 (colored) to selected 1.14.2.1 (colored)

Features (like feature-rx-copy) are set during XenbusStateInitWait in
backend. So delay xennet_xenbus_resume() up to notification of
backend state change.

This avoids a race that happens during dynamic attach/detach of network
interfaces with xm(1), where frontend queries xenstore for features not
yet reported by backend. This does not happen during normal domU boot,
as the backend has enough time to fill in these entries before frontend
asks for them.

Issue was reported by sborrill@: detaching xennet interfaces with RX copy
mode enabled turns them back during attach to RX flip mode due to the race.

feature-rx-copy support is part of another patch.

Revision 1.25.4.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:53:00 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25.4.3: +4 -7 lines
Diff to previous 1.25.4.3 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.40.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:14 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.40: +4 -7 lines
Diff to previous 1.40 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:40:01 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.40: +4 -7 lines
Diff to previous 1.40 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.29.2.1.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:33:45 2010 UTC (14 years ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.29.2.1: +14 -2 lines
Diff to previous 1.29.2.1 (colored) next main 1.29.2.2 (colored) to selected 1.14.2.1 (colored)

sync to netbsd-5

Revision 1.41 / (download) - annotate - [select for diffs], Mon Apr 5 07:19:32 2010 UTC (14 years ago) by joerg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base2, uebayasi-xip-base1
Changes since 1.40: +4 -7 lines
Diff to previous 1.40 (colored) to selected 1.14.2.1 (colored)

Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.

Revision 1.25.4.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:10 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25.4.2: +4 -21 lines
Diff to previous 1.25.4.2 (colored) to branchpoint 1.25 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.40 / (download) - annotate - [select for diffs], Tue Jan 19 22:06:23 2010 UTC (14 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.39: +4 -11 lines
Diff to previous 1.39 (colored) to selected 1.14.2.1 (colored)

Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.

Revision 1.33.2.5 / (download) - annotate - [select for diffs], Sun Nov 1 21:43:28 2009 UTC (14 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.4: +107 -29 lines
Diff to previous 1.33.2.4 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

- Upgrade suspend/resume code to comply with Xen2 removal.
- Add support for PAE domUs suspend/resume.
- Fix an issue regarding initialization of the xbd ring I/O that could end
badly during resume, with invalid block operations submitted to dom0 backend.

NetBSD supports PAE under x86_32 by considering the L2 page as being
4 pages long instead of 1.

Xen validates the page types during resume. Sadly, the hypervisor handles
alternative recursive mappings (== PG/PD entries pointing to pages other
than self) inadequately, which could lead to incorrect page pinning.

As a result, the important change with this patch is to clear these alternative
mappings during suspend, and reset them back to their former self upon
resume. For PAE, approx. all 4 PDIR_SLOT_PTEs could be considered as
alternative recursive mappings.

See comments in pmap.c for further details.

Now, let the testing and bug hunting begin.

Revision 1.33.2.4 / (download) - annotate - [select for diffs], Sun Nov 1 13:58:47 2009 UTC (14 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.3: +30 -131 lines
Diff to previous 1.33.2.3 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Oct 23 02:32:34 2009 UTC (14 years, 6 months ago) by snj
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.38: +2 -7 lines
Diff to previous 1.38 (colored) to selected 1.14.2.1 (colored)

Remove 3rd and 4th clauses.  OK cl@ (copyright holder).

Revision 1.38 / (download) - annotate - [select for diffs], Mon Oct 19 18:41:11 2009 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.37: +2 -7 lines
Diff to previous 1.37 (colored) to selected 1.14.2.1 (colored)

Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !

Revision 1.29.2.3 / (download) - annotate - [select for diffs], Mon Sep 28 01:31:46 2009 UTC (14 years, 6 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1
Changes since 1.29.2.2: +8 -2 lines
Diff to previous 1.29.2.2 (colored) to branchpoint 1.29 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1027):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.36
Patch from Brian Marcotte on port-xen@:
write a "feature-rx-notify" to the xenstore, which is used by recent
linux dom0 kernels. This reduce packet loss when using a NetBSD domU
on such linux dom0.
This entry is ignored by NetBSD and older linux domUs.

Revision 1.25.4.2 / (download) - annotate - [select for diffs], Wed Aug 19 18:46:55 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25.4.1: +3 -3 lines
Diff to previous 1.25.4.1 (colored) to branchpoint 1.25 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Jul 29 12:02:09 2009 UTC (14 years, 8 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored) to selected 1.14.2.1 (colored)

remove Xen2 support.
ok bouyer@

Revision 1.33.2.3 / (download) - annotate - [select for diffs], Sun May 31 20:15:37 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.2: +39 -15 lines
Diff to previous 1.33.2.2 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

Modifications for the Xen suspend/migrate/resume branch:

- introduce xenbus_device_{suspend,resume}() functions. These are routines
used to suspend/resume MI parts of the Xenbus device interfaces, like updating
frontend/backend devices' paths found in XenStore.

- introduce HYPERVISOR_sysctl(), an hypercall used only by Xentools to obtain
information from hypervisor (listing VMs, printing console, etc.). I use it
to query xenconsole from ddb(), as a last resort in case of a panic() in
dom0 (xm being not available). Currently unused in the branch; could be, if
requested.

- disable the rwlock(9) used to protect code that could use transient MFNs.
It could trigger nasty context switches in place it should not to.

- fix some bugs in the xennet/xbd suspend/resume pmf(9) handlers.

- following XenSource's design, talk_to_otherend() is now called
watch_otherend(), and free_otherend_details() is used by Xenbus device
suspend/resume routines.

- some slight modifications in pmap regarding APDP. Introduce an inline
function (pmap_unmap_apdp_pde()) that clears APDP entry for the current pmap.

- similarly, implement pmap_unmap_all_apdp_pdes() that iterates through all
pmaps and tears down APDP, as Xen does not handle them properly.

TODO/XXX:

- pmap_unmap_apdp_pde() does not handle APDP shadow entry of PAE. It will,
once I figure out how PAE uses it.

- revisit the pmap locking issue regarding transient MFNs. As NetBSD does not
use kernel preemption and MP for Xen, this could be skipped momentarily. See
http://mail-index.netbsd.org/port-xen/2009/04/27/msg004903.html for details.

- fix a bug regarding grant tables which could technically DoS a dom0 if
ridiculously high consumer/producer indexes are passed down in the ring during
a resume.

All in all, once the grant table index issue and APDP PAE are fixed, next step
is to torture test this branch.

Tested under i386 PAE and non-PAE, Xen3 dom0 and domU. amd64 is only compile
tested.

Revision 1.14.2.2 / (download) - annotate - [select for diffs], Wed May 13 19:41:07 2009 UTC (14 years, 11 months ago) by bouyer
Branch: netbsd-4
Changes since 1.14.2.1: +8 -2 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

Pull up following revision(s) (requested by jym in ticket #1316):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.35
Do not forget to detach rnd(4) device when removing a xennet device.
Ok by bouyer@ in private mail.

Revision 1.7.2.8 / (download) - annotate - [select for diffs], Wed May 13 19:39:08 2009 UTC (14 years, 11 months ago) by bouyer
Branch: netbsd-3
Changes since 1.7.2.7: +8 -2 lines
Diff to previous 1.7.2.7 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by jym in ticket #2013):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.35
Do not forget to detach rnd(4) device when removing a xennet device.
Ok by bouyer@ in private mail.

Revision 1.33.2.2 / (download) - annotate - [select for diffs], Wed May 13 17:18:50 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33.2.1: +23 -2 lines
Diff to previous 1.33.2.1 (colored) to branchpoint 1.33 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Wed May 13 01:05:20 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
Changes since 1.29.2.1: +8 -2 lines
Diff to previous 1.29.2.1 (colored) to branchpoint 1.29 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by jym in ticket #754):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.35
Do not forget to detach rnd(4) device when removing a xennet device.
Ok by bouyer@ in private mail.

Revision 1.25.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:12:14 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25: +146 -41 lines
Diff to previous 1.25 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.36 / (download) - annotate - [select for diffs], Sat May 2 18:18:44 2009 UTC (14 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, jymxensuspend-base
Changes since 1.35: +8 -2 lines
Diff to previous 1.35 (colored) to selected 1.14.2.1 (colored)

Patch from Brian Marcotte on port-xen@:
write a "feature-rx-notify" to the xenstore, which is used by recent
linux dom0 kernels. This reduce packet loss when using a NetBSD domU
on such linux dom0.
This entry is ignored by NetBSD and older linux domUs.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Apr 29 22:21:49 2009 UTC (14 years, 11 months ago) by jym
Branch: MAIN
Changes since 1.34: +8 -2 lines
Diff to previous 1.34 (colored) to selected 1.14.2.1 (colored)

Do not forget to detach rnd(4) device when removing a xennet device.

Ok by bouyer@ in private mail.

Revision 1.27.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:35:01 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.27.2.2: +10 -2 lines
Diff to previous 1.27.2.2 (colored) next main 1.28 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.7.2.7 / (download) - annotate - [select for diffs], Fri Mar 20 14:55:32 2009 UTC (15 years, 1 month ago) by msaitoh
Branch: netbsd-3
Changes since 1.7.2.6: +10 -2 lines
Diff to previous 1.7.2.6 (colored) to branchpoint 1.7 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1996):
	sys/arch/xen/xen/if_xennet_xenbus.c	1.34
	src/sys/arch/xen/xen/xbd_xenbus.c	1.39

Fix rnd(4) support for Xen3 xennet
Add rnd(4) support to Xen3 xbd
Should fix port-xen/40739.

Revision 1.14.2.1 / (download) - annotate - [selected], Fri Mar 20 14:28:40 2009 UTC (15 years, 1 month ago) by msaitoh
Branch: netbsd-4
Changes since 1.14: +10 -2 lines
Diff to previous 1.14 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1282):
	sys/arch/xen/xen/if_xennet_xenbus.c	1.34
	src/sys/arch/xen/xen/xbd_xenbus.c	1.39

Fix rnd(4) support for Xen3 xennet
Add rnd(4) support to Xen3 xbd
Should fix port-xen/40739.

Revision 1.29.2.1 / (download) - annotate - [select for diffs], Sun Mar 8 03:12:50 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.29: +10 -2 lines
Diff to previous 1.29 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #545):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.34
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.39
Fix rnd(4) support for Xen3 xennet
Add rnd(4) support to Xen3 xbd
Should fix port-xen/40739.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Mar 3 19:04:41 2009 UTC (15 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.33: +10 -2 lines
Diff to previous 1.33 (colored) to selected 1.14.2.1 (colored)

Fix rnd(4) support for Xen3 xennet
Add rnd(4) support to Xen3 xbd
Should fix port-xen/40739.

Revision 1.27.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:29:49 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.27.2.1: +87 -16 lines
Diff to previous 1.27.2.1 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Mon Feb 9 00:03:55 2009 UTC (15 years, 2 months ago) by jym
Branch: jym-xensuspend
Changes since 1.33: +95 -29 lines
Diff to previous 1.33 (colored) to selected 1.14.2.1 (colored)

Initial code for xen save/restore/migrate facilities.

- split the attach code of frontends in two half: one that is only needed
during autoconf(9) attach/detach phases, and one used at each save/restore
of device state (between suspend and resume).

Applies to hypervisor, xencons, xenbus, xbd, and xennet.

- add a rwlock(9) ("ptom_lock") to protect the different parts in the kernel
 that manipulate MFNs (which could change between a suspend and a resume,
without the kernel noticing it). Parts that require MFNs acquire a reader lock,
while suspend code will acquire a writer lock to ensure that no-other parts
in kernel still use MFNs.

- integrate the suspend code with sysmon.

- various things in pmap(9), and clock.

TODO:
- factorize code a bit more inside frontends drivers.
- remove all alternative recursive (APDP_PDE) mappings found in PD/PT during
suspend, as Xen does not support them.
- abstract the ptom_lock locking, it is only required when kernel preemption
is enabled, or on MP systems.

Current code works mostly. You may experience difficulties in some corner
cases (dom0 warnings about xennet interface errors, and Xen tools failing to
 validate NetBSD's alternative pmaps).

Revision 1.33 / (download) - annotate - [select for diffs], Sun Feb 8 19:05:50 2009 UTC (15 years, 2 months ago) by jym
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.32: +87 -16 lines
Diff to previous 1.32 (colored) to selected 1.14.2.1 (colored)

- add comments
- wrap long lines for easier reading
- make some debug messages a bit more relevant

Revision 1.27.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:17:12 2009 UTC (15 years, 3 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.27: +31 -17 lines
Diff to previous 1.27 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.23.6.2 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:39 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.23.6.1: +39 -25 lines
Diff to previous 1.23.6.1 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jan 16 20:16:47 2009 UTC (15 years, 3 months ago) by jym
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.31: +6 -6 lines
Diff to previous 1.31 (colored) to selected 1.14.2.1 (colored)

Replace x86 memory fences in Xen drivers by their Xen equivalents, to reduce
MD dependency:

x86_lfence() => xen_rmb()
x86_sfence() => xen_wmb()
x86_mfence() => xen_mb()

Discussed in
http://mail-index.netbsd.org/port-xen/2009/01/15/msg004655.html

Ok by bouyer@.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jan 15 14:51:30 2009 UTC (15 years, 3 months ago) by jym
Branch: MAIN
Changes since 1.30: +2 -3 lines
Diff to previous 1.30 (colored) to selected 1.14.2.1 (colored)

Remove unneeded x86_lfence(). Xen RING macros use memory fences internally, and
hypercalls are also memory fences.

Ok by bouyer@.

Revision 1.25.10.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:13:43 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.25: +37 -22 lines
Diff to previous 1.25 (colored) next main 1.26 (colored) to selected 1.14.2.1 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Nov 13 18:44:51 2008 UTC (15 years, 5 months ago) by cegger
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (colored) to selected 1.14.2.1 (colored)

Finish preparation to new interface.
New interface not yet used by default. It needs some testing first.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Oct 30 10:12:59 2008 UTC (15 years, 5 months ago) by cegger
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC2, netbsd-5-0-RC1
Branch point for: netbsd-5
Changes since 1.28: +7 -4 lines
Diff to previous 1.28 (colored) to selected 1.14.2.1 (colored)

twiddle with headers: include what is really needed

Revision 1.28 / (download) - annotate - [select for diffs], Mon Oct 27 10:58:22 2008 UTC (15 years, 5 months ago) by cegger
Branch: MAIN
Changes since 1.27: +20 -8 lines
Diff to previous 1.27 (colored) to selected 1.14.2.1 (colored)

change nfs boot behaviour to automatically try next boot method if boot information are incomplete to succeed.
That way, it is possible combine static and dhcp boot:
  For example, to boot diskless you can specify the nfs-server and the rootpath statically. All other information will be taken via dhcp.

Patch has been presented on port-xen, tech-kern and tech-net:
http://mail-index.netbsd.org/port-xen/2008/10/24/msg004488.html
http://mail-index.netbsd.org/tech-kern/2008/10/24/msg003255.html
http://mail-index.netbsd.org/tech-net/2008/10/24/msg000864.html

No comments, no objections.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Oct 25 17:12:29 2008 UTC (15 years, 5 months ago) by jym
Branch: MAIN
Branch point for: nick-hppapmap
Changes since 1.26: +5 -4 lines
Diff to previous 1.26 (colored) to selected 1.14.2.1 (colored)

- add and fix some comments in xennet and xbd code
- add BEST_SUSPENDED macro, the xennet equivalent of BLKIF_STATE_SUSPENDED
for xbd (indicate that backend is in suspended state)
- use GNTST_okay to check the grant table setup status returned by hypercall,
 rather than 0

No functional changes.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Oct 24 18:02:58 2008 UTC (15 years, 5 months ago) by jym
Branch: MAIN
CVS Tags: matt-mips64-base2
Changes since 1.25: +9 -10 lines
Diff to previous 1.25 (colored) to selected 1.14.2.1 (colored)

- printf -> aprint_*
- fix and add comments
- make some panic/error messages more relevant
- remove last '\n' in DPRINTK() macros, not required as it is already part of format string.

No functional changes.

Revision 1.23.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:22:55 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.23: +36 -39 lines
Diff to previous 1.23 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Apr 16 18:41:48 2008 UTC (16 years ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base2, yamt-nfs-mp-base, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase, haad-dm-base1
Branch point for: yamt-nfs-mp, haad-dm
Changes since 1.24: +37 -35 lines
Diff to previous 1.24 (colored) to selected 1.14.2.1 (colored)

device_t / softc split
reviewed, tested and approved by bouyer

Revision 1.24 / (download) - annotate - [select for diffs], Sun Apr 6 07:24:20 2008 UTC (16 years ago) by cegger
Branch: MAIN
Changes since 1.23: +25 -30 lines
Diff to previous 1.23 (colored) to selected 1.14.2.1 (colored)

use aprint_*_dev and device_xname

Revision 1.18.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:30 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.18.2.3: +6 -4 lines
Diff to previous 1.18.2.3 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.14.2.1 (colored)

sync with HEAD

Revision 1.10.4.10 / (download) - annotate - [select for diffs], Wed Feb 27 09:33:40 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.9: +3 -3 lines
Diff to previous 1.10.4.9 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored) to selected 1.14.2.1 (colored)

revert the rest of lazy mapping code.

Revision 1.10.4.9 / (download) - annotate - [select for diffs], Wed Feb 27 09:24:06 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.8: +3 -5 lines
Diff to previous 1.10.4.8 (colored) to branchpoint 1.10 (colored) to selected 1.14.2.1 (colored)

drop lazy mapping of mbuf external storage for now, because:
	- it's currently broken wrt asm code.  (cpu_in_cksum)
	- there are other approaches worth to consider.  eg. sf_buf

Revision 1.19.2.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:05:21 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.19.2.2: +6 -4 lines
Diff to previous 1.19.2.2 (colored) to branchpoint 1.19 (colored) next main 1.20 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.10.4.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:22:57 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.7: +6 -4 lines
Diff to previous 1.10.4.7 (colored) to branchpoint 1.10 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jan 23 19:46:46 2008 UTC (16 years, 2 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.22: +6 -4 lines
Diff to previous 1.22 (colored) to selected 1.14.2.1 (colored)

Merge the bouyer-xeni386 branch. This brings in PAE support to NetBSD xeni386
(domU only). PAE support is enabled by 'options PAE', see the new XEN3PAE_DOMU
and INSTALL_XEN3PAE_DOMU kernel config files.

See the comments in arch/i386/include/{pte.h,pmap.h} to see how it works.
In short, we still handle it as a 2-level MMU, with the second level page
directory being 4 pages in size. pmap switching is done by switching the
L2 pages in the L3 entries, instead of loading %cr3. This is almost required
by Xen, which handle the last L2 page (the one mapping 0xc0000000 - 0xffffffff)
in a very special way. But this approach should also work for native PAE
support if ever supported (in fact, the pmap should almost suport native
PAE, what's missing is bootstrap code in locore.S).

Revision 1.22.6.1 / (download) - annotate - [select for diffs], Sun Jan 13 11:27:00 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.22: +6 -4 lines
Diff to previous 1.22 (colored) next main 1.23 (colored) to selected 1.14.2.1 (colored)

Work in progress on xeni386 PAE support:
Make xeni386 build with a 64bit paddr_t. For this vaddr_t vs paddr_t vs
pointers usages had to be clarified.
If 'options PAE' is present in a Xen3 kernel, switch paddr_t, pd_entry_t
and pt_entry_t to 64bits, and add the PAE entry in the __xen_guest ELF section.

Revision 1.18.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:50:19 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.18.2.2: +11 -10 lines
Diff to previous 1.18.2.2 (colored) to branchpoint 1.18 (colored) to selected 1.14.2.1 (colored)

sync with HEAD

Revision 1.17.4.4 / (download) - annotate - [select for diffs], Sun Dec 9 19:36:33 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.17.4.3: +6 -5 lines
Diff to previous 1.17.4.3 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.19.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:18:26 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.19.2.1: +11 -10 lines
Diff to previous 1.19.2.1 (colored) to branchpoint 1.19 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.10.4.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:27:21 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.6: +11 -10 lines
Diff to previous 1.10.4.6 (colored) to branchpoint 1.10 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.15.2.4 / (download) - annotate - [select for diffs], Mon Dec 3 18:40:44 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.15.2.3: +12 -11 lines
Diff to previous 1.15.2.3 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Dec 3 15:34:30 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, matt-armv6-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base
Branch point for: bouyer-xeni386
Changes since 1.21: +6 -5 lines
Diff to previous 1.21 (colored) to selected 1.14.2.1 (colored)

Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.

Revision 1.17.4.3 / (download) - annotate - [select for diffs], Tue Nov 27 19:36:27 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.17.4.2: +7 -7 lines
Diff to previous 1.17.4.2 (colored) to branchpoint 1.17 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Nov 22 16:17:07 2007 UTC (16 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.20: +7 -7 lines
Diff to previous 1.20 (colored) to selected 1.14.2.1 (colored)

Pull up the bouyer-xenamd64 branch to HEAD. This brings in amd64 support
to NetBSD/Xen, both Dom0 and DomU.

Revision 1.19.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:47:09 2007 UTC (16 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.10.4.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:43:46 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.5: +3 -3 lines
Diff to previous 1.10.4.5 (colored) to branchpoint 1.10 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.18.6.2 / (download) - annotate - [select for diffs], Tue Nov 13 16:00:31 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.18.6.1: +3 -3 lines
Diff to previous 1.18.6.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.17.4.2 / (download) - annotate - [select for diffs], Sun Nov 11 16:47:06 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.17.4.1: +3 -3 lines
Diff to previous 1.17.4.1 (colored) to branchpoint 1.17 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.18.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 10:59:44 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.18.2.1: +3 -3 lines
Diff to previous 1.18.2.1 (colored) to branchpoint 1.18 (colored) to selected 1.14.2.1 (colored)

sync with -HEAD

Revision 1.20 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:17 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) to selected 1.14.2.1 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:24:33 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored) to selected 1.14.2.1 (colored)

sync with HEAD

Revision 1.18.6.1 / (download) - annotate - [select for diffs], Wed Oct 17 21:08:24 2007 UTC (16 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.18: +7 -7 lines
Diff to previous 1.18 (colored) to selected 1.14.2.1 (colored)

Prepare for xenamd64:
- kill xen/i386/identcpu.c, use i386/i386/identcpu.c instead (with a few
  #ifndef XEN)
- move some files that can be shared between i386 and amd64 from
  xen/i386 to xen/x86 (or to xen/xen for non-cpu-specific code)
- split assembly out of xen/include/hypervisor.h to xen/include/hypercalls.h
- use <xen/...> instead of <machine/...> for cpu-independant include files.

more work needed here, i386-specific files should got out of arch/xen to
arch/xeni386, and more code shared with arch/i386.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Oct 17 19:58:32 2007 UTC (16 years, 6 months ago) by garbled
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, jmcneill-base
Branch point for: mjf-devfs
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored) to selected 1.14.2.1 (colored)

Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.

Revision 1.15.2.3 / (download) - annotate - [select for diffs], Tue Oct 9 13:38:59 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.15.2.2: +3 -3 lines
Diff to previous 1.15.2.2 (colored) to branchpoint 1.15 (colored) to selected 1.14.2.1 (colored)

Sync with head.

Revision 1.15.10.1 / (download) - annotate - [select for diffs], Wed Oct 3 19:26:14 2007 UTC (16 years, 6 months ago) by garbled
Branch: ppcoea-renovation
Changes since 1.15: +10 -7 lines
Diff to previous 1.15 (colored) next main 1.16 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD

Revision 1.17.4.1 / (download) - annotate - [select for diffs], Mon Sep 3 16:47:50 2007 UTC (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.10.4.5 / (download) - annotate - [select for diffs], Mon Sep 3 14:31:37 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.4: +16 -13 lines
Diff to previous 1.10.4.4 (colored) to branchpoint 1.10 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.16.4.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:19:55 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.16.4.1: +3 -3 lines
Diff to previous 1.16.4.1 (colored) to branchpoint 1.16 (colored) next main 1.17 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Aug 26 22:32:46 2007 UTC (16 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, ppcoea-renovation-base, nick-csl-alignment-base5
Branch point for: matt-armv6, bouyer-xenamd64
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored) to selected 1.14.2.1 (colored)

Constify.

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Mon Aug 20 18:39:19 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.15.2.1: +3 -2 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.16.4.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:48:00 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.16.2.1 / (download) - annotate - [select for diffs], Tue Aug 7 18:05:55 2007 UTC (16 years, 8 months ago) by matt
Branch: matt-mips64
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored) next main 1.17 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Jul 22 20:36:13 2007 UTC (16 years, 9 months ago) by he
Branch: MAIN
CVS Tags: matt-mips64-base, hpcarm-cleanup
Branch point for: jmcneill-pm
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored) to selected 1.14.2.1 (colored)

Explicitly include <sys/proc.h> for tsleep() declaration.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Sun Jul 15 13:17:22 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.15: +8 -6 lines
Diff to previous 1.15 (colored) to selected 1.14.2.1 (colored)

Sync with head.

Revision 1.15.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:03:36 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.15: +8 -6 lines
Diff to previous 1.15 (colored) next main 1.16 (colored) to selected 1.14.2.1 (colored)

Sync with head.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jul 8 21:14:15 2007 UTC (16 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment, matt-mips64
Changes since 1.15: +8 -6 lines
Diff to previous 1.15 (colored) to selected 1.14.2.1 (colored)

Add a bootstatic callback for dom0, which allows to take NFS boot informations
from the command line (nfsroot=, ip=) in the same way domUs did.
While there convert a for (;;) loop to TAILQ_FOREACH().
From Christoph Egger in private mail.

Make all bootstatic callbacks return the new NFS_BOOTSTATIC_NOSTATIC flag
when no nfs boot information is found on command line.

Revision 1.14.4.1 / (download) - annotate - [select for diffs], Mon Mar 12 05:51:49 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.14: +8 -8 lines
Diff to previous 1.14 (colored) next main 1.15 (colored) to selected 1.14.2.1 (colored)

Sync with HEAD.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Mar 4 06:01:10 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, ppcoea-renovation, mjf-ufs-trans
Changes since 1.14: +8 -8 lines
Diff to previous 1.14 (colored) to selected 1.14.2.1 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.10.4.4 / (download) - annotate - [select for diffs], Sun Dec 31 02:20:49 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.3: +6 -4 lines
Diff to previous 1.10.4.3 (colored) to branchpoint 1.10 (colored) to selected 1.14.2.1 (colored)

xennet_softstart: handle M_EXT_LAZY.

Revision 1.10.4.3 / (download) - annotate - [select for diffs], Sat Dec 30 20:47:25 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.2: +33 -5 lines
Diff to previous 1.10.4.2 (colored) to branchpoint 1.10 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.13.8.1 / (download) - annotate - [select for diffs], Sun Dec 10 07:16:43 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.13: +5 -3 lines
Diff to previous 1.13 (colored) next main 1.14 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.13.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:29:39 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.13: +5 -3 lines
Diff to previous 1.13 (colored) next main 1.14 (colored) to selected 1.14.2.1 (colored)

Sync with head.

Revision 1.7.2.5.2.1 / (download) - annotate - [select for diffs], Sat Nov 11 22:14:33 2006 UTC (17 years, 5 months ago) by bouyer
Branch: netbsd-3-1
CVS Tags: netbsd-3-1-1-RELEASE
Changes since 1.7.2.5: +5 -3 lines
Diff to previous 1.7.2.5 (colored) next main 1.7.2.6 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by jld in ticket #1581):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.14
Recycle old buffers into new rx requests when their number reaches half of
those not tied up in active mbufs, rather than half of the total number.
(Or, to more literally translate the C, when there are at least as
many buffers waiting to be reused as outstanding rx requests.)
This prevents us from dropping off the network for a while when more
than 128 of the 256 buffers are in use by mbufs, which might not be
freed for an arbitrarily long time; the remaining buffers would stack up
on the free list but not be reclaimed until enough mbufs were eventually
freed, leaving the interface unable to receive packets until then.

Revision 1.7.2.6 / (download) - annotate - [select for diffs], Sat Nov 11 22:13:11 2006 UTC (17 years, 5 months ago) by bouyer
Branch: netbsd-3
Changes since 1.7.2.5: +5 -3 lines
Diff to previous 1.7.2.5 (colored) to branchpoint 1.7 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by jld in ticket #1581):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.14
Recycle old buffers into new rx requests when their number reaches half of
those not tied up in active mbufs, rather than half of the total number.
(Or, to more literally translate the C, when there are at least as
many buffers waiting to be reused as outstanding rx requests.)
This prevents us from dropping off the network for a while when more
than 128 of the 256 buffers are in use by mbufs, which might not be
freed for an arbitrarily long time; the remaining buffers would stack up
on the free list but not be reclaimed until enough mbufs were eventually
freed, leaving the interface unable to receive packets until then.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Nov 3 03:03:32 2006 UTC (17 years, 5 months ago) by jld
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp, netbsd-4
Changes since 1.13: +5 -3 lines
Diff to previous 1.13 (colored) to selected 1.14.2.1 (colored)

Recycle old buffers into new rx requests when their number reaches half of
those not tied up in active mbufs, rather than half of the total number.

(Or, to more literally translate the C, when there are at least as
many buffers waiting to be reused as outstanding rx requests.)

This prevents us from dropping off the network for a while when more
than 128 of the 256 buffers are in use by mbufs, which might not be
freed for an arbitrarily long time; the remaining buffers would stack up
on the free list but not be reclaimed until enough mbufs were eventually
freed, leaving the interface unable to receive packets until then.

Revision 1.13.6.2 / (download) - annotate - [select for diffs], Sat Sep 9 02:45:05 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.13.6.1: +1210 -0 lines
Diff to previous 1.13.6.1 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.3.4.7 / (download) - annotate - [select for diffs], Fri Aug 11 15:43:16 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.4.6: +30 -4 lines
Diff to previous 1.3.4.6 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.7.2.5 / (download) - annotate - [select for diffs], Sat Aug 5 15:59:57 2006 UTC (17 years, 8 months ago) by ghen
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1
Branch point for: netbsd-3-1
Changes since 1.7.2.4: +10 -3 lines
Diff to previous 1.7.2.4 (colored) to branchpoint 1.7 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1454):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.11
m_copyback() doesn't adjust m->m_len if the data to copy is smaller than
the mbuf's size. Set it to a proper value before calling m_copyback().
This should fix panics in m_makewritable() reported by several peoples.
While there, add MCLAIM() calls where appropriate, a few more #ifdef DEBUG
checks, and various minor fixes.

Revision 1.7.2.4 / (download) - annotate - [select for diffs], Sat Aug 5 15:59:05 2006 UTC (17 years, 8 months ago) by ghen
Branch: netbsd-3
Changes since 1.7.2.3: +3 -2 lines
Diff to previous 1.7.2.3 (colored) to branchpoint 1.7 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1452):
	sys/arch/xen/xen/if_xennet.c: revision 1.48
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.10
The receive buffer, once mapped back in the domU, is read/write and not
shared so there;s no problems marking the mbuf M_EXT_RW.

Revision 1.7.2.3 / (download) - annotate - [select for diffs], Sat Aug 5 15:58:33 2006 UTC (17 years, 8 months ago) by ghen
Branch: netbsd-3
Changes since 1.7.2.2: +4 -3 lines
Diff to previous 1.7.2.2 (colored) to branchpoint 1.7 (colored) to selected 1.14.2.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1451):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.8
Add a missing break in a switch clause, causing the frontend to go to Closed
state when it should not.

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:06 2006 UTC (17 years, 9 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.10: +30 -4 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.14.2.1 (colored)

Merge from HEAD.

Revision 1.13.6.1, Wed Jul 12 15:03:08 2006 UTC (17 years, 9 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.13: +0 -1210 lines
FILE REMOVED

file if_xennet_xenbus.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:45:05 +0000

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jul 12 15:03:08 2006 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, rpaulo-netinet-merge-pcb, newlock2
Changes since 1.12: +11 -1 lines
Diff to previous 1.12 (colored) to selected 1.14.2.1 (colored)

implement NETRXF_csum_blank/NETTXF_csum_blank tx checksum "offloading".

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jul 12 15:02:15 2006 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.11: +11 -2 lines
Diff to previous 1.11 (colored) to selected 1.14.2.1 (colored)

implement a simple NETTXF_csum_blank/NETRXF_csum_blank workaround
so that we can talk with linux guests at least.
just fill checksum field of received packets if the flag is set.
maybe should be revisited later.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Jul 2 16:29:49 2006 UTC (17 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.10: +10 -3 lines
Diff to previous 1.10 (colored) to selected 1.14.2.1 (colored)

m_copyback() doesn't adjust m->m_len if the data to copy is smaller than
the mbuf's size. Set it to a proper value before calling m_copyback().
This should fix panics in m_makewritable() reported by several peoples.
While there, add MCLAIM() calls where appropriate, a few more #ifdef DEBUG
checks, and various minor fixes.

Revision 1.3.4.6 / (download) - annotate - [select for diffs], Mon Jun 26 12:45:40 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.4.5: +3 -2 lines
Diff to previous 1.3.4.5 (colored) to branchpoint 1.3 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.10.4.2 / (download) - annotate - [select for diffs], Wed Jun 21 14:58:23 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10.4.1: +1184 -0 lines
Diff to previous 1.10.4.1 (colored) to branchpoint 1.10 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.8.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 03:45:36 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.8: +9 -5 lines
Diff to previous 1.8 (colored) next main 1.9 (colored) to selected 1.14.2.1 (colored)

Sync with head.

Revision 1.7.4.3 / (download) - annotate - [select for diffs], Thu Jun 1 22:35:38 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.7.4.2: +11 -6 lines
Diff to previous 1.7.4.2 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored) to selected 1.14.2.1 (colored)

Sync with head.

Revision 1.10.4.1, Sat May 27 19:54:59 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.10: +0 -1184 lines
FILE REMOVED

file if_xennet_xenbus.c was added on branch yamt-lazymbuf on 2006-06-21 14:58:23 +0000

Revision 1.10 / (download) - annotate - [select for diffs], Sat May 27 19:54:59 2006 UTC (17 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: yamt-lazymbuf, gdamore-uart
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored) to selected 1.14.2.1 (colored)

The receive buffer, once mapped back in the domU, is read/write and not
shared so there;s no problems marking the mbuf M_EXT_RW.

Revision 1.3.6.2 / (download) - annotate - [select for diffs], Wed May 24 15:48:26 2006 UTC (17 years, 11 months ago) by tron
Branch: peter-altq
Changes since 1.3.6.1: +200 -30 lines
Diff to previous 1.3.6.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.14.2.1 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.3.4.5 / (download) - annotate - [select for diffs], Wed May 24 10:57:23 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.4.4: +10 -6 lines
Diff to previous 1.3.4.4 (colored) to branchpoint 1.3 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.9 / (download) - annotate - [select for diffs], Tue May 23 21:07:56 2006 UTC (17 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5
Changes since 1.8: +8 -5 lines
Diff to previous 1.8 (colored) to selected 1.14.2.1 (colored)

Add needed framework for backend drivers.
As we want some control on the name the backend driver will have we
can't use autoconf(9) here. Instead backend drivers registers to
xenbus, which will call a create callback when a new device is there.
Backend devices won't have a "struct device" in xenbus, use a void pointer
instead.

Revision 1.8 / (download) - annotate - [select for diffs], Sun May 14 20:44:36 2006 UTC (17 years, 11 months ago) by bouyer
Branch: MAIN
Branch point for: chap-midi
Changes since 1.7: +4 -3 lines
Diff to previous 1.7 (colored) to selected 1.14.2.1 (colored)

Add a missing break in a switch clause, causing the frontend to go to Closed
state when it should not.

Revision 1.7.4.2 / (download) - annotate - [select for diffs], Sat Apr 22 11:38:11 2006 UTC (18 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.7.4.1: +1179 -0 lines
Diff to previous 1.7.4.1 (colored) to branchpoint 1.7 (colored) to selected 1.14.2.1 (colored)

Sync with head.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Wed Apr 19 02:34:03 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.3: +224 -30 lines
Diff to previous 1.3 (colored) next main 1.4 (colored) to selected 1.14.2.1 (colored)

sync with head - hopefully this will work

Revision 1.3.4.4 / (download) - annotate - [select for diffs], Tue Apr 11 11:53:48 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.4.3: +196 -30 lines
Diff to previous 1.3.4.3 (colored) to branchpoint 1.3 (colored) to selected 1.14.2.1 (colored)

sync with head

Revision 1.7.2.2 / (download) - annotate - [select for diffs], Fri Apr 7 12:51:26 2006 UTC (18 years ago) by tron
Branch: netbsd-3
Changes since 1.7.2.1: +1175 -0 lines
Diff to previous 1.7.2.1 (colored) to branchpoint 1.7 (colored) to selected 1.14.2.1 (colored)

Apply patch (requested by bouyer in ticket #1245):
Pull up Xen3 domU support. This adds support for the Xen-3 memory bootstrap,
xenstore, and block and network device frontend. Xen-3 support is turned
on by 'options XEN3', which disable Xen-2 support.
Changes affecting non-xen3 specific code:
- xbd and xennet at hypervisor now attaches with xbd_hypervisor and
  xennet_hypervisor
- x86_atomic_* renamed to xen_atomic_*
- use genassim.cf to pull in more constant from include files for assembly
- Map the shared info page from locore.S instead of the 0xffffffff hack
  in xen_machdep.c
- remove some unused code
- some __asm__ __volatile__ -> __asm volatile and __inline__ -> inline
- more debug code

Revision 1.7.4.1, Sun Apr 2 17:11:12 2006 UTC (18 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.7: +0 -1179 lines
FILE REMOVED

file if_xennet_xenbus.c was added on branch simonb-timecounters on 2006-04-22 11:38:11 +0000

Revision 1.7.2.1, Sun Apr 2 17:11:12 2006 UTC (18 years ago) by tron
Branch: netbsd-3
Changes since 1.7: +0 -1179 lines
FILE REMOVED

file if_xennet_xenbus.c was added on branch netbsd-3 on 2006-04-07 12:51:26 +0000

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 2 17:11:12 2006 UTC (18 years ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, elad-kernelauth-base
Branch point for: simonb-timecounters, netbsd-3
Changes since 1.6: +8 -2 lines
Diff to previous 1.6 (colored) to selected 1.14.2.1 (colored)

Properly update output counters.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Apr 2 15:32:41 2006 UTC (18 years ago) by bouyer
Branch: MAIN
Changes since 1.5: +185 -30 lines
Diff to previous 1.5 (colored) to selected 1.14.2.1 (colored)

Add proper detach support for Xen3 xennet.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Apr 2 13:56:12 2006 UTC (18 years ago) by bouyer
Branch: MAIN
Changes since 1.4: +7 -2 lines
Diff to previous 1.4 (colored) to selected 1.14.2.1 (colored)

Ops, better include bpfilter.h if we're going to use NBPFILTER > 0.
Should make bpf work on Xen3 domU, problem reported by Stephane Bortzmeyer
on port-xen.

Revision 1.3.4.3 / (download) - annotate - [select for diffs], Sat Apr 1 12:06:36 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.4.2: +30 -2 lines
Diff to previous 1.3.4.2 (colored) to branchpoint 1.3 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.3.6.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:46:22 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.3: +30 -2 lines
Diff to previous 1.3 (colored) to selected 1.14.2.1 (colored)

Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Mar 19 00:30:00 2006 UTC (18 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base3
Changes since 1.3: +30 -2 lines
Diff to previous 1.3 (colored) to selected 1.14.2.1 (colored)

Add code to dump the xenstore's node for this device under XENNET_DEBUG.

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Mon Mar 13 09:07:07 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.4.1: +985 -0 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored) to selected 1.14.2.1 (colored)

sync with head.

Revision 1.3.4.1, Mon Mar 6 22:10:28 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3: +0 -985 lines
FILE REMOVED

file if_xennet_xenbus.c was added on branch yamt-pdpolicy on 2006-03-13 09:07:07 +0000

Revision 1.3 / (download) - annotate - [select for diffs], Mon Mar 6 22:10:28 2006 UTC (18 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base2, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.2: +6 -6 lines
Diff to previous 1.2 (colored) to selected 1.14.2.1 (colored)

Adapt for recent changes in UVM.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 6 22:04:18 2006 UTC (18 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.1: +50 -3 lines
Diff to previous 1.1 (colored) to selected 1.14.2.1 (colored)

Fix build issues that didn't show up in my private tree.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Mar 6 20:36:12 2006 UTC (18 years, 1 month ago) by bouyer
Branch: MAIN
Diff to selected 1.14.2.1 (colored)

Add a Xen Virtual Network device driver for Xenbus.

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>