From owner-svn-src-all@freebsd.org Wed Nov 14 20:46:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFF3C1134AF6; Wed, 14 Nov 2018 20:46:35 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 715DC6B84D; Wed, 14 Nov 2018 20:46:35 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: vmaffione) by smtp.freebsd.org (Postfix) with ESMTPSA id 35D7B2DBEB; Wed, 14 Nov 2018 20:46:35 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: by mail-qk1-f174.google.com with SMTP id w204so28316269qka.2; Wed, 14 Nov 2018 12:46:35 -0800 (PST) X-Gm-Message-State: AGRZ1gImo7eu7o6r/HwkMQWfQInQyTHNVZIW90lFpCkSKNk1b6nvZg2T gWWNR2T55Q9o5Kv2E6NnVowKiydHtDO+qmXT8rY= X-Google-Smtp-Source: AJdET5dWYOC40ppj9FVKEtl3dBnjSAuCrmYi5/UxI/L9mkuyLtJzFwLTbNxxVh7gmBOO4GFwdKr/9AB6Tl/yytG/osk= X-Received: by 2002:a37:bb82:: with SMTP id l124mr3282474qkf.188.1542228394572; Wed, 14 Nov 2018 12:46:34 -0800 (PST) MIME-Version: 1.0 References: <201811141539.wAEFdnKQ077428@repo.freebsd.org> <201811141944.wAEJiWFq037423@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201811141944.wAEJiWFq037423@pdx.rh.CN85.dnsmgr.net> From: Vincenzo Maffione Date: Wed, 14 Nov 2018 21:46:23 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r340436 - in head/sys/dev: netmap virtio/network To: rgrimes@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 715DC6B84D X-Spamd-Result: default: False [-106.88 / 200.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ALLOW_DOMAIN_WHITELIST(-100.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: mx66.freebsd.org]; NEURAL_HAM_SHORT(-1.00)[-1.000,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; IP_SCORE(-3.77)[ip: (-9.91), ipnet: 2610:1c1:1::/48(-4.93), asn: 11403(-3.91), country: US(-0.10)] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2018 20:46:36 -0000 On Wed, Nov 14, 2018, 8:44 PM Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net wrote: > > Author: vmaffione > > Date: Wed Nov 14 15:39:48 2018 > > New Revision: 340436 > > URL: https://svnweb.freebsd.org/changeset/base/340436 > > > > Log: > > vtnet: fix netmap support > > > > netmap(4) support for vtnet(4) was incomplete and had multiple bugs. > > This commit fixes those bugs to bring netmap on vtnet in a functional > state. > > > > Changelist: > > - handle errors returned by virtqueue_enqueue() properly (they were > > previously ignored) > > - make sure netmap XOR rest of the kernel access each virtqueue. > > - compute the number of netmap slots for TX and RX separately, > according to > > whether indirect descriptors are used or not for a given virtqueue. > > - make sure sglist are freed according to their type (mbufs or netmap > > buffers) > > - add support for mulitiqueue and netmap host (aka sw) rings. > > - intercept VQ interrupts directly instead of intercepting them in > txq_eof > > and rxq_eof. This simplifies the code and makes it easier to make > sure > > taskqueues are not running for a VQ while it is in netmap mode. > > - implement vntet_netmap_config() to cope with changes in the number > of queues. > > > > Reviewed by: bryanv > > Approved by: gnn (mentor) > > MFC after: 3 days > > Sponsored by: Sunny Valley Networks > > Differential Revision: https://reviews.freebsd.org/D17916 > > I would like to get some wider test of this in ^head/ > specifically with use in a bhyve guest before we do > an early merge to stable/12 so that this can be in > the next build. > > If you are capable of testing this within bhyve as a guest > please do so and provide feedback. It does not need to be > a ^/head host, just the guest needs to be using vtnet > nic's. > > The tests I did are reported here https://reviews.freebsd.org/D17916 , and consist of one or two ^/head guests, each one having a vtnet NIC. The hypervisor is qemu-kvm, running in the host. Unfortunately I cannot do tests with bhyve as an hypervisor, because that requires a FreeBSD host (e.g., ^/head , stable/12 or stable/11), and at the moment I don't have one. Cheers, Vincenzo