Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4423909rdh; Wed, 29 Nov 2023 00:39:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHalVmAcfilYxm5XY8Q/csV/X+y6mWOEBbBc9LEYqs53ZFwfWnfXskBhSdi5xCVcUhJMq7z X-Received: by 2002:a17:902:c405:b0:1cf:a70f:3a2d with SMTP id k5-20020a170902c40500b001cfa70f3a2dmr21953018plk.63.1701247177735; Wed, 29 Nov 2023 00:39:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701247177; cv=none; d=google.com; s=arc-20160816; b=bq0eV1r7LgsbT1LLW4t7ono60LNIn6DRgLJQJgBNcjOkJDMgrfXzUEyFj+Jbw0Ecu+ KgfbO8Pf3RE4L4pz9hhpeLDN30ru1Z9omsbflaFrVJOCeExPhiEhzSXoVxWTsghtKrCZ SGbKTtyQWGC8/hWQ8/YnNh+iO9SHtRrsXQA8hgNGId304hntHJIve3F2pzDZqymROS7o d/qmIIgvPJhhAjW4luBiSvNhettjMqQIRoHHwcXXFwcPpTggg7PzTNtA5iti5dZWCTRd juayJPdRtjlSjXBemDHfE0U+v+6YXOtGiqeBvH9QjQXYmh+1fHPt8aPsORmqPwT/wtCn 98uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=xJX93Tpg94woqfZUkMv1QEDU9HKHF+FZ0rIOC151TyA=; fh=QmzyoF/JtWKr/BHuoZz/vTgUaQe8cwlqEatGLTLP7O0=; b=z7HkfdvH6zH7SSOcloIaFqpwvPgrrr2VvrizXOepJhOSxQ/fVj0In3JzkxbsG0XdsA Upfw5uG8KmpEdAvKyO6gOXVHvBL8iPYPqHLxMWN+KxbkPZLsGY/KTyU9ENHQDxdAsv/t f75GDufCUT6U7xYICb4haKSaFlwQccDzo8/kIyjc6vXUZ8sorvCLxw8/cvZtmZEQLsjf S7auVsd31zpZYBOnOI64FE5EetU6N/2ahU3L1cc1AX5NztxMFm4BJnHUmGz7PFU1D02x 3R/9p1FMPafn8OkeOYagCfHGPorOzFzVrd+V/XPs73nrmAuBwDeAUKCG56R1fHVLZiZg Csgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eGXOMjU2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id x16-20020a170902821000b001cfa70fd337si10765885pln.301.2023.11.29.00.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 00:39:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eGXOMjU2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 51506805ED3E; Wed, 29 Nov 2023 00:39:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbjK2IjT (ORCPT + 99 others); Wed, 29 Nov 2023 03:39:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230430AbjK2IjM (ORCPT ); Wed, 29 Nov 2023 03:39:12 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8AD91BF6 for ; Wed, 29 Nov 2023 00:39:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701247143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xJX93Tpg94woqfZUkMv1QEDU9HKHF+FZ0rIOC151TyA=; b=eGXOMjU2K6AIHPq59QYtIF8ofJ0XOP3zuYGedviqceQMAeeCwYUkCNm1eFhiTVOyUjWFP0 lZGF81FyW4oydpKL0BSyJNC4aj7/R6J8TP5wsn/EuBbU9DN+XMnFJ0obddl78V4tLdYTOF ZbpIZk0oZ/xUL6S30p4qz6c7vq2TAP4= 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-594-N3n6YeDTM3eGVsVLDaEKmQ-1; Wed, 29 Nov 2023 03:39:00 -0500 X-MC-Unique: N3n6YeDTM3eGVsVLDaEKmQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 6287C852ACB; Wed, 29 Nov 2023 08:38:59 +0000 (UTC) Received: from [10.45.225.216] (unknown [10.45.225.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89F9D36E4; Wed, 29 Nov 2023 08:38:41 +0000 (UTC) Message-ID: <63bd858a-fe07-4eda-9835-d999e2905860@redhat.com> Date: Wed, 29 Nov 2023 09:38:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 4/5] i40e: Fix broken support for floating VEBs Content-Language: en-US To: Dan Carpenter , oe-kbuild@lists.linux.dev, intel-wired-lan@lists.osuosl.org Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev, Jesse Brandeburg , Tony Nguyen , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, Jacob Keller , Wojciech Drewek , Simon Horman , mschmidt@redhat.com, netdev@vger.kernel.org References: <25111205-a895-46a2-b53f-49e29ba41b16@suswa.mountain> From: Ivan Vecera In-Reply-To: <25111205-a895-46a2-b53f-49e29ba41b16@suswa.mountain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 29 Nov 2023 00:39:34 -0800 (PST) On 27. 11. 23 9:43, Dan Carpenter wrote: > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14720 > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14721 pf = veb->pf; > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14722 > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14723 /* find the > remaining VSI and check for extras */ > 0aab77d67d37d09 Ivan Vecera 2023-11-24 14724 > i40e_pf_for_each_vsi(pf, i, vsi_it) > 0aab77d67d37d09 Ivan Vecera 2023-11-24 14725 if > (vsi_it->uplink_seid == veb->seid) { > 93a1bc91a1ccc5a Ivan Vecera 2023-11-24 14726 if > (vsi_it->flags & I40E_VSI_FLAG_VEB_OWNER) > 0aab77d67d37d09 Ivan Vecera 2023-11-24 14727 vsi = vsi_it; > > Do we always find a vsi? Presumably, yes, but it's not obvious just > from reading this function. Yes, if the VEB has uplink (veb->uplink_seid != 0) then it has to have a downlink VSI that owns it (vsi->flags has I40E_VSI_FLAG_VEB_OWNER set) Ivan > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14728 n++; > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14729 } > 0aab77d67d37d09 Ivan Vecera 2023-11-24 14730 > 93a1bc91a1ccc5a Ivan Vecera 2023-11-24 14731 /* Floating VEB has > to be empty and regular one must have > 93a1bc91a1ccc5a Ivan Vecera 2023-11-24 14732 * single owner > VSI. > 93a1bc91a1ccc5a Ivan Vecera 2023-11-24 14733 */ > 93a1bc91a1ccc5a Ivan Vecera 2023-11-24 14734 if > ((veb->uplink_seid && n != 1) || (!veb->uplink_seid > && n != 0)) { > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14735 > dev_info(&pf->pdev->dev, > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14736 "can't remove > VEB %d with %d VSIs left\n", > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14737 veb->seid, > n); > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14738 return; > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14739 } > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14740 > 93a1bc91a1ccc5a Ivan Vecera 2023-11-24 14741 /* For regular VEB > move the owner VSI to uplink VEB */ > 41c445ff0f482bb Jesse Brandeburg 2013-09-11 14742 if > (veb->uplink_seid) { > 93a1bc91a1ccc5a Ivan Vecera 2023-11-24 @14743 vsi->flags > &= ~I40E_VSI_FLAG_VEB_OWNER;