From: Arkadiusz Kudan <arkadiusz.kudan@codilime.com>
To: virtualization@lists.linux-foundation.org
Cc: mst@redhat.com, jasowang@redhat.com, netdev@vger.kernel.org,
Arkadiusz Kudan <arkadiusz.kudan@codilime.com>,
Miroslaw Walukiewicz <Miroslaw.Walukiewicz@intel.com>
Subject: [PATCH] virtio-net: enable SRIOV
Date: Mon, 26 Apr 2021 12:21:35 +0200 [thread overview]
Message-ID: <20210426102135.227802-1-arkadiusz.kudan@codilime.com> (raw)
With increasing interest for virtio, NIC have appeared that provide
SRIOV with PF appearing in the host as a virtio network device
and probably more similiar NICs will emerge.
igb_uio of DPDK or pci-pf-stub can be used to provide SRIOV,
however there are hypervisors/VMMs that require VFs, which are
to be PCI passthrued to a VM, to have its PF with network
representation in the kernel. For virtio-net based PFs,
virtio-net could do that by providing both SRIOV interface and
netdev representation.
Enable SRIOV via VIRTIO_F_SR_IOV feature bit if the device
supports it.
Signed-off-by: Arkadiusz Kudan <arkadiusz.kudan@codilime.com>
Signed-off-by: Miroslaw Walukiewicz <Miroslaw.Walukiewicz@intel.com>
---
drivers/net/virtio_net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0824e6999e49..a03aa7e99689 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -3249,6 +3249,7 @@ static struct virtio_device_id id_table[] = {
static unsigned int features[] = {
VIRTNET_FEATURES,
+ VIRTIO_F_SR_IOV,
};
static unsigned int features_legacy[] = {
--
2.31.1
--
-------------------------------
This document contains material that is
confidential in CodiLime Sp. z o.o. DO NOT PRINT. DO NOT COPY. DO NOT
DISTRIBUTE. If you are not the intended recipient of this document, be
aware that any use, review, retransmission, distribution, reproduction or
any action taken in reliance upon this message is strictly prohibited. If
you received this in error, please contact the sender and help@codilime.com
<mailto:help@codilime.com>. Return the paper copy, delete the material from
all computers and storage media.
next reply other threads:[~2021-04-26 10:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 10:21 Arkadiusz Kudan [this message]
2021-04-27 2:43 ` [PATCH] virtio-net: enable SRIOV Jason Wang
2021-04-28 13:32 ` Walukiewicz, Miroslaw
2021-04-29 2:18 ` Jason Wang
[not found] ` <CAFSqgu1sX+t2hfQpbtDxOanRNd2y58GuR7=omSt0=DviwRGc6g@mail.gmail.com>
2021-04-29 2:31 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210426102135.227802-1-arkadiusz.kudan@codilime.com \
--to=arkadiusz.kudan@codilime.com \
--cc=Miroslaw.Walukiewicz@intel.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).