From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D643C54FB9 for ; Thu, 16 Nov 2023 14:41:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 25CAC41A14; Thu, 16 Nov 2023 14:41:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 25CAC41A14 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1700145696; bh=xvnnkMzVtm13VsWO+FekCDqSy3Aw9ssfXMLRXIC4h4U=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=nWuBtGhQQmDiq4j+xJvnIqd//fB77OnBlpQx3iyXwCEKVfaoJ1igVaaW3oD1Yuqqa sJiUu65H2UbA2j7RSJY+C8quWYQBj2oBIa2sGsSLdYcjyEkMbXsH1bONBVq8WV/8Uh 65Dk1+h11z1zCWhyvnDylnyZTcHkGv1EXCed9xL9JZ28oXGLp5alKEs2vHg6A2UsE5 Xq+tBC63Is/A1Ac3YyGzFxgwtb0OoIC3YOrqZnHuYsXOUlSVg8PX4TxkcMJaUbxWPt c6qT3YiAyOZkyIMvVR2yOhrdpISwXQTfuv8gzSTtck5mC2kkp5LTpKHOQVsTnL5j8h +KsZmu8kg8SDA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w3__euDPoGHl; Thu, 16 Nov 2023 14:41:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id D668D419E9; Thu, 16 Nov 2023 14:41:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D668D419E9 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B0E1B1BF363 for ; Thu, 16 Nov 2023 14:41:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 895EE6FA7C for ; Thu, 16 Nov 2023 14:41:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 895EE6FA7C X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9NE7LF99F6CX for ; Thu, 16 Nov 2023 14:41:29 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id D452D6FA7A for ; Thu, 16 Nov 2023 14:41:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D452D6FA7A Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-155-cTbg5-V9Mt6Hj2GJzTVeDQ-1; Thu, 16 Nov 2023 09:41:25 -0500 X-MC-Unique: cTbg5-V9Mt6Hj2GJzTVeDQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A6DDB101A53B; Thu, 16 Nov 2023 14:41:24 +0000 (UTC) Received: from p1.luc.cera.cz (unknown [10.45.225.144]) by smtp.corp.redhat.com (Postfix) with ESMTP id B176E1121307; Thu, 16 Nov 2023 14:41:22 +0000 (UTC) From: Ivan Vecera To: intel-wired-lan@lists.osuosl.org Date: Thu, 16 Nov 2023 15:41:15 +0100 Message-ID: <20231116144119.78769-2-ivecera@redhat.com> In-Reply-To: <20231116144119.78769-1-ivecera@redhat.com> References: <20231116144119.78769-1-ivecera@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700145687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ntIwoh8nmo6x8jvo27voHZh3WCaqdVm0ct3IIneIzKs=; b=WBjK8bVoVhYSfqCul0sIqqbZScvikxZGSC7iKXuB+nzss0CKRIxIyUrnC+ww43fEg5heRW ivyOBe+b93nKI/NYlLsIsBQnk2Zu4YQfUFj+X9Xv6USrQftdokfhU6XF0D1/SpOrLb4V7O mCM3b9Srza2A6RFvSfoW0Jj4bEPwiio= X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WBjK8bVo Subject: [Intel-wired-lan] [PATCH iwl-next v2 1/5] i40e: Use existing helper to find flow director VSI X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wojciech Drewek , netdev@vger.kernel.org, Jesse Brandeburg , linux-kernel@vger.kernel.org, Eric Dumazet , Tony Nguyen , Simon Horman , Jacob Keller , Jakub Kicinski , Paolo Abeni , "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Use existing i40e_find_vsi_by_type() to find a VSI associated with flow director. Reviewed-by: Wojciech Drewek Signed-off-by: Ivan Vecera --- drivers/net/ethernet/intel/i40e/i40e_main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 51ee870ffa36..90966878333c 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -15645,6 +15645,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) #ifdef CONFIG_I40E_DCB enum i40e_get_fw_lldp_status_resp lldp_status; #endif /* CONFIG_I40E_DCB */ + struct i40e_vsi *vsi; struct i40e_pf *pf; struct i40e_hw *hw; u16 wol_nvm_bits; @@ -15655,7 +15656,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) #endif /* CONFIG_I40E_DCB */ int err; u32 val; - u32 i; err = pci_enable_device_mem(pdev); if (err) @@ -16005,12 +16005,9 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) INIT_LIST_HEAD(&pf->vsi[pf->lan_vsi]->ch_list); /* if FDIR VSI was set up, start it now */ - for (i = 0; i < pf->num_alloc_vsi; i++) { - if (pf->vsi[i] && pf->vsi[i]->type == I40E_VSI_FDIR) { - i40e_vsi_open(pf->vsi[i]); - break; - } - } + vsi = i40e_find_vsi_by_type(pf, I40E_VSI_FDIR); + if (vsi) + i40e_vsi_open(vsi); /* The driver only wants link up/down and module qualification * reports from firmware. Note the negative logic. -- 2.41.0 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan