Re: hvn(4): don't input mbufs if interface is not running

2021-06-11 Thread Mike Belopuhov
On 12/05/2021 15:15, Patrick Wildt wrote: > Hi, > > when hvn(4) attaches it sends commands and waits for replies to come > back in, hence the interrupt function is being polled. Unfortunately > it seems that the 'receive pipe' has both command completion and data > packets. As it turns out,

Re: XCP-ng, OpenBSD and network interface changes

2021-02-01 Thread Mike Belopuhov
On Sun, Jan 31, 2021 at 2:59 PM Denis Fondras wrote: > I am using XCP-ng with the latest OpenBSD snapshot. > > Whenever I make an hardware change in networking on the VM (connect or > disconnect an interface, change associated network), the VM panics : > > openbsd# panic: grant table reference

Re: xbf(4): tsleep(9) -> tsleep_nsec(9)

2020-01-21 Thread Mike Belopuhov
Scott Cheloha writes: > Given the SCSI_NOSLEEP split here I think the simplest thing we can do > is ask to sleep as much as we delay(9). > > The question is: if you *could* poll in 10us intervals here with > tsleep_nsec(9), would you want to? If so, then this works. If > not, what is a more

Re: sparc64: find root device on hardware RAID

2019-12-27 Thread Mike Belopuhov
Klemens Nanni writes: > On Thu, Dec 26, 2019 at 07:49:06PM +0100, Mark Kettenis wrote: >> Well, there's your problem. The mpii(4) doesn't fill in the WWNs for >> the logical volume so there is nothing that can be matched to the WWN >> from the bootpath. > Obvious now that you mention it. > >>

Re: pfctl: Do not optimize empty rulesets

2019-12-12 Thread Mike Belopuhov
Klemens Nanni writes: > On Wed, Nov 27, 2019 at 08:04:47PM +0100, Klemens Nanni wrote: >> If an anchor/ruleset contains no rules, there is no point in creating >> a temporary copy, optimizing and replacing it. >> >> Regress passes on amd64. >> >> Feedback? OK? > Anyone? > FWIW, it looks good

Re: iked(8): fix error handling in msg_send

2019-11-15 Thread Mike Belopuhov
Tobias Heider writes: > On Thu, Nov 14, 2019 at 09:57:27AM -0700, Theo de Raadt wrote: >> > >> > The problem here is that log_warn can change errno, >> >> No, it specifically avoids touching errno. >> >> log_warn(const char *emsg, ...) >> { >> char*nfmt; >>

Re: iked(8): fix error handling in msg_send

2019-11-14 Thread Mike Belopuhov
Tobias Heider writes: > Hi, > > in the error case ikev2_msg_send the accesses the sa before checking for > NULL. The diff adds explicit checks in those cases. > If sendtofrom fails for any other reason than EADDRNOTAVAIL and sa is not NULL > we should continue instead of returning (-1) so that

Re: iked(8): add configuration option for esn

2019-11-12 Thread Mike Belopuhov
On Tue, 12 Nov 2019 at 16:08, Tobias Heider wrote: > On Tue, Nov 12, 2019 at 09:57:31AM +0100, Mike Belopuhov wrote: > > Hi Tobias, > > > > I see, however, I don't think iked would negotiate an SA > > without ESN support if the other side supports ESN, so I'm > >

Re: iked(8): add configuration option for esn

2019-11-12 Thread Mike Belopuhov
it > exhausts the sequence number space forcing me to rekey more often than I > would > like. > > On Mon, Nov 11, 2019 at 04:15:32PM +0100, Mike Belopuhov wrote: > > On Mon, 11 Nov 2019 at 16:08, Tobias Heider > wrote: > > > > > Hi Mike, > > > > >

Re: iked(8): add configuration option for esn

2019-11-11 Thread Mike Belopuhov
On Mon, 11 Nov 2019 at 16:08, Tobias Heider wrote: > Hi Mike, > > the default behaviour is the same as before. I ran into cases where it is > necessary for me to enforce ESN to be enabled/disabled, which is not > possible > currently. > Can you please describe those cases where you had to

Re: iked(8): add configuration option for esn

2019-11-11 Thread Mike Belopuhov
On Mon, 11 Nov 2019 at 15:47, Tobias Heider wrote: > Currently iked does not provide an option to configure extended sequence > numbers > (ESN) for child SAs, but always proposes/accepts both options. > This diff adds a new optional "esn on/off" config option to explicitly > enable > or disable

Re: Attach Hyper-V guest services to VMBus 4.0

2019-10-05 Thread Mike Belopuhov
Remi Locherer writes: > On Tue, Oct 01, 2019 at 12:25:35AM +0200, Mike Belopuhov wrote: >> >> >> Hi, >> >> I've got a verbal report that Hyper-V guest services aren't attached >> on modern Windows 10 systems so I believe we should get this one-liner &g

Re: Attach Hyper-V guest services to VMBus 4.0

2019-10-04 Thread Mike Belopuhov
Andre Stoebe writes: > On 03.10.2019 02:13, Mike Belopuhov wrote: >> And what about OpenBSD-current or an attached patch as opposed >> to the linked one? >> >> Please don't go half the way if you're willing to help us out, >> we'd like to make OpenBSD

Re: Attach Hyper-V guest services to VMBus 4.0

2019-10-02 Thread Mike Belopuhov
Andre Stoebe writes: > On 01.10.2019 00:25, Mike Belopuhov wrote: >> >> >> Hi, >> >> I've got a verbal report that Hyper-V guest services aren't attached >> on modern Windows 10 systems so I believe we should get this one-liner >> in before 6.6

Attach Hyper-V guest services to VMBus 4.0

2019-09-30 Thread Mike Belopuhov
Hi, I've got a verbal report that Hyper-V guest services aren't attached on modern Windows 10 systems so I believe we should get this one-liner in before 6.6. FreeBSD revision 349856 adds another define for VMBus 5.0 but AFAICT it doesn't attempt to use it in version negotiations.

Re: relayd: fix filter rules with forward to statement

2019-05-13 Thread Mike Belopuhov
Reyk Floeter writes: > Hi, > > the attached diff fixes filter rules with "forward to" statement in > persistent (keep-alive) connections. See the XXX comment below. > > ```relayd.conf > log connection > table { > 127.0.0.1 > } > table { > 127.0.0.1 > } > table { >

Re: extend BPF filter drop to allow not capturing packets

2019-03-13 Thread Mike Belopuhov
David Gwynne writes: > On Tue, Mar 05, 2019 at 12:03:05PM +1000, David Gwynne wrote: >> this extends the fildrop mechanism so you can drop the packets with bpf >> using the existing fildrop method, but with an extra tweak so you can >> avoid the cost of copying packets to userland. >> >> i

Re: dont let hfsc force the packet priority

2018-10-22 Thread Mike Belopuhov
David Gwynne writes: > As discoverd by Adrian Close on tech@ (in "VLAN priority field and > PF queues"), setting up traffic shaping in pf on vlan interfaces has a > side effect where all the packets are sent with the vlan priority field > set to the highest value. This is because hfsc forces

Re: ENA support

2018-08-27 Thread Mike Belopuhov
Mike Belopuhov writes: > On Sat, 25 Aug 2018 at 20:03, Zbyszek Żółkiewski > wrote: >> >> Hi, >> >> just a question: anyone tried/consider porting ENA (Elastic Network > Adapter) support to OpenBSD ( > https://github.com/amzn/amzn-drivers/tree/master/kernel/f

Re: ENA support

2018-08-27 Thread Mike Belopuhov
On Sat, 25 Aug 2018 at 20:03, Zbyszek Żółkiewski wrote: > > Hi, > > just a question: anyone tried/consider porting ENA (Elastic Network Adapter) support to OpenBSD ( https://github.com/amzn/amzn-drivers/tree/master/kernel/fbsd/ena), how hard would be to get it to obsd? > > _ > Zbyszek Żółkiewski

Re: pcidevs Sandisk or WD

2018-07-19 Thread Mike Belopuhov
On 19 July 2018 at 19:36, Stuart Henderson wrote: > > On 2018/07/19 10:00, Bryan Vyhmeister wrote: > > I am wanting to add the WD Black High-performance NVMe SSD PCI > > IDs to pcidevs and I am not sure how to proceed. WD bought Sandisk a > > while back but the vendor ID is 15b7 which is Sandisk

Re: 6.3 and Prolific PL-2303 USB serial adapter

2018-06-18 Thread Mike Belopuhov
On Mon, Jun 18, 2018 at 19:29 +0200, Paul de Weerd wrote: > Updated diff included below. I've set the product name to LD220. > This diff lacks the updates to usbdevs{,_data}.h, whoever commits > should update those too. > > Any takers to commit this? Tested by an owner of the actual device, >

Hyper-V network: let hvn_iff handle promisc mode activation

2018-05-01 Thread Mike Belopuhov
, however, one of the goals here is to instruct RNDIS to enter "all multicast capture" mode when one or more multicast addresses are configured. Therefore one of the goals is to attempt to support CARP operation on the virtual switch. commit 6e6b001dae79505e3e0fbca663c31f9eb6da285b Au

Re: kqueue EV_DISPATCH and EV_EOF interaction

2018-04-08 Thread Mike Belopuhov
On Tue, Apr 03, 2018 at 17:00 +0200, Lukas Larsson wrote: > On Fri, Mar 30, 2018 at 1:51 AM, Mike Belopuhov <m...@belopuhov.com> wrote: > > > On Fri, Mar 30, 2018 at 01:21 +0200, Mike Belopuhov wrote: > > > > > > Hi, > > > > > > This appears t

Re: kqueue EV_DISPATCH and EV_EOF interaction

2018-03-29 Thread Mike Belopuhov
On Fri, Mar 30, 2018 at 01:21 +0200, Mike Belopuhov wrote: > > Hi, > > This appears to be an issue with reactivating disabled event sources > in kqueue_register. Something along the lines of FreeBSD commits: > > https://svnweb.freebsd.org/base?view=revisi

Re: kqueue EV_DISPATCH and EV_EOF interaction

2018-03-29 Thread Mike Belopuhov
On Thu, Mar 29, 2018 at 15:09 +0200, Lukas Larsson wrote: > Hello, > > I've been re-writing the polling mechanisms in the Erlang VM and stumbled > across > something that might be a bug in the OpenBSD implementation of kqueue. > > When using EV_DISPATCH, the event is never triggered again after

Re: close filedescriptors of children

2018-03-07 Thread Mike Belopuhov
On 7 March 2018 at 17:27, Gerhard Roth <gerhard_r...@genua.de> wrote: > > On Wed, 7 Mar 2018 17:20:06 +0100 Mike Belopuhov <m...@belopuhov.com> wrote: > > On 7 March 2018 at 17:01, Gerhard Roth <gerhard_r...@genua.de> wrote: > > > > >

Re: close filedescriptors of children

2018-03-07 Thread Mike Belopuhov
On 7 March 2018 at 17:01, Gerhard Roth wrote: > > Hi Benno, > > thanks for your reply. > > On Wed, 7 Mar 2018 15:22:28 +0100 Sebastian Benoit wrote: > > Hi, > > > > switchd and vmd use the same proc.c,and should stay in sync. > > Ack. I missed them. >

Re: tcp reaper timeout

2018-01-22 Thread Mike Belopuhov
Hi, thanks for the detailed explanation! On Mon, Jan 22, 2018 at 22:37 +0100, Alexander Bluhm wrote: > On Sat, Jan 20, 2018 at 05:53:05PM +0100, Mike Belopuhov wrote: > > On Sat, Jan 20, 2018 at 15:17 +0100, Alexander Bluhm wrote: > > While I'm not against making all TCP timeou

Re: tcp reaper timeout

2018-01-20 Thread Mike Belopuhov
On Sat, Jan 20, 2018 at 15:17 +0100, Alexander Bluhm wrote: > Hi, > Hi, While I'm not against making all TCP timeouts look similar, I'd like to understand if there's any other reason to do it other than "consistency". > The tcp reaper timeout is still imlemented as soft timeout. So it > can

Re: inteldrm(4) tests needed

2018-01-20 Thread Mike Belopuhov
On Mon, Jan 15, 2018 at 01:02 +0100, Mark Kettenis wrote: > The diff below adopts more of the Linux code to manage i2c > transactions on hardware supported by inteldrm(4). The i2c stuff is > reponsible for detecting panels and monitors, so it is somewhat > important that this works right. And

Re: Add sizes for free() in the VIA PadLock driver

2017-11-12 Thread Mike Belopuhov
On Sun, Nov 12, 2017 at 21:53 +0100, Frederic Cambus wrote: > Hi tech@, > > Add sizes for free() in the VIA PadLock driver. > > Comments? OK? > OK mikeb.

Re: "max" field in "netstat -m" is ambiguous

2017-10-28 Thread Mike Belopuhov
On Sat, Oct 28, 2017 at 11:06 +0200, Mike Belopuhov wrote: > On Thu, Oct 26, 2017 at 08:58 +0200, Claudio Jeker wrote: > > On Wed, Oct 25, 2017 at 11:46:05PM +0200, Mike Belopuhov wrote: > > > On Wed, Oct 25, 2017 at 21:56 +0200, Claudio Jeker wrote: > > > > Would

Re: "max" field in "netstat -m" is ambiguous

2017-10-28 Thread Mike Belopuhov
On Thu, Oct 26, 2017 at 08:58 +0200, Claudio Jeker wrote: > On Wed, Oct 25, 2017 at 11:46:05PM +0200, Mike Belopuhov wrote: > > On Wed, Oct 25, 2017 at 21:56 +0200, Claudio Jeker wrote: > > > Would be great if netstat could show the current and peak memory usage. > > &g

Re: "max" field in "netstat -m" is ambiguous

2017-10-25 Thread Mike Belopuhov
On Wed, Oct 25, 2017 at 21:56 +0200, Claudio Jeker wrote: > On Wed, Oct 25, 2017 at 01:39:35PM -0600, Todd C. Miller wrote: > > On Wed, 25 Oct 2017 19:46:56 +0200, Mike Belopuhov wrote: > > > > > I think we can extend this by adding an additional number for

"max" field in "netstat -m" is ambiguous

2017-10-25 Thread Mike Belopuhov
Hi, After some changes in the way mbuf cluster pool limits are set up, we have a situation where the "max" number doesn't reflect what it used to and is ambiguous most of the time. Right now I have: 36/144/64 mbuf 2048 byte clusters in use (current/peak/max) 0/45/120 mbuf 2112 byte clusters

Re: Remove TCP_FACK

2017-10-25 Thread Mike Belopuhov
On Tue, Oct 24, 2017 at 23:22 +0200, Job Snijders wrote: > Dear all, > > This patch builds upon the work shared in the following email. Mike's > patch is a prerequisite to apply this patch. > > Date: Tue, 24 Oct 2017 15:21:08 +0200 > From: Mike Belopuho

Re: Refactor TCP partial ACK handling

2017-10-24 Thread Mike Belopuhov
On Tue, Oct 24, 2017 at 13:37 +0200, Martin Pieuchot wrote: > On 24/10/17(Tue) 12:27, Mike Belopuhov wrote: > > On Tue, Oct 24, 2017 at 12:05 +0200, Martin Pieuchot wrote: > > > On 21/10/17(Sat) 15:17, Mike Belopuhov wrote: > > > > On Fri, Oct 20, 2017 at 22

Re: Refactor TCP partial ACK handling

2017-10-24 Thread Mike Belopuhov
On Tue, Oct 24, 2017 at 12:05 +0200, Martin Pieuchot wrote: > On 21/10/17(Sat) 15:17, Mike Belopuhov wrote: > > On Fri, Oct 20, 2017 at 22:59 +0200, Klemens Nanni wrote: > > > The comments for both void tcp_{sack,newreno}_partialack() still mention > > > tp->

Re: Enable TCP selective acknowledgements (SACK) on all kernels

2017-10-22 Thread Mike Belopuhov
On Sun, Oct 22, 2017 at 11:23 +0200, Job Snijders wrote: > On Thu, Oct 19, 2017 at 06:55:05PM +0200, Mike Belopuhov wrote: > > SACK has been enabled in GENERIC kernels for over a decade and it's > > time to make it an official part of the TCP stack. > > I tested your d

Re: Refactor TCP partial ACK handling

2017-10-21 Thread Mike Belopuhov
On Fri, Oct 20, 2017 at 22:59 +0200, Klemens Nanni wrote: > The comments for both void tcp_{sack,newreno}_partialack() still mention > tp->snd_last and return value bits. > Good eyes! It made me spot a mistake I made by folding two lines into an incorrect ifdef in tcp_sack_partialack. I

Refactor TCP partial ACK handling

2017-10-20 Thread Mike Belopuhov
This is a small and not intrusive refactoring of partial ACK handling but it certainly doesn't look like one. It's intended to be applied after the TCP SACK diff that I've sent earlier and basically moves the conditional (SEQ_LT(th->th_ack, tp->snd_last)) out of tcp_sack_partialack and

Enable TCP selective acknowledgements (SACK) on all kernels

2017-10-19 Thread Mike Belopuhov
SACK has been enabled in GENERIC kernels for over a decade and it's time to make it an official part of the TCP stack. This grows bsd.rd on amd64 by 8k but Theo said it's within reasonable. OK? diff --git sys/conf/GENERIC sys/conf/GENERIC index 87dd069f514..cd68ae9e651 100644 ---

Re: rwlock tweak

2017-10-16 Thread Mike Belopuhov
On Mon, Oct 16, 2017 at 09:36 +, Mark Kettenis wrote: > > Date: Mon, 16 Oct 2017 10:52:09 +0200 > > From: Martin Pieuchot > > > > As pointed by Mateusz Guzik [0], on x86 the cmpxchg{q,l} used by > > rw_enter(9) and rw_exit(9) already include an implicit memory > > barrier,

Re: softdep dangling vnode

2017-10-09 Thread Mike Belopuhov
On Mon, Oct 09, 2017 at 22:21 +, Alexander Bluhm wrote: > Hi, > > we sometimes see a panic "unmount: dangling vnode" when rebooting a 6.1 > system with softdep. > > I have hacked some diagnostic panics until I got these traces from the > reboot and update process. > > Reboot: >

Re: TSC timecounters

2017-10-07 Thread Mike Belopuhov
On Sat, Oct 07, 2017 at 17:23 +, Theo de Raadt wrote: > > > > Now that we have an accurate tsc frequency, I would like to expose this > > > > information to userland via a sysctl. > > > > > > > > The diff below exposes the tsc frequency and if it is invariant. > > > > > > > > Cheers, > > > >

Re: TSC timecounters

2017-10-07 Thread Mike Belopuhov
On Sat, Oct 07, 2017 at 10:27 +, Adam Steen wrote: > On Sat, Oct 7, 2017 at 5:52 PM, Adam Steen <a...@adamsteen.com.au> wrote: > > > On Fri, Oct 06, 2017 at 03:58:18PM +0200, Mike Belopuhov wrote: > > > Hi, > > > > > > An experimental change to

TSC timecounters

2017-10-06 Thread Mike Belopuhov
Hi, An experimental change to use TSC as a timecounter source on a variety of modern Intel and AMD CPUs has been just committed and enabled on OpenBSD/amd64 thanks to the work done by Adam Steen. The rationale is, quoting the commit message: If frequency of an invariant (non-stop) time stamp

Re: pfctl can do a better job when handling ioctl(2) errors

2017-09-26 Thread Mike Belopuhov
On Tue, Sep 26, 2017 at 11:37 +0200, Alexandr Nedvedicky wrote: > Hello, > > whenever administrator asks pfctl to modify/remove anchor, which does not > exist, the pfctl(8) prints warning 'pfctl: DIOCGETRULES: Invalid argument'. > Few users on Solaris wants pfctl(8) to be more helpful. > > The

Re: pfctl always prints warning when flushes ruleset

2017-09-26 Thread Mike Belopuhov
On Tue, Sep 26, 2017 at 11:15 +0200, Alexandr Nedvedicky wrote: > Hello, > > few users on Solaris don't like to read warning 'Anchor or Ruleset' does not > exist: > > # echo 'pass' |pfctl -a foo -f - > # pfctl -a foo -Fa > rules cleared > pfctl: Anchor or Ruleset does not exist.

Re: Improve the accuracy of the TSC frequency calibration - Updated Patch

2017-09-19 Thread Mike Belopuhov
On Tue, Sep 19, 2017 at 22:35 +0200, Mike Belopuhov wrote: > Keeping all of what Reyk said in mind, here's an updated diff that > incorporates additional changes: > > 1) doesn't break i386 kernel compilation; > > 2) allows for multiple recalibrations using better timecount

Re: Improve the accuracy of the TSC frequency calibration - Updated Patch

2017-09-19 Thread Mike Belopuhov
se CPU_INVARIANTTSC: + return (sysctl_rdint(oldp, oldlenp, newp, + amd64_has_invariant_tsc)); default: return (EOPNOTSUPP); } /* NOTREACHED */ } diff --git sys/arch/amd64/amd64/tsc.c sys/arch/amd64/amd64/tsc.c new file mode 100644 index 000

Re: Improve the accuracy of the TSC frequency calibration - Updated Patch

2017-08-25 Thread Mike Belopuhov
On Fri, Aug 25, 2017 at 00:40 -0700, Mike Larkin wrote: > On Thu, Aug 24, 2017 at 12:39:33PM +0800, Adam Steen wrote: > > On Thu, Aug 24, 2017 at 2:35 AM, Mike Larkin wrote: > > > On Wed, Aug 23, 2017 at 09:29:15PM +0800, Adam Steen wrote: > > >> > > >> Thank you Mike on the

CID 1453170, 1452971: Uninitialized scalar variable (txp_start)

2017-08-17 Thread Mike Belopuhov
Hi, I've made a mistake when refactoring txp_start recently. firstprod and firstcnt served one purpose only: they cached the value of prod and cnt at the start of the loop and then if they'd get incremented but we'd have to bail and goto the oactive label we'd restore the r_prod and r_cnt to

Re: hfsc_deferred race

2017-08-16 Thread Mike Belopuhov
On Tue, Aug 15, 2017 at 17:14 +0200, Mike Belopuhov wrote: > Hi, > > I've just triggered an assert in hfsc_deferred (a callout) on an > MP kernel running on an SP virtual machine: > > panic: kernel diagnostic assertion "HFSC_ENABLED(ifq)" failed: file > "/

CID 1453358: Out-of-bounds read (bufq_init)

2017-08-16 Thread Mike Belopuhov
There's only two disk elevator disciplines 0 - fifo and 1 - nscan. BUFQ_HOWMANY is 2, but the 'type' should be checked against (BUFQ_HOWMANY - 1) as it's used as an index. OK? diff --git sys/kern/kern_bufq.c sys/kern/kern_bufq.c index 7ed83470e58..ad9558e0d53 100644 --- sys/kern/kern_bufq.c +++

CID 1452946, 1452957: Uninitialized scalar variable (bridge_ipsec)

2017-08-16 Thread Mike Belopuhov
Hi, In may this year, the condition that would make this break do the right thing got removed and now if a short packet is sent to an ipsec-enabled bridge, various things like 'spi' and 'off' are left uninitialized, but thankfully the gettdb call that follows will most likely fail when presented

Additional media options for ix(4) [again]

2017-08-16 Thread Mike Belopuhov
Hi, I haven't gotten any feedback on the following diff but I think there's still hope. Please test. Original mail: I won't mind some broad testing of the following diff which adds some additional media options to ix(4) from FreeBSD and includes a fix for changing media from Masanobu SAITOH.

hfsc_deferred race

2017-08-15 Thread Mike Belopuhov
Hi, I've just triggered an assert in hfsc_deferred (a callout) on an MP kernel running on an SP virtual machine: panic: kernel diagnostic assertion "HFSC_ENABLED(ifq)" failed: file "/home/mike/src/openbsd/sys/net/hfsc.c", line 950 Stopped at db_enter+0x9: leave TIDPID

CID 1452909: Use of untrusted scalar value (pf_table.c)

2017-08-15 Thread Mike Belopuhov
Hi, Coverity has discovered that we're blindly trusting the value of pfra_type that we read from the userland supplied pfr_addr and use it to index an array of pools in pfr_create_kentry. I suggest to do two things: add a check in pfr_validate_addr that is called after every copyin and also

Re: Improve the accuracy of the TSC frequency calibration (Was: Calculate the frequency of the tsc timecounter)

2017-08-08 Thread Mike Belopuhov
On Tue, Aug 08, 2017 at 08:18 +0800, Adam Steen wrote: > On Mon, Jul 31, 2017 at 3:58 PM, Mike Belopuhov <m...@belopuhov.com> wrote: > > On Mon, Jul 31, 2017 at 09:48 +0800, Adam Steen wrote: > >> Ted Unangst wrote: > >> > we don't currently export this

Re: Document hostctl commands for XenServer

2017-07-21 Thread Mike Belopuhov
On Fri, Jul 21, 2017 at 17:49 +0200, Erik van Westen wrote: > Hi Ingo, > > Op 21-7-2017 om 16:20 schreef Ingo Schwarze: > > Hi Mike, > > > > Mike Belopuhov wrote on Fri, Jul 21, 2017 at 03:14:08PM +0200: > > > >> Together with Maxim Khitrov we

Re: Document hostctl commands for XenServer

2017-07-21 Thread Mike Belopuhov
On Fri, Jul 21, 2017 at 19:58 +0200, Ingo Schwarze wrote: > Hi Mike, > > Mike Belopuhov wrote on Fri, Jul 21, 2017 at 07:08:06PM +0200: > > > Thanks for the detailed respose, I share your outlook and in > > this case it is better to keep this stuff in the userland sinc

Create pvbus1 node in addition to pvbus0

2017-07-21 Thread Mike Belopuhov
As suggested by deraadt@ it's better to have /dev/pvbus1 around then document the need to create it under certain circumstances which are of course availability of multiple virtualization interfaces. The diff has survived a make build. I'm not sure the adjustment is done perfectly, but I've tried

Re: Document hostctl commands for XenServer

2017-07-21 Thread Mike Belopuhov
On Fri, Jul 21, 2017 at 10:28 -0400, Maxim Khitrov wrote: > On Fri, Jul 21, 2017 at 9:14 AM, Mike Belopuhov <m...@belopuhov.com> wrote: > > Hi, > > > > Together with Maxim Khitrov we have figured out what needs to > > be set for XenServer (that's a Citrix produc

Re: Document hostctl commands for XenServer

2017-07-21 Thread Mike Belopuhov
On Fri, Jul 21, 2017 at 16:20 +0200, Ingo Schwarze wrote: > Hi Mike, > > Mike Belopuhov wrote on Fri, Jul 21, 2017 at 03:14:08PM +0200: > > > Together with Maxim Khitrov we have figured out what needs to > > be set for XenServer > > If XenServer were free software

Document hostctl commands for XenServer

2017-07-21 Thread Mike Belopuhov
07:02 -0400 From: Maxim Khitrov <m...@mxcrypt.com> To: Mike Belopuhov <m...@belopuhov.com> Cc: Dinar Talypov <t.dina...@gmail.com>, tech@openbsd.org Subject: Re: [patch] fake pv drivers installation on xen On Mon, Jul 17, 2017 at 3:40 PM, Mike Belopuhov <m...@belopuhov.com> wrot

Re: urndis issues

2017-07-18 Thread Mike Belopuhov
On Thu, Jul 13, 2017 at 14:04 +0200, Mike Belopuhov wrote: > On Wed, Jul 12, 2017 at 21:04 +, Jonathan Armani wrote: > > Hi, > > > > Thanks I was cooking the same diff. > > > > Ok armani@ > > > > Hi, thanks! I want to get rid of printfs though a

Re: [patch] fake pv drivers installation on xen

2017-07-17 Thread Mike Belopuhov
On Mon, Jul 17, 2017 at 14:32 -0400, Maxim Khitrov wrote: > On Wed, Jan 18, 2017 at 2:16 PM, Dinar Talypov wrote: > > I use Xenserver 7.0 with xencenter management console. > > without it doesn't allow shutdown or reboot. > > Anyway I'll try with hostctl. > > > > Thanks. > >

Re: time(1): use monotonic clock for computing elapsed time

2017-07-13 Thread Mike Belopuhov
On Thu, Jul 13, 2017 at 13:44 +1000, David Gwynne wrote: > > > On 13 Jul 2017, at 11:16 am, Scott Cheloha wrote: > > > > Hi, > > > > The "real" elapsed time for time(1) and the ksh/csh time builtins is > > currently computed with gettimeofday(2), so it's subject to

Re: urndis issues

2017-07-13 Thread Mike Belopuhov
On Wed, Jul 12, 2017 at 21:04 +, Jonathan Armani wrote: > Hi, > > Thanks I was cooking the same diff. > > Ok armani@ > Hi, thanks! I want to get rid of printfs though and return errors (or unhandled status codes) so that we don't paper over them. In theory, all error codes that I've seen

Re: urndis issues

2017-07-11 Thread Mike Belopuhov
On Sun, Jul 09, 2017 at 09:57 +0300, Artturi Alm wrote: > Hi, > > anyone else having issues w/urndis(android)? > victim of circumstances, i have to rely on it at times during the summer. > When i plug phone into usb, and enable usb tethering or w/e it is called, > i never get ip on first try, i

Additional media options for ix(4)

2017-06-27 Thread Mike Belopuhov
Hi, I won't mind some broad testing of the following diff which adds some additional media options to ix(4) from FreeBSD and includes a fix for changing media from Masanobu SAITOH. The fix makes sure that when the media operation speed is selected manually, the device doesn't additionally

Re: faster timecounters for kvm/xen

2017-06-18 Thread Mike Belopuhov
On Sun, Jun 18, 2017 at 21:20 +1000, Jonathan Matthew wrote: > On Fri, Jun 16, 2017 at 10:25:29AM +0200, Mike Belopuhov wrote: > > Now regarding the diff. pvbus_init_vcpu. Ah yes, please. > > It was a chicken and the egg problem for me: I didn't have > > Xen, but wanted a ca

Re: faster timecounters for kvm/xen

2017-06-17 Thread Mike Belopuhov
On 17 June 2017 at 14:17, Jonathan Matthew <jonat...@d14n.org> wrote: > > On Fri, Jun 16, 2017 at 01:19:02PM +0200, Mike Belopuhov wrote: > > On Fri, Jun 16, 2017 at 10:25 +0200, Mike Belopuhov wrote: > > > I don't know if it's a good idea to depend on Xen's > > &

Re: faster timecounters for kvm/xen

2017-06-16 Thread Mike Belopuhov
On Fri, Jun 16, 2017 at 10:25 +0200, Mike Belopuhov wrote: > Last time I've tried uebayashi's pvclock on Xen, it didn't > work for me. I didn't have time to investigate why but > probably because we need per-cpu readings. Which you do > for KVM. I'll test this on Xen as s

Re: faster timecounters for kvm/xen

2017-06-16 Thread Mike Belopuhov
On Fri, Jun 16, 2017 at 23:09 +1000, Jonathan Gray wrote: > On Fri, Jun 16, 2017 at 02:23:36PM +0200, Mike Belopuhov wrote: > > On Fri, Jun 16, 2017 at 16:31 +1000, Jonathan Matthew wrote: > > > Index: arch/i386

Re: faster timecounters for kvm/xen

2017-06-16 Thread Mike Belopuhov
On Fri, Jun 16, 2017 at 16:31 +1000, Jonathan Matthew wrote: > Index: arch/i386/include/cpufunc.h > === > RCS file: /cvs/src/sys/arch/i386/include/cpufunc.h,v > retrieving revision 1.25 > diff -u -p -u -p -r1.25 cpufunc.h > ---

Re: faster timecounters for kvm/xen

2017-06-16 Thread Mike Belopuhov
On Fri, Jun 16, 2017 at 10:25 +0200, Mike Belopuhov wrote: > I don't know if it's a good idea to depend on Xen's > definition of vcpu_time_info. I think I have factored > it out into the pvclock_time_info and put it into the > pvclockvar.h or something like that. And then made Xen

Re: faster timecounters for kvm/xen

2017-06-16 Thread Mike Belopuhov
On Fri, Jun 16, 2017 at 16:31 +1000, Jonathan Matthew wrote: > Recently I updated the kernel lock profiling stuff I've been working on, since > it had been rotting a bit since witness was introduced. Running my diff on a > KVM VM, I found there was a pretty huge performance impact (10 minutes to

Re: Better handling of short reads

2017-06-14 Thread Mike Belopuhov
On Wed, Jun 14, 2017 at 11:43 -0400, Ted Unangst wrote: > Mike Belopuhov wrote: > > still looking forward to replies to the original set of changes. > > i'm a little in between. on the one hand, yes, ok, it's good that we don't > leave corrupted buffers around with bad data.

Re: Better handling of short reads

2017-06-14 Thread Mike Belopuhov
On Wed, Jun 14, 2017 at 09:12 -0600, Bob Beck wrote: > > > As you all might have gathered by now Amit has jumped the gun > > but was wrong to do so. His setup is not affected by this change. > > That was expected so please don't get distracted by this as I'm > > still looking forward to replies

Re: tweak txp to avoid ifq_deq_begin/commit/rollback

2017-06-14 Thread Mike Belopuhov
On Mon, Jun 05, 2017 at 16:13 +0200, Mike Belopuhov wrote: > On Wed, May 31, 2017 at 20:40 +0200, Mike Belopuhov wrote: > > According to the FreeBSD driver, txp(4) is not setting up its TX > > ring correctly. FreeBSD driver uses up to 16 fragments, while we > > use up to 25

Re: Better handling of short reads

2017-06-14 Thread Mike Belopuhov
On Thu, Jun 08, 2017 at 11:55 +0200, Mike Belopuhov wrote: > On Wed, Jun 07, 2017 at 23:04 -0500, Amit Kulkarni wrote: > > On Wed, 7 Jun 2017 21:27:27 -0500 > > Amit Kulkarni <amit.o...@gmail.com> wrote: > > > > > On Thu, 8 Jun 2017 01:57:25 +0200 > > &

Re: pool cpu caches and a systat view of them

2017-06-14 Thread Mike Belopuhov
On Wed, Jun 14, 2017 at 13:50 +1000, David Gwynne wrote: > i have a few things left to do in the pools per cpu caches, one of > which is make their activity visibile. to that end, here's a diff > provides a way for userland to request stats from the per cpu caches, > and uses that in systat so you

Re: pfctl: make functions return void, merge two ifs

2017-06-12 Thread Mike Belopuhov
On Sun, Jun 11, 2017 at 15:03 +0100, Raymond wrote: > Transform the following functions (which never return anything other than 0, > and whose return value is never used) to void: > > * pfctl_clear_stats, pfctl_clear_interface_flags, pfctl_clear_rules, > pfctl_clear_src_nodes,

Re: Better handling of short reads

2017-06-08 Thread Mike Belopuhov
On Wed, Jun 07, 2017 at 23:04 -0500, Amit Kulkarni wrote: > On Wed, 7 Jun 2017 21:27:27 -0500 > Amit Kulkarni <amit.o...@gmail.com> wrote: > > > On Thu, 8 Jun 2017 01:57:25 +0200 > > Mike Belopuhov <m...@belopuhov.com> wrote: > > > > > On Wed,

Re: Better handling of short reads

2017-06-07 Thread Mike Belopuhov
usable. There's a night and > day improvement, before and after. Thanks for debugging and fixing > this. > What kind of broken hardware do you have that this diff helps you? Can you show us your dmesg? > amit > > On Wed, Jun 7, 2017 at 12:29 PM, Mike Belopuhov <m...@belopu

Better handling of short reads

2017-06-07 Thread Mike Belopuhov
Hi, I've discovered that short reads (nonzero b_resid) aren't handled very well in our kernel and I've proposed a diff like this to handle short reads of buffercache read-ahead buffers: diff --git sys/kern/vfs_bio.c sys/kern/vfs_bio.c index 95bc80bc0e6..1cc1943d752 100644 --- sys/kern/vfs_bio.c

Fail adding the queue for an interface that doesn't exist

2017-06-07 Thread Mike Belopuhov
This might not be the fix we want in the long run, but it surely prevents frustration when making a typo in the interface name. As reported by Sebastien Marie and claudio@. OK? diff --git sys/net/pf_ioctl.c sys/net/pf_ioctl.c index 43cccdb2efa..c563a439c45 100644 --- sys/net/pf_ioctl.c +++

vic: stop using ifq_deq_rollback

2017-06-07 Thread Mike Belopuhov
Hi, This is a straightforward diff moving invariant chunks before dequeue operation. OK? diff --git sys/dev/pci/if_vic.c sys/dev/pci/if_vic.c index e34a1aa4f27..bc1e600d8bc 100644 --- sys/dev/pci/if_vic.c +++ sys/dev/pci/if_vic.c @@ -1049,43 +1049,35 @@ vic_start(struct ifnet *ifp)

Re: tweak txp to avoid ifq_deq_begin/commit/rollback

2017-06-05 Thread Mike Belopuhov
On Wed, May 31, 2017 at 20:40 +0200, Mike Belopuhov wrote: > According to the FreeBSD driver, txp(4) is not setting up its TX > ring correctly. FreeBSD driver uses up to 16 fragments, while we > use up to 252 which is suspicious. > > This gets us in line with FreeBSD, intr

Re: iked: add a tag macro for EAP identity

2017-06-01 Thread Mike Belopuhov
On 1 June 2017 at 10:57, Stuart Henderson wrote: > > I have an iked VPN box that needs to restrict access to certain > resources by user. For connections using a client cert this can be > done by using PF tags based on the ID from the cert, but this > falls short for EAP. >

Re: tweak txp to avoid ifq_deq_begin/commit/rollback

2017-05-31 Thread Mike Belopuhov
On Wed, May 31, 2017 at 20:40 +0200, Mike Belopuhov wrote: > According to the FreeBSD driver, txp(4) is not setting up its TX > ring correctly. FreeBSD driver uses up to 16 fragments, while we > use up to 252 which is suspicious. > > This gets us in line with FreeBSD, intr

tweak txp to avoid ifq_deq_begin/commit/rollback

2017-05-31 Thread Mike Belopuhov
According to the FreeBSD driver, txp(4) is not setting up its TX ring correctly. FreeBSD driver uses up to 16 fragments, while we use up to 252 which is suspicious. This gets us in line with FreeBSD, introduces goodness of m_defrag and removes pesky if_deq_* thingies. Does anyone still have the

Re: tweak msk to avoid ifq_deq_begin/commit/rollback

2017-05-31 Thread Mike Belopuhov
On Wed, May 31, 2017 at 10:28 +1000, David Gwynne wrote: > ie, do the space check before trying to dequeue and mbuf. > > this also moves it to using m_defrag. > Thanks, this looks good. Forgot to mention that you can remove the /* now we are committed to transmit the packet */ comment from both

Re: kqueue EV_RECEIPT and EV_DISPATCH

2017-05-31 Thread Mike Belopuhov
On Wed, May 31, 2017 at 08:37 +0200, Jan Schreiber wrote: > Hi, > > I recently stumbled upon software that relies on EV_RECEIPT and > EV_DISPATCH to be available as flags. It also showed up as dependency > for a Rust crate. > FreeBSD has it since 8.1 and OSX since 10.5. > Patch is below. > >

HFSC and FQ-CoDel integration

2017-05-28 Thread Mike Belopuhov
This is a first stab at HFSC and FQ-CoDel integration via extending PF queueing operations (pfq_ops) interface. With this FQ-CoDel can be attached directly to an interface as well as serve as a replacement for the HFSC queue to improve its characteristics. In essence, in many setups (router

Re: memory barriers and atomic instructions

2017-05-23 Thread Mike Belopuhov
On Tue, May 23, 2017 at 17:41 +0200, Mark Kettenis wrote: > So here is a diff that implements what I proposed recently. This > recognizes that atomic instructions on amd64 already include an > implicit memory barrier and allows us to write optimized code that > avoids a redundant memory barrier.

Re: UDP sendspace for dlna providing

2017-05-23 Thread Mike Belopuhov
On Tue, May 23, 2017 at 11:51 +0100, Stuart Henderson wrote: > (replying to an old mail), > > On 2017/03/16 18:07, Claudio Jeker wrote: > > On Thu, Mar 16, 2017 at 03:46:38PM +0100, Eric JACQUOT wrote: > > > Hi all, > > > > > > I had some problems with dlna server (minidlna) and a lot of cuts

  1   2   3   4   5   6   7   8   9   10   >