Routing network traffic in sys-usb using multiple devices

251 views
Skip to first unread message

Adrian Rocha

unread,
Aug 11, 2016, 2:07:54 PM8/11/16
to qubes-users
Hi,

I have two network devices and one only USB controller, so both devices are in the same VM (sys-usb). I want to route some app-VMs by one network and the rest by the other network, for that I have created two firewall VMs but both are connected to the same network VMs because, as I commented, I can not divide the network devices in different VMs.
By default all the traffic is going by only one network device. This is the configuration in my sys-usb:

[user@sys-usb ~]$ ip route list
default via 172.20.1.1 dev enp0s0u2 proto static metric 100
default via 192.168.8.1 dev enp0s0u3 proto static metric 101
10.137.4.8 dev vif2.0 scope link metric 32750
10.137.4.29 dev vif9.0 scope link metric 32743
172.20.0.0/21 dev enp0s0u2 proto kernel scope link src 172.20.2.255 metric 100
192.168.8.0/24 dev enp0s0u3 proto kernel scope link src 192.168.8.100 metric 100

The firewall IPs are 10.137.4.8 and 10.137.4.29

I know how to route a traffic to an specific IP using "ip route add" to a determined device network, but How can I route the complete traffic from one firewall VM by one device network and the traffic from other firewall VM by the other device network?

Regards

Marek Marczykowski-Górecki

unread,
Aug 12, 2016, 4:34:52 AM8/12/16
to Adrian Rocha, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Source based-routing is tricky in Linux in general. You can search for
some guides on the internet.

But alternatively, on Qubes R3.2, you can assign one of those USB
devices to different VM - some separate netvm, or even one of those
firewallvms directly (and do not attach this firewallvm to any netvm).
It may work slightly slower, but should be much easier.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXrYojAAoJENuP0xzK19csd1AH/0xLELbOxgJSEbwImKU7OrYM
JVLl1hqGNx1iAy/6BGiV3IK0/CawomzVtoUcLli20WxTSjMqrrkoet5bRxWmZdYb
LWg2eHAjbFSL4hi20Rg6VPeYcFSy3BQH42YpfQnU2xlPjSXCCAJHfIbRsQpNJ8i3
HPXcHfr3Gb1LqljgHjW/wrHzqc7T4uu4wGu28bPwow1EcSuVX8Ag7NZBeeqC1eDa
TjUOcmRXuY6BB7ofp2qzJQQBPHSMHdGM7G7QEEdxx1xy9E3knfs2i1HWKf2haR2s
uVfrCqsSjaTaoHFD3QSNk7gM6M6J1Eku9LUA4xosbbvN+H++O1jPfzXw98eXbxE=
=nMKF
-----END PGP SIGNATURE-----

Adrian Rocha

unread,
Aug 18, 2016, 11:25:34 AM8/18/16
to qubes-users, adrian....@gmail.com
El viernes, 12 de agosto de 2016, 2:34:52 (UTC-6), Marek Marczykowski-Górecki escribió:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On Thu, Aug 11, 2016 at 11:07:54AM -0700, Adrian Rocha wrote:
> > Hi,
> >
> > I have two network devices and one only USB controller, so both devices are in the same VM (sys-usb). I want to route some app-VMs by one network and the rest by the other network, for that I have created two firewall VMs but both are connected to the same network VMs because, as I commented, I can not divide the network devices in different VMs.
> > By default all the traffic is going by only one network device. This is the configuration in my sys-usb:
> >
> > [user@sys-usb ~]$ ip route list
> > default via 172.20.1.1 dev enp0s0u2 proto static metric 100
> > default via 192.168.8.1 dev enp0s0u3 proto static metric 101
> > 10.137.4.8 dev vif2.0 scope link metric 32750
> > 10.137.4.29 dev vif9.0 scope link metric 32743
> > 172.20.0.0/21 dev enp0s0u2 proto kernel scope link src 172.20.2.255 metric 100
> > 192.168.8.0/24 dev enp0s0u3 proto kernel scope link src 192.168.8.100 metric 100
> >
> > The firewall IPs are 10.137.4.8 and 10.137.4.29
> >
> > I know how to route a traffic to an specific IP using "ip route add" to a determined device network, but How can I route the complete traffic from one firewall VM by one device network and the traffic from other firewall VM by the other device network?
>
> Source based-routing is tricky in Linux in general. You can search for
> some guides on the internet.
>
> But alternatively, on Qubes R3.2, you can assign one of those USB
> devices to different VM - some separate netvm, or even one of those
> firewallvms directly (and do not attach this firewallvm to any netvm).
> It may work slightly slower, but should be much easier.

Thanks for your tip Marek, but I am having an error with the USB assign:

The ethernet adapter in the sys-usb VM:
[user@sys-usb ~]$ lsusb
...
Bus 005 Device 002: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
...

And when I try to assing them to the sys-net VM in dom0:
[user@dom0 ~]$ qvm-usb
sys-usb:4-6 06cb:1ac3 SYNAPTICS_Synaptics_Large_Touch_Screen
sys-usb:5-2 0b95:1790 ASIX_Elec._Corp._AX88179_000000000000:9
sys-usb:4-9 8087:07dc 8087_07dc
sys-usb:4-11 0bda:573c CN0Y2TKG7248741DA3RDA00_Integrated_Webcam_HD_200901010001
[user@dom0 ~]$ qvm-usb -a sys-net sys-usb:5-2
ERROR: Device attach failed: /usr/lib/qubes/usb-import: line 51: printf: write error: Invalid argument

Any idea or a detailed reference about this functionality?

Marek Marczykowski-Górecki

unread,
Aug 18, 2016, 11:45:44 AM8/18/16
to Adrian Rocha, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Check kernel messages in sys-net. It looks like kernel driver rejects
this device for some reason.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXtdghAAoJENuP0xzK19csjmEH/RKN1Wo8EsllAJ0jUfHcp4AP
GtjhLUYdU+zM2b+h37CLqGCLJ98Eeh4J/CMTH4B7MD6Y5TbCsJNfSxlLYfduPC4Y
zQa/MCDQ09Rof/iipT6SSXX/vRG+NyO+ssMWZM2URjGO0/IXyf0+RM7BI8syPq/L
FoNXyJU36F8BNAcihQZIJ1pDwj1gfEz8JJUEhX1rQgSvjUm7mmdpV2DCF1fYZ/OS
LsIBGrz+Ugja7dcYhwcxz1VkpXwPvExI/JceiLvlNxILwRaBtaBPMbX23CmknvB8
T31N1IgJSxUQDgcPEhgu8MpHFyHmR5XhCQZmAJ+eMimhDdv4faLTCr2NKvXCSlg=
=/uUW
-----END PGP SIGNATURE-----

Adrian Rocha

unread,
Aug 18, 2016, 12:12:35 PM8/18/16
to qubes-users, adrian....@gmail.com
This is the message in sys-net:
[ 3116.501714] vhci_hcd: Failed attach request for unsupported USB speed: super-speed

And I see this in sys-usb:
[ 3095.918081] usbip-host 5-2: stub up
[ 3095.920893] usbip-host 5-2: recv a header, 0
[ 3096.023678] usbip-host 5-2: reset SuperSpeed USB device number 2 using xhci_hcd
[ 3096.038562] usbip-host 5-2: device reset

Marek Marczykowski-Górecki

unread,
Aug 18, 2016, 12:50:14 PM8/18/16
to Adrian Rocha, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

> This is the message in sys-net:
> [ 3116.501714] vhci_hcd: Failed attach request for unsupported USB speed: super-speed
>
> And I see this in sys-usb:
> [ 3095.918081] usbip-host 5-2: stub up
> [ 3095.920893] usbip-host 5-2: recv a header, 0
> [ 3096.023678] usbip-host 5-2: reset SuperSpeed USB device number 2 using xhci_hcd
> [ 3096.038562] usbip-host 5-2: device reset

Ok, so the reason is the device being USB3.0, which isn't supported by
the driver, unfortunately. Try plugging it into USB2.0 port.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXtec+AAoJENuP0xzK19csRRQH/3RZvDbnNoPIDu27fOQz4Ef3
acENkrr6Or7Pw09eRLitxG+RfrNsAAVsCs0ohpm7qrlXYZW0F0D3xFsHwAeDEs94
QzAqdMjUfQorDJRqriPQwoGiBENKbp0pyDPGh8i25j4GdJV86A/2in+3dgCkeLT9
MX++fId0aQKVfu+4NTsF9dbizNWF3y12kpjCEyam12exT9n+4Zj1+Uc2XBfAW2B6
OAlzYfnOslaTKk+dn/gsDJlsBfrkUh+3z1FQodFOOf41HfCsN7rYuoJF5KUcA3vM
WFCfXBKa0pEpnXPwJkdGnvf3Yk9rb03oB84cvRjuQfGmAI9+USro9hpjxjMrdI8=
=Gqjj
-----END PGP SIGNATURE-----

Adrian Rocha

unread,
Aug 18, 2016, 1:34:55 PM8/18/16
to qubes-users, adrian....@gmail.com
Ahh ok, I tried in the USB 2.0 port, and now I can assign it. But I see in the sys-net that it is recognized for a while but never connects to the network. After a few seconds the device returns to the sys-usb VM. This are de messages in sys-net VM:

[ 7277.118612] vhci_hcd vhci_hcd: rhport(0) sockfd(0) devid(262154) speed(3) speed_str(high-speed)
[ 7277.321126] usb 2-1: new high-speed USB device number 2 using vhci_hcd
[ 7277.526125] usb 2-1: new high-speed USB device number 3 using vhci_hcd
[ 7277.731179] usb 2-1: new high-speed USB device number 4 using vhci_hcd
[ 7277.731224] usb 2-1: SetAddress Request (4) to port 0
[ 7277.754530] usb 2-1: New USB device found, idVendor=0b95, idProduct=1790
[ 7277.754571] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7277.754598] usb 2-1: Product: AX88179
[ 7277.754617] usb 2-1: Manufacturer: ASIX Elec. Corp.
[ 7277.754629] usb 2-1: SerialNumber: 000000000000:9
[ 7279.201825] ax88179_178a 2-1:1.0 eth0: register 'ax88179_178a' at usb-vhci_hcd-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, a0:ce:c8:01:9d:5a
[ 7279.201937] usbcore: registered new interface driver ax88179_178a
[ 7279.232276] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 7279.582818] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 7282.764712] ax88179_178a 2-1:1.0 eth0: ax88179 - Link status is: 1
[ 7282.773797] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 7323.025920] vhci_hcd: connection closed
[ 7323.025957] vhci_hcd: stop threads
[ 7323.025964] vhci_hcd: release socket
[ 7323.025968] vhci_hcd: disconnect device
[ 7323.025996] usb 2-1: USB disconnect, device number 4
[ 7323.026060] vhci_hcd: dequeue a urb ffff88000bfff6c0
[ 7323.026065] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026069] vhci_hcd: gives back urb ffff88000bfff6c0
[ 7323.026072] vhci_hcd: dequeue a urb ffff88000539f9c0
[ 7323.026076] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026079] vhci_hcd: gives back urb ffff88000539f9c0
[ 7323.026083] vhci_hcd: dequeue a urb ffff88000539f180
[ 7323.026086] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026090] vhci_hcd: gives back urb ffff88000539f180
[ 7323.026093] vhci_hcd: dequeue a urb ffff88000539f0c0
[ 7323.026096] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026099] vhci_hcd: gives back urb ffff88000539f0c0
[ 7323.026116] vhci_hcd: dequeue a urb ffff8800079d56c0
[ 7323.026119] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026122] vhci_hcd: gives back urb ffff8800079d56c0
[ 7323.026127] vhci_hcd: dequeue a urb ffff8800079d5240
[ 7323.026130] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026134] vhci_hcd: gives back urb ffff8800079d5240
[ 7323.026137] vhci_hcd: dequeue a urb ffff8800079d53c0
[ 7323.026140] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026143] vhci_hcd: gives back urb ffff8800079d53c0
[ 7323.026146] vhci_hcd: dequeue a urb ffff8800079d5600
[ 7323.026149] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026153] vhci_hcd: gives back urb ffff8800079d5600
[ 7323.026156] vhci_hcd: dequeue a urb ffff8800079d5780
[ 7323.026159] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026163] vhci_hcd: gives back urb ffff8800079d5780
[ 7323.026166] vhci_hcd: dequeue a urb ffff8800079d5e40
[ 7323.026169] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026172] vhci_hcd: gives back urb ffff8800079d5e40
[ 7323.026176] vhci_hcd: dequeue a urb ffff88000099d6c0
[ 7323.026179] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026182] vhci_hcd: gives back urb ffff88000099d6c0
[ 7323.026185] vhci_hcd: dequeue a urb ffff8800079d5cc0
[ 7323.026190] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026194] vhci_hcd: gives back urb ffff8800079d5cc0
[ 7323.026197] vhci_hcd: dequeue a urb ffff8800079d5b40
[ 7323.026200] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026203] vhci_hcd: gives back urb ffff8800079d5b40
[ 7323.026206] vhci_hcd: dequeue a urb ffff88000b2eed80
[ 7323.026209] vhci_hcd: device ffff880007b3c298 seems to be disconnected
[ 7323.026212] vhci_hcd: gives back urb ffff88000b2eed80
[ 7323.026225] ax88179_178a 2-1:1.0 eth0: unregister 'ax88179_178a' usb-vhci_hcd-1, ASIX AX88179 USB 3.0 Gigabit Ethernet
[ 7323.026250] ax88179_178a 2-1:1.0 eth0: Failed to read reg index 0x0002: -19
[ 7323.026256] ax88179_178a 2-1:1.0 eth0: Failed to write reg index 0x0002: -19
[ 7323.030710] ax88179_178a 2-1:1.0 eth0 (unregistered): Failed to write reg index 0x0002: -19
[ 7323.030720] ax88179_178a 2-1:1.0 eth0 (unregistered): Failed to write reg index 0x0001: -19
[ 7323.030726] ax88179_178a 2-1:1.0 eth0 (unregistered): Failed to write reg index 0x0002: -19

It's like a restart in the module. This is that I see from dom0:

[user@dom0 ~]$ qvm-usb
sys-usb:4-6 06cb:1ac3 SYNAPTICS_Synaptics_Large_Touch_Screen
sys-usb:4-3 0b95:1790 ASIX_Elec._Corp._AX88179_000000000000:9
sys-usb:4-9 8087:07dc 8087_07dc
sys-usb:4-11 0bda:573c CN0Y2TKG7248741DA3RDA00_Integrated_Webcam_HD_200901010001
[user@dom0 ~]$ qvm-usb -a sys-net sys-usb:4-3
[user@dom0 ~]$ qvm-usb
sys-usb:4-6 06cb:1ac3 SYNAPTICS_Synaptics_Large_Touch_Screen
sys-usb:4-3 0b95:1790 ASIX_Elec._Corp._AX88179_000000000000:9 (attached to sys-net)
sys-usb:4-9 8087:07dc 8087_07dc
sys-usb:4-11 0bda:573c CN0Y2TKG7248741DA3RDA00_Integrated_Webcam_HD_200901010001
[user@dom0 ~]$ qvm-usb
[user@dom0 ~]$ qvm-usb
sys-usb:3-3 0b95:1790 ASIX_Elec._Corp._AX88179_000000000000:9
sys-usb:3-9 8087:07dc 8087_07dc
sys-usb:3-6 06cb:1ac3 SYNAPTICS_Synaptics_Large_Touch_Screen
sys-usb:3-11 0bda:573c CN0Y2TKG7248741DA3RDA00_Integrated_Webcam_HD_200901010001
[user@dom0 ~]$

Best Regards

Marek Marczykowski-Górecki

unread,
Aug 29, 2016, 10:18:51 PM8/29/16
to Adrian Rocha, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

> Ahh ok, I tried in the USB 2.0 port, and now I can assign it. But I see in the sys-net that it is recognized for a while but never connects to the network. After a few seconds the device returns to the sys-usb VM. This are de messages in sys-net VM:
>
> [ 7277.118612] vhci_hcd vhci_hcd: rhport(0) sockfd(0) devid(262154) speed(3) speed_str(high-speed)
> [ 7277.321126] usb 2-1: new high-speed USB device number 2 using vhci_hcd
> [ 7277.526125] usb 2-1: new high-speed USB device number 3 using vhci_hcd
> [ 7277.731179] usb 2-1: new high-speed USB device number 4 using vhci_hcd
> [ 7277.731224] usb 2-1: SetAddress Request (4) to port 0
> [ 7277.754530] usb 2-1: New USB device found, idVendor=0b95, idProduct=1790
> [ 7277.754571] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [ 7277.754598] usb 2-1: Product: AX88179
> [ 7277.754617] usb 2-1: Manufacturer: ASIX Elec. Corp.
> [ 7277.754629] usb 2-1: SerialNumber: 000000000000:9
> [ 7279.201825] ax88179_178a 2-1:1.0 eth0: register 'ax88179_178a' at usb-vhci_hcd-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, a0:ce:c8:01:9d:5a
> [ 7279.201937] usbcore: registered new interface driver ax88179_178a
> [ 7279.232276] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
> [ 7279.582818] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
> [ 7282.764712] ax88179_178a 2-1:1.0 eth0: ax88179 - Link status is: 1
> [ 7282.773797] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
> [ 7323.025920] vhci_hcd: connection closed
> [ 7323.025957] vhci_hcd: stop threads
> [ 7323.025964] vhci_hcd: release socket
> [ 7323.025968] vhci_hcd: disconnect device
> [ 7323.025996] usb 2-1: USB disconnect, device number 4

Take a look at kernel messages in sys-usb at this point of time.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXxO0EAAoJENuP0xzK19csbJIH/1NhSZkGgEuT94VjhD8M8NKN
oXh6nt6jOBmeZ/msN0y2W+hG5N4z2u1zn23XPKmEt9weDkGREC+S/m35JM1xFrK1
631e00pCTpIsz2p3Bwv6kF0+bGg70gfsPSkwJqvR5ll7zkTD8P7Nqu8zSbJ/F3yh
0pHVgNE0zJXXGPa4Eo/a5S8H68BHOZf2KHALeTchiYmw7ex52GMOgN9O1gS++hQK
xPq3IYsdQ8TAP1tMSf0bJxvHNsWzBgX43n8NOiirZiXUanqFWFAzWFVt3hFYfV2f
fTBuRVJgSvtrfdyPJaD1R1Zd4bsziD9LQ4QlCFXIufC4ReLKtjnbzPtU3Vv8RFY=
=12rd
-----END PGP SIGNATURE-----

Adrian Rocha

unread,
Sep 1, 2016, 11:34:30 AM9/1/16
to qubes-users, adrian....@gmail.com
Hi Marek,
I did a new test.
I noted that the problem is when I connect the ethernet cable and the sys-net is trying to establish the connection.
dmesg in sys-net:
[ 121.407624] usbip_core: USB/IP Core v1.0.0
[ 121.409482] vhci_hcd vhci_hcd: USB/IP Virtual Host Controller
[ 121.409675] vhci_hcd vhci_hcd: new USB bus registered, assigned bus number 2
[ 121.416624] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 121.416638] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 121.416646] usb usb2: Product: USB/IP Virtual Host Controller
[ 121.416653] usb usb2: Manufacturer: Linux 4.4.14-11.pvops.qubes.x86_64 vhci_hcd
[ 121.416661] usb usb2: SerialNumber: vhci_hcd
[ 121.416839] hub 2-0:1.0: USB hub found
[ 121.416853] hub 2-0:1.0: 8 ports detected
[ 121.418525] vhci_hcd: USB/IP 'Virtual' Host Controller (VHCI) Driver v1.0.0
[ 121.471202] vhci_hcd vhci_hcd: rhport(0) sockfd(0) devid(196613) speed(3) speed_str(high-speed)
[ 121.720082] usb 2-1: new high-speed USB device number 2 using vhci_hcd
[ 121.925177] usb 2-1: new high-speed USB device number 3 using vhci_hcd
[ 122.130090] usb 2-1: new high-speed USB device number 4 using vhci_hcd
[ 122.130123] usb 2-1: SetAddress Request (4) to port 0
[ 122.152079] usb 2-1: New USB device found, idVendor=0b95, idProduct=1790
[ 122.152104] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 122.152119] usb 2-1: Product: AX88179
[ 122.152132] usb 2-1: Manufacturer: ASIX Elec. Corp.
[ 122.152144] usb 2-1: SerialNumber: 000000000000:9
[ 123.579324] ax88179_178a 2-1:1.0 eth0: register 'ax88179_178a' at usb-vhci_hcd-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, a0:ce:c8:01:9d:5a
[ 123.585169] usbcore: registered new interface driver ax88179_178a
[ 123.615815] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 123.963310] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 144.539753] ax88179_178a 2-1:1.0 eth0: ax88179 - Link status is: 1
[ 144.552712] ax88179_178a 2-1:1.0 eth0: Failed to write reg index 0x000d: -32
[ 144.555011] ax88179_178a 2-1:1.0 eth0: Failed to write reg index 0x000d: -32
[ 144.557002] ax88179_178a 2-1:1.0 eth0: Failed to write reg index 0x000d: -32
[ 144.558848] ax88179_178a 2-1:1.0 eth0: Failed to write reg index 0x000d: -32
[ 144.559588] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

dmesg in sys-usb:
[ 78.700163] usb 3-3: new high-speed USB device number 5 using xhci_hcd
[ 78.870601] usb 3-3: New USB device found, idVendor=0b95, idProduct=1790
[ 78.870633] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 78.870652] usb 3-3: Product: AX88179
[ 78.870664] usb 3-3: Manufacturer: ASIX Elec. Corp.
[ 78.870675] usb 3-3: SerialNumber: 000000000000:9
[ 80.256798] ax88179_178a 3-3:1.0 eth0: register 'ax88179_178a' at usb-0000:00:00.0-3, ASIX AX88179 USB 3.0 Gigabit Ethernet, a0:ce:c8:01:9d:5a
[ 80.258943] usbcore: registered new interface driver ax88179_178a
[ 80.264284] ax88179_178a 3-3:1.0 enp0s0u3: renamed from eth0
[ 80.279556] IPv6: ADDRCONF(NETDEV_UP): enp0s0u3: link is not ready
[ 80.599923] IPv6: ADDRCONF(NETDEV_UP): enp0s0u3: link is not ready
[ 115.789191] usbip_core: USB/IP Core v1.0.0
[ 115.789675] usbcore: registered new device driver usbip-host
[ 115.789682] usbip_host: USB/IP Host Driver v1.0.0
[ 115.795928] ax88179_178a 3-3:1.0 enp0s0u3: unregister 'ax88179_178a' usb-0000:00:00.0-3, ASIX AX88179 USB 3.0 Gigabit Ethernet
[ 115.809871] usbip-host 3-3: usbip-host: register new device (bus 3 dev 5)
[ 115.818524] usbip-host 3-3: stub up
[ 116.535461] usbip-host 3-3: endpoint 0 is stalled
[ 117.579056] usbip-host 3-3: usb_set_interface done: inf 0 alt 0
[ 118.314577] usbip-host 3-3: endpoint 0 is stalled
[ 138.900818] usbip-host 3-3: endpoint 0 is stalled
[ 138.903418] usbip-host 3-3: endpoint 0 is stalled
[ 138.905414] usbip-host 3-3: endpoint 0 is stalled
[ 138.907346] usbip-host 3-3: endpoint 0 is stalled
[ 138.917366] usbip-host 3-3: endpoint 0 is stalled
[ 138.951366] general protection fault: 0000 [#1] SMP
[ 138.951388] Modules linked in: usbip_host usbip_core ax88179_178a usbnet mii fuse xt_nat xen_netback xt_REDIRECT nf_nat_redirect cmac ip6table_filter ip6_tables xt_conntrack bnep ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack btusb btrtl btbcm btintel uvcvideo bluetooth videobuf2_vmalloc rfkill videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common videodev media joydev hid_multitouch rtsx_pci_ms memstick rtsx_pci_sdmmc mmc_core xhci_pci xhci_hcd ehci_pci rtsx_pci ehci_hcd mfd_core intel_rapl iosf_mbi x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul crc32c_intel xen_pcifront pcspkr dummy_hcd udc_core u2mfn(O) xen_blkback xenfs xen_privcmd xen_blkfront
[ 138.951498] CPU: 0 PID: 1281 Comm: stub_rx Tainted: G O 4.4.14-11.pvops.qubes.x86_64 #1
[ 138.951508] task: ffff88000fd93a00 ti: ffff88000d86c000 task.ti: ffff88000d86c000
[ 138.951516] RIP: e030:[<ffffffff81202d0f>] [<ffffffff81202d0f>] __kmalloc_track_caller+0x9f/0x250
[ 138.951539] RSP: e02b:ffff88000d86fd98 EFLAGS: 00010246
[ 138.951557] RAX: 0008000800160140 RBX: 00000000024000c0 RCX: 0000000000000000
[ 138.951563] RDX: 00000000000012bc RSI: 0000000000000000 RDI: 000000000001a0a0
[ 138.951578] RBP: ffff88000d86fdd0 R08: ffff880018c1a0a0 R09: ffff880016801e00
[ 138.951583] R10: 0008000800160140 R11: ffffea000020f7c0 R12: 00000000024000c0
[ 138.951598] R13: 0000000000000008 R14: ffffffffa03072fa R15: ffff880016801e00
[ 138.951607] FS: 0000000000000000(0000) GS:ffff880018c00000(0000) knlGS:0000000000000000
[ 138.951615] CS: e033 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 138.951620] CR2: 00007f51f29c7000 CR3: 000000000d87b000 CR4: 0000000000042660
[ 138.951625] Stack:
[ 138.951629] ffff88000d86fde0 ffffffff81200a99 0000000000000008 ffff88000d86fe88
[ 138.951639] ffff88000d86fe60 ffff88000d9d5240 ffff8800083df000 ffff88000d86fdf0
[ 138.951648] ffffffff811be720 ffff88000834f800 ffff880015828b00 ffff88000d86fe40
[ 138.951657] Call Trace:
[ 138.951665] [<ffffffff81200a99>] ? __kmalloc+0x1d9/0x260
[ 138.951674] [<ffffffff811be720>] kmemdup+0x20/0x50
[ 138.951682] [<ffffffffa03072fa>] stub_recv_cmd_submit+0x13a/0x7d0 [usbip_host]
[ 138.951691] [<ffffffffa0307bba>] stub_rx_loop+0x22a/0x2a0 [usbip_host]
[ 138.951698] [<ffffffffa0307990>] ? stub_recv_cmd_submit+0x7d0/0x7d0 [usbip_host]
[ 138.951708] [<ffffffff810bd548>] kthread+0xd8/0xf0
[ 138.951714] [<ffffffff810bd470>] ? kthread_create_on_node+0x190/0x190
[ 138.951722] [<ffffffff81756c8f>] ret_from_fork+0x3f/0x70
[ 138.951728] [<ffffffff810bd470>] ? kthread_create_on_node+0x190/0x190
[ 138.951734] Code: 49 83 78 10 00 4d 8b 10 0f 84 3b 01 00 00 4d 85 d2 0f 84 32 01 00 00 49 63 41 20 49 8b 39 4c 01 d0 40 f6 c7 0f 0f 85 9e 01 00 00 <48> 8b 18 48 8d 4a 01 4c 89 d0 65 48 0f c7 0f 0f 94 c0 84 c0 74
[ 138.951793] RIP [<ffffffff81202d0f>] __kmalloc_track_caller+0x9f/0x250
[ 138.951801] RSP <ffff88000d86fd98>
[ 138.951838] ---[ end trace f65ee14bbe44ac1e ]---

And when I try to detach the device, it returns an error:
[user@dom0 ~]$ qvm-usb
sys-usb:3-3 0b95:1790 ASIX_Elec._Corp._AX88179_000000000000:9
sys-usb:3-9 8087:07dc 8087_07dc
sys-usb:3-6 06cb:1ac3 SYNAPTICS_Synaptics_Large_Touch_Screen
sys-usb:3-11 0bda:573c CN0Y2TKG7248741DA3RDA00_Integrated_Webcam_HD_200901010001
[user@dom0 ~]$ qvm-usb -a sys-net sys-usb:3-3
[user@dom0 ~]$ qvm-usb -d sys-usb:3-3
Traceback (most recent call last):
File "/usr/bin/qvm-usb", line 141, in <module>
main()
File "/usr/bin/qvm-usb", line 128, in main
usb_detach(qvm_collection, attached_to, dev)
File "/usr/lib64/python2.7/site-packages/qubes/qubesutils.py", line 662, in usb_detach
raise QubesException('Device detach failed')
qubes.qubes.QubesException: Device detach failed
[user@dom0 ~]$ qvm-usb
sys-usb:3-3 0b95:1790 ASIX_Elec._Corp._AX88179_000000000000:9 (attached to sys-net)
sys-usb:3-9 8087:07dc 8087_07dc
sys-usb:3-6 06cb:1ac3 SYNAPTICS_Synaptics_Large_Touch_Screen
sys-usb:3-11 0bda:573c CN0Y2TKG7248741DA3RDA00_Integrated_Webcam_HD_200901010001

After some time the VM sys-usb is restarted automatically.

Regards
Reply all
Reply to author
Forward
0 new messages