Re: [PATCH] ure improvement

2017-09-17 Thread tinkr
Hi SC,

Thanks for committing!

Should this patch probably fix the many terrible issues AXEN has been 
documented to have recently?

(Lazy question, was this patch included in the 6.1 snapshot)

Tinker

> Hi,
> 
> This patch does:
> 
> - Enable RX aggregation.
> - Fix RX packet buffer alignment, using roundup() macro in sys/params.h.
> - Call usbd_set_config before configuring endpoints in ure_init to fix
>an error when re-opening pipes.  I grabbed the code from if_kue.c.
> - Make the chip recognize given MAC address.
> - Remove ure_reset in ure_init, becasue its already called from ure_stop.
> 
> Regards,
> 
> --- sys/dev/usb/if_ure.c Wed May  3 22:20:15 2017
> +++ sys/dev/usb/if_ure.c Mon Jun 19 09:11:09 2017
> @@ -470,8 +470,6 @@ ure_init(void *xsc)
>   /* Cancel pending I/O. */
>   ure_stop(sc);
> 
> - ure_reset(sc);
> -
>   if (ure_rx_list_init(sc) == ENOBUFS) {
>   printf("%s: rx list init failed\n", sc->ure_dev.dv_xname);
>   splx(s);
> @@ -484,9 +482,18 @@ ure_init(void *xsc)
>   return;
>   }
> 
> +#define URE_CONFIG_NO 1
> + if (usbd_set_config_no(sc->ure_udev, URE_CONFIG_NO, 1) ||
> +usbd_device2interface_handle(sc->ure_udev, URE_IFACE_IDX,
> + >ure_iface))
> + printf("%s: set_config failed\n", sc->ure_dev.dv_xname);
> + usbd_delay_ms(sc->ure_udev, 10);
> +
>   /* Set MAC address. */
> + ure_write_1(sc, URE_PLA_CRWECR, URE_MCU_TYPE_PLA, URE_CRWECR_CONFIG);
>   ure_write_mem(sc, URE_PLA_IDR, URE_MCU_TYPE_PLA | URE_BYTE_EN_SIX_BYTES,
>  sc->ure_ac.ac_enaddr, 8);
> + ure_write_1(sc, URE_PLA_CRWECR, URE_MCU_TYPE_PLA, URE_CRWECR_NORAML);
> 
>   /* Reset the packet filter. */
>   ure_write_2(sc, URE_PLA_FMC, URE_MCU_TYPE_PLA,
> @@ -683,10 +690,10 @@ ure_rtl8152_init(struct ure_softc *sc)
>  URE_GPHY_STS_MSK | URE_SPEED_DOWN_MSK | URE_SPDWN_RXDV_MSK |
>  URE_SPDWN_LINKCHG_MSK);
> 
> - /* Disable Rx aggregation. */
> + /* Enable Rx aggregation. */
>   ure_write_2(sc, URE_USB_USB_CTRL, URE_MCU_TYPE_USB,
> -ure_read_2(sc, URE_USB_USB_CTRL, URE_MCU_TYPE_USB) |
> -URE_RX_AGG_DISABLE);
> +ure_read_2(sc, URE_USB_USB_CTRL, URE_MCU_TYPE_USB) &
> +~URE_RX_AGG_DISABLE);
> 
>   /* Disable ALDPS. */
>   ure_ocp_reg_write(sc, URE_OCP_ALDPS_CONFIG, URE_ENPDNPS | URE_LINKENA |
> @@ -835,10 +842,10 @@ ure_rtl8153_init(struct ure_softc *sc)
> 
>   ure_init_fifo(sc);
> 
> - /* Disable Rx aggregation. */
> + /* Enable Rx aggregation. */
>   ure_write_2(sc, URE_USB_USB_CTRL, URE_MCU_TYPE_USB,
> -ure_read_2(sc, URE_USB_USB_CTRL, URE_MCU_TYPE_USB) |
> -URE_RX_AGG_DISABLE);
> +ure_read_2(sc, URE_USB_USB_CTRL, URE_MCU_TYPE_USB) &
> +~URE_RX_AGG_DISABLE);
> 
>   val = ure_read_2(sc, URE_USB_U2P3_CTRL, URE_MCU_TYPE_USB);
>   if (!(sc->ure_chip & (URE_CHIP_VER_5C00 | URE_CHIP_VER_5C10)))
> @@ -1289,7 +1296,7 @@ ure_rxeof(struct usbd_xfer *xfer, void *priv, usbd_sta
>   goto done;
>   }
> 
> - buf += pktlen;
> + buf += roundup(pktlen, 8);
> 
>   memcpy(, buf, sizeof(rxhdr));
>   total_len -= sizeof(rxhdr);
> @@ -1302,7 +1309,7 @@ ure_rxeof(struct usbd_xfer *xfer, void *priv, usbd_sta
>   goto done;
>   }
> 
> - total_len -= pktlen;
> + total_len -= roundup(pktlen, 8);
>   buf += sizeof(rxhdr);
> 
>   m = m_devget(buf, pktlen, ETHER_ALIGN);

Re: [vmd] SVM flag on AMD Phenom II but vmd not working

2017-09-17 Thread Mike Larkin
On Sun, Sep 17, 2017 at 04:22:27PM +0200, Philippe wrote:
> On 16/09/2017 20:36, Mike Larkin wrote:
> > Ah, that's right. Thanks jca. Good spot!
> > 
> > OP: upgrade to -current.
> It worked. \o/
> 
> Thanks.
> 
> 
> Now I have a problem using virtual machines, they crash the host. I can
> do an openbsd install up to the end of the installer, right before it
> gives a prompt to reboot (when it saves configuration files), then the
> host crash and I can't even ping it.
> 
> When I try to install Alpine Linux, I can't even see the first step of
> the installer.
> 
> 
> The only elements I have in the /var/log/daemon file are:
> 
> Sep 17 15:49:59 vache vmd[69998]: SIOCBRDGADD: No such file or directory
> Sep 17 15:50:12 vache vmd[9599]: OpenBSD.vm: vcpu_assert_pic_irq: can't
> assert INTR
> 
> How to make this easier to debug? Where can I find useful information?
> 

How about starting with a better bug report?

> -- 
> Philippe Pittoli
> Doctorant en réseaux informatiques, ICube Strasbourg
> Fondateur d'Alsace Réseau Neutre
> https://www.arn-fai.net



Re: softraid crypto seem really slower than plain ffs

2017-09-17 Thread Kevin Chadwick
On Fri, 15 Sep 2017 12:24:32 +0200


> I noticed that there were a huge difference between 
> plain and encrypted filesystem using OpenBSD.

I'm not a developer but I know 6.1 moved to a shiny new side channel 
resistant AES. I seem to remember Theo saying that if it is that slow
then even worse; people won't use encryption at all and if they need
side channel resistance then they could get a processor with AES-NI
etc.. Not sure if it was reverted in the end or not. I guess it was
decided upon whether a use case including a side channel attack existed
and could catch a user out, but I have no idea.



Re: [vmd] SVM flag on AMD Phenom II but vmd not working

2017-09-17 Thread Dave Voutila
Philippe,

> When I try to install Alpine Linux, I can't even see the first step of
> the installer.

What command and arguments are you using to start the Alpine vm and
which Alpine version are you using? You should at least get the
"boot:" prompt via syslinux when attached via the serial console. I've
spent a lot of time installing and using Alpine lately so I might be
of some help. (Also, you might want to start with the "virt" iso from
Alpine as it's pre-configured to use the serial console at boot.)

> The only elements I have in the /var/log/daemon file are:
>
> Sep 17 15:49:59 vache vmd[69998]: SIOCBRDGADD: No such file or directory

What arguments are you using to start the vm and what do you have
defined in vm.conf? This looks to be a failure to add a network device
to the bridge that vmd configures.

>
> How to make this easier to debug? Where can I find useful information?
>

You can increase verbosity by setting the flag "-v" on vmd via rcctl,
or running vmd interactively using "-d" along with one or more "-v".
See the vmd(8) man page. I believe you can also set verbosity via
`vmctl log verbose` but I've never done that at runtime.

-Dave



Re: [vmd] SVM flag on AMD Phenom II but vmd not working

2017-09-17 Thread Philippe
On 16/09/2017 20:36, Mike Larkin wrote:
> Ah, that's right. Thanks jca. Good spot!
> 
> OP: upgrade to -current.
It worked. \o/

Thanks.


Now I have a problem using virtual machines, they crash the host. I can
do an openbsd install up to the end of the installer, right before it
gives a prompt to reboot (when it saves configuration files), then the
host crash and I can't even ping it.

When I try to install Alpine Linux, I can't even see the first step of
the installer.


The only elements I have in the /var/log/daemon file are:

Sep 17 15:49:59 vache vmd[69998]: SIOCBRDGADD: No such file or directory
Sep 17 15:50:12 vache vmd[9599]: OpenBSD.vm: vcpu_assert_pic_irq: can't
assert INTR

How to make this easier to debug? Where can I find useful information?

-- 
Philippe Pittoli
Doctorant en réseaux informatiques, ICube Strasbourg
Fondateur d'Alsace Réseau Neutre
https://www.arn-fai.net



Re: startx fails with (EE) VESA(0): Cannot read int vect

2017-09-17 Thread Niels Kobschaetzki

On 17/09/17 09:54, Dell Sanders wrote:

Hello,

I have freshly installed openbsd 6.1 on my PC which has a Intel HD Graphics 530 
graphics chipset.

/var/log/Xorg.1.org

(II) VESA(0): intializing int10
(EE) VESA(0): Cannot read int vect

dmesg has some (perhaps relevant) messages -

pchb0 at pci0 dev 0 function 0 vendor "Intel", unknown product 0x190f rev 0x07
"Intel HD Graphics 530" rev 0x06 at pci0 dev 2 function 0 not configured

Any ideas?


My Skylake-CPU has 520. And for getting that to work you need to use a
snapshot and not 6.1. I don't know if 530 is then supported, too.

Niels



startx fails with (EE) VESA(0): Cannot read int vect

2017-09-17 Thread Dell Sanders
Hello,

I have freshly installed openbsd 6.1 on my PC which has a Intel HD Graphics 530 
graphics chipset. 

/var/log/Xorg.1.org

(II) VESA(0): intializing int10
(EE) VESA(0): Cannot read int vect

dmesg has some (perhaps relevant) messages -

pchb0 at pci0 dev 0 function 0 vendor "Intel", unknown product 0x190f rev 0x07
"Intel HD Graphics 530" rev 0x06 at pci0 dev 2 function 0 not configured

Any ideas?