From owner-freebsd-net@freebsd.org Sun Jun 21 18:50:57 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F4E6357D75 for ; Sun, 21 Jun 2020 18:50:57 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2a00:14b0:4200:32e0::1ea]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "gilb.zs64.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qhSw2Pl6z4RCt for ; Sun, 21 Jun 2020 18:50:55 +0000 (UTC) (envelope-from stb@lassitu.de) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id ECBE131BBE3 for ; Sun, 21 Jun 2020 18:50:47 +0000 (UTC) From: Stefan Bethke Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: SR_IOV with ixgbe not working? Message-Id: <302B863E-9FFB-4641-BDE7-5923214121C7@lassitu.de> Date: Sun, 21 Jun 2020 20:50:46 +0200 To: freebsd-net@freebsd.org X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49qhSw2Pl6z4RCt X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of stb@lassitu.de designates 2a00:14b0:4200:32e0::1ea as permitted sender) smtp.mailfrom=stb@lassitu.de X-Spamd-Result: default: False [-0.25 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.67)[-0.667]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.53)[-0.531]; DMARC_NA(0.00)[lassitu.de]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_SHORT(-0.26)[-0.257]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:13135, ipnet:2a00:14b0::/32, country:DE]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 18:50:57 -0000 I just started using an ASRock Rack X470D4U2-2T: = https://www.asrockrack.com/general/productdetail.asp?Model=3DX470D4U2-2T#S= pecifications = It sports an X550 dual 10G ethernet controller: # pciconf -lv ix0@pci0:1:0:0: class=3D0x020000 card=3D0x15631849 chip=3D0x15638086 = rev=3D0x01 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D 'Ethernet Controller 10G X550T' class =3D network subclass =3D ethernet ix1@pci0:1:0:1: class=3D0x020000 card=3D0x15631849 chip=3D0x15638086 = rev=3D0x01 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D 'Ethernet Controller 10G X550T' class =3D network subclass =3D ethernet It should support SR-IOV: # ls -l /dev/iov =20 total 0 crw------- 1 root wheel 0x32 Jun 20 23:04 ix0 crw------- 1 root wheel 0x33 Jun 20 23:04 ix1 # iovctl -S -d ix1 The following configuration parameters may be configured on the PF: num_vfs : uint16_t (required) device : string (required) The following configuration parameters may be configured on a VF: passthrough : bool (default =3D false) mac-addr : unicast-mac (optional) mac-anti-spoof : bool (default =3D true) allow-set-mac : bool (default =3D false) allow-promisc : bool (default =3D false) If I try to create a number of virtual devices, things don't seem to = work out: # cat /etc/iovctl-ix1.conf=20 PF { device: "ix1"; num_vfs: 8; } DEFAULT { passthrough: true; } VF-0 { passthrough: false; } # iovctl -C -f /etc/iovctl-ix1.conf # dmesg ... ixv0: at device = 0.129 on pci1 ixv0: ...reset_hw() failure: Reset Failed! ixv0: IFDI_ATTACH_PRE failed 5 device_attach: ixv0 attach returned 5 pci1: at device 0.131 (no driver attached) pci1: at device 0.133 (no driver attached) pci1: at device 0.135 (no driver attached) pci1: at device 0.137 (no driver attached) pci1: at device 0.139 (no driver attached) pci1: at device 0.141 (no driver attached) pci1: at device 0.143 (no driver attached) I haven't tried the passthrough devices yet, but I am interested in = having at least one virtual device available in the host for use with a = VIMAGE jail. # uname -a FreeBSD diesel.lassitu.de 12.1-STABLE FreeBSD 12.1-STABLE r362450 = GENERIC amd64 Should this be working? It seems some months ago it was necessary to = compile the Intel driver instead of the in-tree one. I would have = assumed that it would have been integrated by now.=20 Stefan --=20 Stefan Bethke Fon +49 151 14070811