From nobody Wed Oct 19 23:23:50 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mt6HV605Nz4g2bF; Wed, 19 Oct 2022 23:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mt6HV59TJz3Vkl; Wed, 19 Oct 2022 23:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666221830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6eG3XXvUm0iAf8IzO0YEVoY3NRR0Mx5I/0E3HtMcGAY=; b=D8VnJ5XV+EOZ06gvWfLb+X1DPo5igkwOL5mtN4IVnJ5dOis3+y8Qeu0JladlIrQc2q/uMG WJzT+qm9/IRzDntUEKVupsVTxn8S22mnQgk1B5+jeje2fglkea8cbMNHZhteB70wW43OB4 5wecCmxhUwaEJEI9qJvRNfKkDGIqVuNzvUCWHL6SOmZHsz6LFxMY0AX/vjWNtMRDOji3iv UYPUp4LuCfq3AT3fGdf9elTF/htaxak0yhFf6UJqej3EbkwKYUp9iCwNIqtU4OuFC2wefi dGXv0/OrcUYlGq+Ms4DV0whq16k1IZ/yahUeE7FFS48wmzkOHm5Yu0TKOOCEvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mt6HV49mqzhGk; Wed, 19 Oct 2022 23:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29JNNo5D021676; Wed, 19 Oct 2022 23:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29JNNon4021675; Wed, 19 Oct 2022 23:23:50 GMT (envelope-from git) Date: Wed, 19 Oct 2022 23:23:50 GMT Message-Id: <202210192323.29JNNon4021675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 749c7da9b9b4 - stable/12 - ixl(4): Fix SR-IOV panics List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 749c7da9b9b45949c2aae76bffafb626e7316b06 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666221830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6eG3XXvUm0iAf8IzO0YEVoY3NRR0Mx5I/0E3HtMcGAY=; b=UWZbcqohs4YB52Y95VFw0COpNfkAYq/VwhkrD11kjWjpoCQ4rNKN4WBYGN0rs4su2nE9D1 1GnxYXK95X4LlCx70nqraFGo53UZp91pqdNVclPFsqdmd3j2lni5n6CsQwpjmK9+17Ov1k GOriyCuF2tEbAb262Id1yzuaLHmXb3FcFf/ZzGnREppwtp0Olzg8C3emG+qyBG5kNA4w7U uDD5ZeZRG07dYPua/+K/bnoi4pjgb6HBtEi018aXdMjdkDes3C6qOHCRyet5eXazG7M1tr 4UU92X7We0Dp/X2VV++yisnzb2OMAFdDNRtD6l3/jV9ncVF/KIKVYjZbhEUbfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666221830; a=rsa-sha256; cv=none; b=CVOuQJzLmznLt2u2YxycJ+XW38cPVMU7MtURqVpaTLbTBQv/d1HbIhFvlgCM35h70XV3x3 I0j9qIg9LB/h4TX0S4wQBs2EbWIXkUqHZGE1Y4YqXtBdwtfcKj1ebGjnrhXd8KbUIzE+BM Qf929JdznjnOi2R2KU/p2bG5ECcRt/joh6bRXkMxeJKNPHTyCU49s64xBT2cm2bJKuircs omLeU1dBbwoZ3GPmdnFWEA2YhlmjF4SWbEew4F4n9r4nxqz2mEsAwP6r2zUh1KssO8WZ9K LW+p5wdHx8u/wgSkwAdisjJUQzO02L1/ScmBR7NJbmxfCNC/15cbxN8CxXkIsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=749c7da9b9b45949c2aae76bffafb626e7316b06 commit 749c7da9b9b45949c2aae76bffafb626e7316b06 Author: Yan Ka Chiu AuthorDate: 2022-07-13 01:16:29 +0000 Commit: Eric Joyner CommitDate: 2022-10-19 23:19:43 +0000 ixl(4): Fix SR-IOV panics The hw and ifp of a vsi will be NULL if such ixl_vsi is allocated for a VF. When ixl_reconfigure_filters called, it is trying to access vsi->ifp and hw->mac.addr and therefore is casuing panic. This commit add checks to determine if vsi is a VF by checking if vsi->hw is NULL, before adding IXL_VLAN_ANY filter (which is already in a VF vsi's filter list) and VLAN filters. (erj's Note: The SR-IOV flows need revisiting; this will help prevent panics for now) Reviewed by: krzysztof.galazka@intel.com, erj@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35649 (cherry picked from commit e706512a2b64fa2741144caf056c9fe923b60004) --- sys/dev/ixl/ixl_pf_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index 4d75200ea739..61dd4da05030 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -1124,6 +1124,14 @@ ixl_reconfigure_filters(struct ixl_vsi *vsi) ixl_add_hw_filters(vsi, &tmp, cnt); + /* + * When the vsi is allocated for the VFs, both vsi->hw and vsi->ifp + * will be NULL. Furthermore, the ftl of such vsi already contains + * IXL_VLAN_ANY filter so we can skip that as well. + */ + if (hw == NULL) + return; + /* Filter could be removed if MAC address was changed */ ixl_add_filter(vsi, hw->mac.addr, IXL_VLAN_ANY);