Re: Slow umass(4) on xhci(4)

2022-06-05 Thread Greg Steuck
Mike Larkin  writes:

> On Sat, Jun 04, 2022 at 06:24:36PM -0700, Greg Steuck wrote:
>> I observe ~90x difference in bandwidth between Linux and OpenBSD on the
>> same hardware. The test case is reading big files from a USB-attached
>> flash drive[0].  The drive is plugged into a sole USB-c port on the back
>> of the motherboard.
>>
>> On Linux I get about 900MB/s. OpenBSD shows ~10MB/s:
>>
>> # dd if=/dev/sd1i of=/dev/null bs=1M count=1000
>> 1000+0 records in
>> 1000+0 records out
>> 1048576000 bytes transferred in 95.617 secs (10966340 bytes/sec)
>>
>
> does /dev/rsd1i make any difference?

I was somehow sure I tried rsd1i before, but now I can see a 17x
difference:

# dd if=/dev/rsd1i of=/dev/null bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes transferred in 6.038 secs (173,659,835 bytes/sec)

Looking at iostat I see that using the "r" device causes transactions to
go up to 64KB/t.

Now, the real issue I had was with a slow ext2 file systems on the
drive.  I get 10MB/s reading the files and I observe 4KB/t in iostat.

So, yeah, I can get faster transfers which means xhci and umass are
capable of more than filesystems (at least ext2) extract out of them.

Thanks
Greg



Re: mg: how to indent using spaces instead of tabs

2022-06-05 Thread Omar Polo
Sam Lee  wrote:
> On 2022-06-05 10:58 +0200, Omar Polo wrote:
> > M-x no-tab-mode RET seems to work (as long as you don't want to change
> > the width of the `expandtab'; it always align to the nearest multiple
> > of 8)
> 
> How do people write Python programs using mg?
> Python requires 4 space indentation ...

and lua uses three spaces.  i guess there aren't a lot of people writing
in these languages with mg, or maybe they don't use auto-indent-mode?
dunno.  personally i use mg mainly for configuration files and C, as i
find it sometimes more "comfy" than Emacs itself :)

The good thing tho is that you have the sources (/usr/src/usr.bin/mg
assuming you have a checkout in /usr/src.)

You can add -DNOTAB in the Makefile to enable it, then grep for NOTAB
and see how to allow using a different tab width per buffer.  Then
you'll have a diff for it, so you're issue will be solved, and you can
share it on tech@ (cc'ing lum@).  I for one would be happy to review
such a diff, even if I can't give a meaningful OK.



Re: Dynamic gif Tunnel

2022-06-05 Thread Crystal Kolipe
On Sun, Jun 05, 2022 at 10:51:49AM -, Stuart Henderson wrote:
> You will probably be happier with wg(4) though, for this scenario
> with a static IP at one side you don't need to do anything special
> to maintain the tunnel, it "just works".and automatically follows
> changes of client IP.

Except possibly set up some kind of slow ping or other keep-alive
mechanism.

Since wireguard is stateless, if the dynamic IP is behind some kind
of NAT, the ISP might break inbound connectivity if there is no
outbound traffic for a certain period, (typically 2 minutes or so).

This only matters if you expect to receive inbound connections
without making an outbound connection first, (for example, inbound
SMTP), because any outbound traffic should bring up the link anyway.

IPSEC is another possible alternative.



Re: reminder: ports snapshots go with base snapshots

2022-06-05 Thread Mihai Popescu
[ ... ]

Just my user feedback, and only if it is wanted: I was not able to
understand a damn thing from all the messages about this change.

As an user, the "update" thing was always a voodoo for me. Ironically,
the FAQ has exactly 3 (three) lines of text, one is the command itself
(no offense intended to the maintainer, great job). So I was not able
to understand the "update" action and I never used it and I have no
plans to use it yet. I simply do a bare install from the scratch.

As a damage assessment user cannot complain, they use what they get
(both software and help) and I think they will go on with this. The
developers understands more and can mitigate the effects.

About the non communication and what happened, I think the involved
parties must have a private talk.

Thank you.



Re: Dynamic gif Tunnel

2022-06-05 Thread Stuart Henderson
On 2022-06-05, open...@007sascha.de  wrote:
> Hi,
> I would like to build a dynamic gif tunnel and search the "best" and secured 
> concept for that.
> Szenario: HomeRouter with dynamic IP; OpenBSD as Gateway with static IP.
> 6in4 gif tunnel.
> On IP change at HomeRouter, i have to adjust the tunnel Endpoint on the 
> Gateway.
> Concepts:
> 1. To change pf, i can use authpf, but how can i change the tunnel parameter? 
> Second ssh session and doas?
>
> 2. Build a web-API to change tunnel and pf? How, httpd is in chroot.
>
> 3. use a external dyndns Service and work with a cronjob to check for changes 
> on DNS
>
> Any suggestions/recommendation?

Any of those would work. If you want to use a web API you can either
run the cgi/php/whatever script unchrooted, or write to a file under
/var/www which is read by a daemon/cronjob.

You will probably be happier with wg(4) though, for this scenario
with a static IP at one side you don't need to do anything special
to maintain the tunnel, it "just works".and automatically follows
changes of client IP. (I use it to route a /27 from colo to home
which can be used across whatever connectivity I have so it works
over mobile/landline/radio link/whatever).

-- 
Please keep replies on the mailing list.



Re: mg: how to indent using spaces instead of tabs

2022-06-05 Thread Omar Polo
Omar Polo  wrote:
> Sam Lee  wrote:
> > In the mg text editor, how do I indent using spaces instead of tabs?
> > If I enable auto-indent-mode, mg uses tabs to indent. Is there
> > something like Vim and nvi's 'expandtab' option that makes mg indent
> > using spaces instead of tabs?
> 
> there isn't an `expandtab' for mg.
> 
> there is some code in mg to handle that, but it's hidden under some
> #ifdef NOTAB and probably not complete and maybe doesn't even compile.

actually, i was wrong.  it's true that the relevant code is hidden under
#ifdef NOTAB and not enabled by default, but it compiles fine and M-x
no-tab-mode RET seems to work (as long as you don't want to change the
width of the `expandtab'; it always align to the nearest multiple of 8)



Re: mg: how to indent using spaces instead of tabs

2022-06-05 Thread Omar Polo
Sam Lee  wrote:
> In the mg text editor, how do I indent using spaces instead of tabs?
> If I enable auto-indent-mode, mg uses tabs to indent. Is there
> something like Vim and nvi's 'expandtab' option that makes mg indent
> using spaces instead of tabs?

there isn't an `expandtab' for mg.

there is some code in mg to handle that, but it's hidden under some
#ifdef NOTAB and probably not complete and maybe doesn't even compile.