Page MenuHomeFreeBSD

vmaffione (V Maffione)
User

Projects

User Details

User Since
Mar 10 2018, 1:54 AM (107 w, 3 d)

Recent Activity

Sat, Mar 28

vmaffione accepted D23971: [bhyve][virtio-net] Add MTU advice support.
Sat, Mar 28, 8:45 PM
vmaffione added inline comments to D23971: [bhyve][virtio-net] Add MTU advice support.
Sat, Mar 28, 8:45 PM

Thu, Mar 26

vmaffione added a comment to D23971: [bhyve][virtio-net] Add MTU advice support.
In D23971#532136, @jhb wrote:

Reading the spec, it doesn't say that you have to define MQ to use MTU. The language is a bit odd in that it says "only exists" when in practice it seems to mean "is only valid and certain to exist". The Linux driver doesn't mandate that MTU requires MQ, and it will just ignore the MQ field. I think we are probably fine with taking that approach. Neither NetBSD nor OpenBSD support the option yet, so Linux's behavior is the only one I've seen.

Thu, Mar 26, 10:07 PM

Wed, Mar 25

vmaffione committed rS359310: netmap: ixl: add CRC to outbound frames.
netmap: ixl: add CRC to outbound frames
Wed, Mar 25, 11:06 PM

Thu, Mar 19

vmaffione accepted D24121: Add myself (afedorov) as a src commiter.
Thu, Mar 19, 2:55 PM

Wed, Mar 18

vmaffione accepted D23971: [bhyve][virtio-net] Add MTU advice support.

Just to recap:

  1. This patch has no effect if the user does not specify the mtu parameter explicitly. That is no effect in the default case.
  2. This patch is implementing a feature described by the virtio standard, and in the same way QEMU does.

As a result, I personally do not see any reason why we should not go ahead.

Wed, Mar 18, 8:49 PM

Tue, Mar 17

vmaffione accepted D24099: Bhyve: DPRINTF already includes newline, so don't add another.
Tue, Mar 17, 8:38 PM

Mon, Mar 16

vmaffione added a comment to D23971: [bhyve][virtio-net] Add MTU advice support.

Also, if the bhyve user does not provide a value for mtu, this patch won't have any effect.

Mon, Mar 16, 8:22 PM

Sat, Mar 14

vmaffione accepted D23971: [bhyve][virtio-net] Add MTU advice support.

LGTM

Sat, Mar 14, 10:29 PM

Fri, Mar 13

vmaffione added inline comments to D23971: [bhyve][virtio-net] Add MTU advice support.
Fri, Mar 13, 8:26 PM
vmaffione added a comment to D23971: [bhyve][virtio-net] Add MTU advice support.

Il giorno ven 13 mar 2020 alle ore 17:56 aleksandr.fedorov_itglobal.com
(Aleksandr Fedorov) <phabric-noreply@freebsd.org> ha scritto:

Fri, Mar 13, 8:15 PM

Thu, Mar 12

vmaffione added a comment to D23971: [bhyve][virtio-net] Add MTU advice support.

I assume you have done your tests adding mtu=9000 as a bhyve parameter.
Could you please check that you have no regression in case you don't add an mtu argument (and so with default MTU)?

Thu, Mar 12, 9:42 PM

Wed, Mar 11

vmaffione added a comment to D23971: [bhyve][virtio-net] Add MTU advice support.

Il giorno mer 11 mar 2020 alle ore 11:51 aleksandr.fedorov_itglobal.com
(Aleksandr Fedorov) <phabric-noreply@freebsd.org> ha scritto:

Wed, Mar 11, 10:01 PM
vmaffione added a comment to D23971: [bhyve][virtio-net] Add MTU advice support.

Il giorno mer 11 mar 2020 alle ore 03:11 rgrimes <
phabric-noreply@freebsd.org> ha scritto:

Wed, Mar 11, 9:53 PM

Tue, Mar 10

vmaffione committed rD53970: Update my PGP key.
Update my PGP key
Tue, Mar 10, 10:47 PM
vmaffione added a comment to D23971: [bhyve][virtio-net] Add MTU advice support.

I actually see an additional issue. According to the standard, VIRTIO_NET_F_MQ depends on VIRTIO_NET_F_CTRL_VQ.
So it looks like we should add support for VIRTIO_NET_F_CTRL_VQ as a first step.

Tue, Mar 10, 10:16 PM

Fri, Mar 6

vmaffione added inline comments to D23971: [bhyve][virtio-net] Add MTU advice support.
Fri, Mar 6, 8:10 PM

Feb 28 2020

vmaffione committed rS358438: MFC r358180.
MFC r358180
Feb 28 2020, 5:41 PM

Feb 20 2020

vmaffione committed rS358185: MFC r357846.
MFC r357846
Feb 20 2020, 9:52 PM
vmaffione committed rS358184: MFC r356523.
MFC r356523
Feb 20 2020, 9:49 PM
vmaffione added a comment to D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).

I tested this patch with various OS’s(windows, Ubuntu, centos) and didn’t find any issues. So, I think it’s ready to go.

Feb 20 2020, 9:16 PM
vmaffione committed rS358180: bhyve: enable virtio-net mergeable rx buffers for tap(4).
bhyve: enable virtio-net mergeable rx buffers for tap(4)
Feb 20 2020, 9:07 PM
vmaffione closed D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).
Feb 20 2020, 9:07 PM
vmaffione added a comment to D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).

Ok, I'll just go ahead with the commit.

Feb 20 2020, 8:46 PM

Feb 18 2020

vmaffione added a comment to D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).

In any case I tested 10 different combinations:

Feb 18 2020, 9:28 PM
vmaffione added a comment to D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).

Sorry, I didn’t have time to test the patch. But as for the code, I have no questions.

Feb 18 2020, 8:59 PM

Feb 17 2020

vmaffione added a comment to D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).

Ping. Any comments on this change?

Feb 17 2020, 8:37 PM

Feb 15 2020

vmaffione committed rS357961: MFC r357663.
MFC r357663
Feb 15 2020, 12:05 PM
vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Is this good to go?

I gave it a tick.

Yes, this has been merged already.

Feb 15 2020, 11:50 AM
vmaffione committed rS357960: MFC r357663.
MFC r357663
Feb 15 2020, 11:42 AM

Feb 13 2020

vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Is this good to go?

Feb 13 2020, 9:50 PM
vmaffione updated the diff for D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).

Fix: Keep into account virtio-net header when collecting rx buffers.

Feb 13 2020, 8:55 PM

Feb 12 2020

vmaffione added a comment to D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).

Has anybody tested this on e1000?

Feb 12 2020, 10:45 PM
vmaffione updated the summary of D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).
Feb 12 2020, 10:45 PM
vmaffione closed D23342: bhyve: move virtio-net header processing to pci_virtio_net.
Feb 12 2020, 10:44 PM
vmaffione committed rS357846: bhyve: move virtio-net header processing to pci_virtio_net.
bhyve: move virtio-net header processing to pci_virtio_net
Feb 12 2020, 10:44 PM

Feb 8 2020

vmaffione updated the diff for D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).
Feb 8 2020, 2:01 PM
vmaffione added inline comments to D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).
Feb 8 2020, 2:01 PM

Feb 7 2020

vmaffione added a comment to D23546: netmap: improve netmap(4) and vale(4) man pages.
In D23546#516998, @bcr wrote:

That's it, ready to go!
Thanks for making this change.

Feb 7 2020, 7:27 PM
vmaffione closed D23546: netmap: improve netmap(4) and vale(4) man pages.
Feb 7 2020, 7:26 PM
vmaffione committed rS357663: netmap: improve netmap(4) and vale(4) man pages.
netmap: improve netmap(4) and vale(4) man pages
Feb 7 2020, 7:26 PM

Feb 6 2020

vmaffione added a comment to D23546: netmap: improve netmap(4) and vale(4) man pages.

Please don't forget to bump .Dd (date) :-)

Feb 6 2020, 10:40 PM
vmaffione updated the diff for D23546: netmap: improve netmap(4) and vale(4) man pages.

Update date

Feb 6 2020, 10:40 PM
vmaffione added inline comments to D23546: netmap: improve netmap(4) and vale(4) man pages.
Feb 6 2020, 9:37 PM
vmaffione updated the diff for D23546: netmap: improve netmap(4) and vale(4) man pages.

Added missing newline.

Feb 6 2020, 9:37 PM
vmaffione updated subscribers of D23546: netmap: improve netmap(4) and vale(4) man pages.
Feb 6 2020, 9:24 PM
vmaffione created D23546: netmap: improve netmap(4) and vale(4) man pages.
Feb 6 2020, 9:23 PM
vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Is this good to go?

Feb 6 2020, 8:24 PM

Feb 2 2020

vmaffione created D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).
Feb 2 2020, 10:00 PM

Jan 30 2020

vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Yes indeed. But also the Linux virtio-net driver should do the same when mergeable rx buffers are not allocated.... so it is weird that it does not work in that case!

This is a big virtio specification problem. Too many unspecified actions and interpretations. Two weeks ago, I observed at a Windows guest that descriptors stand out as follows: | 12 | 1536 | 1536 | .... Even if the mergable buffers are enabled.

Jan 30 2020, 10:51 PM
vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Have you set mtu 9000 on the vtnet0 in the guest?
My tests were VM-2-VM, both freebsd guests.

Yes.
ifconfig from the guest (Ubuntu 16.04):

root@ubuntu:~# ifconfig
enp0s2    Link encap:Ethernet  HWaddr 00:a0:98:cb:89:bb
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2a0:98ff:fecb:89bb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1
          RX packets:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:150 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8066 (8.0 KB)  TX bytes:48636 (48.6 KB)

Ping from the guest:

root@ubuntu:~# ping 192.168.1.77
PING 192.168.1.77 (192.168.1.77) 56(84) bytes of data.
64 bytes from 192.168.1.77: icmp_seq=1 ttl=64 time=1.05 ms
64 bytes from 192.168.1.77: icmp_seq=2 ttl=64 time=0.197 ms
--- 192.168.1.77 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1005ms
rtt min/avg/max/mdev = 0.197/0.627/1.057/0.430 ms
^Croot@ubuntu:~#
^Croot@ubuntu:~# ping -s 8000 192.168.1.77
PING 192.168.1.77 (192.168.1.77) 8000(8028) bytes of data.
^C
--- 192.168.1.77 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3019ms
root@ubuntu:~#

I tried to debug this situation, and saw that the guest descriptors are 1536 bytes in size. Therefore, I do not understand how it could work with MTU == 9000.
I think the previous version of the patch is more adequate. And there was no POLA violation because with tap backend and MTU > 1500, it didn't work.

Yeah, but with mergeable buffers on, tap throughput dropped to 50%.
I'm not giving up on adding support for mergeable buffers. I just think it makes sense to split the patch into more changes.

Host:

root@mothership:/afedorov/vm # ifconfig tap1003
tap1003: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=80000<LINKSTATE>
        ether 58:9c:fc:10:cf:64
        inet 192.168.1.77 netmask 0xffffff00 broadcast 192.168.1.255
        groups: tap
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        Opened by PID 89835
root@mothership:/afedorov/vm #

Ping from host:

root@mothership:/afedorov/vm # ping 192.168.1.4
PING 192.168.1.4 (192.168.1.4): 56 data bytes
64 bytes from 192.168.1.4: icmp_seq=0 ttl=64 time=0.156 ms
64 bytes from 192.168.1.4: icmp_seq=1 ttl=64 time=0.155 ms
^C
--- 192.168.1.4 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.155/0.156/0.156/0.001 ms
root@mothership:/afedorov/vm #
root@mothership:/afedorov/vm # ping -s 8000 192.168.1.4
PING 192.168.1.4 (192.168.1.4): 8000 data bytes
^C
--- 192.168.1.4 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss
root@mothership:/afedorov/vm #

bhyve:

bhyve \
        -A -P -H \
        -s 0:0,hostbridge \
        -s 1:0,lpc \
        -s 2:0,virtio-net,tap1003 \
        -s 3:0,virtio-blk,./ubuntu-16.04.img \
        -l com1,stdio \
        -c 4\
        -m 2048M \
        ubuntu-16.04

Maybe of course I'm doing something wrong.

Yeah, but with mergeable buffers on, tap throughput dropped to 50%.
I'm not giving up on adding support for mergeable buffers. I just think it makes sense to split the patch into more changes.

Oh, then it's good. +1 for splitting patch.

Jan 30 2020, 10:18 PM
vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Hah, I checked fFreeBSD 12 guest and it works. It seems that, the FreeBSD guest driver allocates descriptors of size >= MTU.

Jan 30 2020, 10:16 PM
vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Thanks for the suggestion. I retried with -D (on head), and it still works. I cannot reproduce the broken jumbo-frames+tap...

It is very strange. In my tests, the version from the HEAD doesn't work:
Guest: Ubuntu 16.04 mtu 9000 192.168.1.4
Host: ifconfig tap1001 192.168.1.55/24 mtu 9000 up
Ping from host doesn't work.
ping -s 8000 -D 192.168.1.4

Jan 30 2020, 9:08 PM

Jan 29 2020

vmaffione committed rS357278: MFC r357159.
MFC r357159
Jan 29 2020, 10:58 PM
vmaffione committed rS357277: MFC r357159.
MFC r357159
Jan 29 2020, 10:56 PM
vmaffione updated the diff for D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Removed the mergeable rx buffers changes. Keep the refactoring.

Jan 29 2020, 10:53 PM
vmaffione retitled D23342: bhyve: move virtio-net header processing to pci_virtio_net from bhyve: add option to enable mergeable rx buffers to bhyve: move virtio-net header processing to pci_virtio_net.
Jan 29 2020, 10:52 PM
vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

@vmaffione Don't forget to add -D flag to your ping testing otherwise ping is fragmented and reassembled.

Jan 29 2020, 10:49 PM
vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

The alternative solution (the same used by QEMU) is to read the packet in a local bounce buffer (64KB), so that we figure out its actual length and then we call vq_getchain() the corrent number of times (e.g. just once for 1500 bytes packets). The cost for this solution is an additional packet copy, which is not good imho.

Tap has enough overhead already that I suspect using a bounce-buffer would be noise (and I've done that in a proprietary implementation).
Tap needs to be fixed anyways e.g. by providing the length of the first available buffer in kqueue data, and providing the length of the following buffer if any in msgdata.

Jan 29 2020, 10:47 PM

Jan 28 2020

vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Is "mtu 9000" really not working? I tried on head (without this patch), by setting the mtu to 9000 for both if_vtnet guest interfaces and host interfaces, and I'm able to ping -s 8900 x.y.z.w. So what exactly is not working?

Jan 28 2020, 9:14 PM

Jan 27 2020

vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

The changes looks good to me.
Also, I tested Win10, CentOS7, Ubuntu 16 and18 in our test lab - everything works correctly.

Jan 27 2020, 8:26 PM

Jan 26 2020

vmaffione committed rS357159: netmap_mem_unmap: fix NULL pointer dereference.
netmap_mem_unmap: fix NULL pointer dereference
Jan 26 2020, 9:35 PM
vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Tested several combinations (vm-2-host, vm-2-vm, tap, vale, mergeable rx buffers on and off).
Everything seems to work correctly.

Jan 26 2020, 9:02 PM
vmaffione added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

I refactored the code so that iov trimming is done by the virtio-net code, where this operation belongs.
As a nice result, now we can pass struct iovec arrays as const to the backend code.

Jan 26 2020, 6:55 PM
vmaffione updated the diff for D23342: bhyve: move virtio-net header processing to pci_virtio_net.
Jan 26 2020, 6:54 PM

Jan 25 2020

vmaffione added inline comments to D23342: bhyve: move virtio-net header processing to pci_virtio_net.
Jan 25 2020, 1:47 PM

Jan 23 2020

vmaffione updated the test plan for D23342: bhyve: move virtio-net header processing to pci_virtio_net.
Jan 23 2020, 10:13 PM
vmaffione updated the diff for D23342: bhyve: move virtio-net header processing to pci_virtio_net.
Jan 23 2020, 10:07 PM
vmaffione created D23342: bhyve: move virtio-net header processing to pci_virtio_net.
Jan 23 2020, 10:05 PM

Jan 20 2020

vmaffione committed rS356932: MFC r356703.
MFC r356703
Jan 20 2020, 10:15 PM

Jan 12 2020

vmaffione added reviewers for D22967: vmx: fix initialization of TSO related descriptor fields: mmacy, avg, bryanv, rstone, shurd.
Jan 12 2020, 8:56 AM

Jan 7 2020

vmaffione added inline comments to D22657: bhyve: add wrapper for debug printf statements.
Jan 7 2020, 10:30 PM
vmaffione updated the diff for D22657: bhyve: add wrapper for debug printf statements.
  • Aligned to current head.
  • Fixed header in debug.h
Jan 7 2020, 10:29 PM
vmaffione added a comment to D22657: bhyve: add wrapper for debug printf statements.

Comments?

Jan 7 2020, 9:29 PM

Dec 30 2019

vmaffione created D22967: vmx: fix initialization of TSO related descriptor fields.
Dec 30 2019, 10:08 AM

Dec 23 2019

vmaffione added a comment to D22657: bhyve: add wrapper for debug printf statements.

Thoughts about this change?

Dec 23 2019, 2:34 PM

Dec 6 2019

vmaffione updated the diff for D22657: bhyve: add wrapper for debug printf statements.

Removed "all rights reserved" line.
Fix multi-line debug logs in pci_xhci.c, splitting them into multiple PRINTLN() statements.

Dec 6 2019, 9:27 PM

Dec 3 2019

vmaffione created D22657: bhyve: add wrapper for debug printf statements.
Dec 3 2019, 10:26 PM

Nov 29 2019

vmaffione updated the diff for D22552: bhyve: uniform printf format string newlines.

Fixed all the print statements.

Nov 29 2019, 6:37 PM

Nov 25 2019

vmaffione created D22552: bhyve: uniform printf format string newlines.
Nov 25 2019, 9:21 PM

Nov 19 2019

vmaffione added a comment to D22440: bhyve: virtio-net: disable receive until features are negotiated.

Il giorno mar 19 nov 2019 alle ore 19:21 aleksandr.fedorov_itglobal.com
(Aleksandr Fedorov) <phabric-noreply@freebsd.org> ha scritto:

Nov 19 2019, 9:12 PM
vmaffione added inline comments to D22440: bhyve: virtio-net: disable receive until features are negotiated.
Nov 19 2019, 5:44 PM
vmaffione updated the diff for D22440: bhyve: virtio-net: disable receive until features are negotiated.

Init rx_merge to 0

Nov 19 2019, 5:43 PM
vmaffione added a comment to D22390: netmap: Check if we already ran mmap before we attempt it.

I'll do it tonight.

Nov 19 2019, 7:07 AM

Nov 18 2019

vmaffione updated the diff for D22440: bhyve: virtio-net: disable receive until features are negotiated.

Addressed comment.

Nov 18 2019, 9:57 PM
vmaffione created D22440: bhyve: virtio-net: disable receive until features are negotiated.
Nov 18 2019, 9:39 PM
vmaffione accepted D22390: netmap: Check if we already ran mmap before we attempt it.

Just one question: did this change come from some usage scenario? In theory you should not call nm_mmap() more than once.

Nov 18 2019, 8:32 PM

Nov 17 2019

vmaffione added a reviewer for D22390: netmap: Check if we already ran mmap before we attempt it: g.lettieri_iet.unipi.it.
Nov 17 2019, 2:59 PM
vmaffione added inline comments to D22390: netmap: Check if we already ran mmap before we attempt it.
Nov 17 2019, 2:58 PM

Nov 11 2019

vmaffione updated the diff for D22286: bhyve: rework mevent processing to fix a race condition.

Addressed more comments.

Nov 11 2019, 9:23 PM
vmaffione added inline comments to D22286: bhyve: rework mevent processing to fix a race condition.
Nov 11 2019, 6:51 PM
vmaffione added a comment to D22286: bhyve: rework mevent processing to fix a race condition.

Addressed more comments.

Nov 11 2019, 6:49 PM
vmaffione updated the diff for D22286: bhyve: rework mevent processing to fix a race condition.

Move check under the lock.
Minor refactor.

Nov 11 2019, 6:49 PM

Nov 10 2019

vmaffione added a comment to D22286: bhyve: rework mevent processing to fix a race condition.

Comments addressed.

Nov 10 2019, 7:05 PM
vmaffione updated the diff for D22286: bhyve: rework mevent processing to fix a race condition.

Addressed two comments.

Nov 10 2019, 7:05 PM

Nov 9 2019

vmaffione updated subscribers of D21315: bhyve: tap: add support for offloads.
Nov 9 2019, 5:56 PM
vmaffione planned changes to D21315: bhyve: tap: add support for offloads.

Unfortunately there is a blocker for this change.

Nov 9 2019, 5:56 PM
vmaffione added a comment to D22286: bhyve: rework mevent processing to fix a race condition.

Thanks for testing.

Nov 9 2019, 3:14 PM
vmaffione added a reviewer for D22286: bhyve: rework mevent processing to fix a race condition: markj.
Nov 9 2019, 9:48 AM

Nov 8 2019

vmaffione updated the summary of D22286: bhyve: rework mevent processing to fix a race condition.
Nov 8 2019, 9:49 PM