Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp973356rdf; Wed, 22 Nov 2023 01:59:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTJdeioxquc9Y4kMf4EmhtE35dtGlr1zR5LxbVYho5rOfjiq9d3tiR6RGSjYOy/DW7A44C X-Received: by 2002:a17:902:d48d:b0:1ca:e4b:148d with SMTP id c13-20020a170902d48d00b001ca0e4b148dmr1620065plg.65.1700647158909; Wed, 22 Nov 2023 01:59:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700647158; cv=none; d=google.com; s=arc-20160816; b=AwCJ2FL9LwHVoPpD85rtjD2cSoaXpolhJNOdswu7DhklSJ2NfgBoqGmbie/uKfHGyV HBW0HaimrLdKloBROtpsPPWd5ps2+pjoZae4cZ+jg01clAVjv3FuGGhfsynKfX9KF/FF XOrexcSqxTjSdVyfQJM1Hlz2WuspkXg/tvLeLwnFWbuWMiTtVwoRFpZjqKYNAemAMzzb GQDlIYuAtoO1UqVsP/xRt0TNZIJi7vdSeJ6TsZjFe3FevjZV6OrfnT6aKGrVtqLnH9eK VLfCdlHA5DmFqyEXZluSoH2t41GabHW8yr/0Bzed4mRk9DideUQlaNhgTzq+bf3cxi5F 9VkQ== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ZCjzWXii4u28sN5GkNkdatJx6cXmhKIdL34C9BKN+9E=; fh=4P5AU8XIzATX+323hIlNsp0NFrsW9S6llgTHZ3znt7U=; b=jv7g9s95vuMNMQSdjNjKrJR75eYuRtB8OcPT0YYzPg9j/0z/ts/4lIQ/1DYJEqcz4T M/szUpSzoPS69CsJYg1oiqGwNEg+lZH0Er6K1NZoJu4s9CLs6VE+GI7u4wfY0XlI8e1y yRaEorlXDxhl+z2vw7U/w2zKyUvvUH8xxcSuTZ4SCgfIBFB7+eZiuz1Lyclx+4S0RFk+ 4Be+gCEFQ/dHoVivqsr4aQOEfxseVJICsuseKe1+WueL/iCY5T/P7UHlLzJGWMbPKc4v S6q0gQ3FZ6XIAKZbDJEXuxDeB7FKiW5+K4/y0rYRMcobQ7zbhBzjWr78GPWqUeSktDjf KTRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=irmIYQvZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id o10-20020a1709026b0a00b001bf0b29d935si11648379plk.34.2023.11.22.01.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 01:59:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=irmIYQvZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 2D8368116B05; Wed, 22 Nov 2023 01:59:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229631AbjKVJ7H (ORCPT + 99 others); Wed, 22 Nov 2023 04:59:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235182AbjKVJ7G (ORCPT ); Wed, 22 Nov 2023 04:59:06 -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 D934649E6 for ; Wed, 22 Nov 2023 01:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700647142; 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=ZCjzWXii4u28sN5GkNkdatJx6cXmhKIdL34C9BKN+9E=; b=irmIYQvZJoEP3caUUf7WJXk4Hj8oEQhydDHvTJ33uZcM6V9MOBFvMc9k/LYi+1DDod4JOA Mtng72DI7t78J3HpSFWEf44vWCucbz5EGsfb4bBpCYxJ4UoqefnypXscGxU+sBtfGv2bg5 +qXWeTeDcUcMp8bhgMy5SwwAqwl1xBU= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-294-QhcexgQrPJyp37D1Ovkadw-1; Wed, 22 Nov 2023 04:58:56 -0500 X-MC-Unique: QhcexgQrPJyp37D1Ovkadw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 322863810B1A; Wed, 22 Nov 2023 09:58:56 +0000 (UTC) Received: from [10.45.226.4] (unknown [10.45.226.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 11EE82026D4C; Wed, 22 Nov 2023 09:58:53 +0000 (UTC) Message-ID: <48330ace-2b5f-4919-b5cb-7ac4372120bf@redhat.com> Date: Wed, 22 Nov 2023 10:58:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH iwl-next v3 3/5] i40e: Add helpers to find VSI and VEB by SEID and use them To: Tony Nguyen , intel-wired-lan@lists.osuosl.org Cc: Jesse Brandeburg , "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: <20231116152114.88515-1-ivecera@redhat.com> <20231116152114.88515-4-ivecera@redhat.com> Content-Language: en-US From: Ivan Vecera In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 01:59:16 -0800 (PST) On 22. 11. 23 0:05, Tony Nguyen wrote: > > > On 11/16/2023 7:21 AM, Ivan Vecera wrote: > >> @@ -13197,17 +13193,14 @@ static int i40e_ndo_bridge_getlink(struct >> sk_buff *skb, u32 pid, u32 seq, >>       struct i40e_vsi *vsi = np->vsi; >>       struct i40e_pf *pf = vsi->back; >>       struct i40e_veb *veb = NULL; >> -    int i; >>       /* Only for PF VSI for now */ >>       if (vsi->seid != pf->vsi[pf->lan_vsi]->seid) >>           return -EOPNOTSUPP; >>       /* Find the HW bridge for the PF VSI */ >> -    i40e_pf_for_each_veb(pf, i, veb) >> -        if (veb->seid == vsi->uplink_seid) >> -            break; >> -    if (i == I40E_MAX_VEB) >> +    veb = i40e_pf_get_veb_by_seid(pf, vsi->uplink_seid); >> +    if (!vsi) >>           return 0; > > In addition to the kdoc stuff that Simon pointed out. Should this null > check be against veb? > Oops, the check should be against veb here not aganst vsi... Good eyes, Tony. Thanks, I will fix this. Ivan