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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 75AD5C07545 for ; Tue, 24 Oct 2023 13:01:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3330683F2C; Tue, 24 Oct 2023 13:01:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3330683F2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1698152475; bh=Uag6bqF7l/KA1vOoZ+JThx8KA58VTEkQq2z1nT8hkpk=; h=Date:To:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=J3uir1i2lAgLEYuhK7/egF/lEhOmi44aaQQBUV6Nzr5cb2LKywAl/Dgp1d+k4dbDw ljeT03q6duzs778pmMs97K/80X0JCPZBqLZjaYYctcuD7Za64O+Nk1rwbeXGeEU9Ak v3YN5fp1b9nmEL1bNJGE7FOSVeoUO3+D1jjld0TpaTyxnroEEdlTSdsZv/7ko7rUP2 g31rGMUwvj37gHJBAW903FBAgh+XK0PHzgyyVcDpMSvyOCEdtCcaJ2F9AaUY4hhif+ 1QyakQbt+Z/gqbU2ZjsassO3plY5YHqO3JzMIKE69FFFs0PlEdgNynf8x4CVBhI4zr 3YHFvCjGZs7LA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YxGK7Dc5D2Qv; Tue, 24 Oct 2023 13:01:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 29A1783F33; Tue, 24 Oct 2023 13:01:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 29A1783F33 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 831741BF38E for ; Tue, 24 Oct 2023 13:01:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 68E5B6FC0D for ; Tue, 24 Oct 2023 13:01:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 68E5B6FC0D 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 zyY7aR3Z-iOh for ; Tue, 24 Oct 2023 13:01:12 +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 9D6F26FC0C for ; Tue, 24 Oct 2023 13:01:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9D6F26FC0C 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-257-_Yx9v7gsPGSlGCwy8j95PA-1; Tue, 24 Oct 2023 09:01:07 -0400 X-MC-Unique: _Yx9v7gsPGSlGCwy8j95PA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 A8EBE857BC5; Tue, 24 Oct 2023 13:01:05 +0000 (UTC) Received: from [10.43.2.183] (unknown [10.43.2.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id E865A492BD9; Tue, 24 Oct 2023 13:01:03 +0000 (UTC) Message-ID: Date: Tue, 24 Oct 2023 15:01:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Wojciech Drewek , netdev@vger.kernel.org References: <20231023162928.245583-1-ivecera@redhat.com> <20231023162928.245583-3-ivecera@redhat.com> <2aba9a2d-9dfd-49f2-bfec-1ff563a5f017@intel.com> From: Ivan Vecera In-Reply-To: <2aba9a2d-9dfd-49f2-bfec-1ff563a5f017@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698152471; 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=TdTXynsl0mVy35KpmI9bLMXkB0nwWaN15oyfZ6foo9E=; b=Yjn5ZFGmYJrfUDfd2I5W8ZoGykHe5SIFcJ9mHa3GMzx9uGuOIPBiiXGACWJ+/G2dHGlkNq aXhSAmUmeR7u2QV8Uigr6PXD8YcrQi53xXBjLvOAKKdCRppLPBm9Lr6NNhwoT3cagSd2u2 4FO+Cq49OU4jIyj/sgwXkgmYnRSRpZY= 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=Yjn5ZFGm Subject: Re: [Intel-wired-lan] [PATCH iwl-next 2/3] i40e: Add other helpers to check version of running firmware and AQ API 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: Jesse Brandeburg , linux-kernel@vger.kernel.org, Eric Dumazet , Tony Nguyen , Jakub Kicinski , Jacob Keller , intel-wired-lan@lists.osuosl.org, Paolo Abeni , "David S. Miller" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 24. 10. 23 12:24, Wojciech Drewek wrote: > On 23.10.2023 18:29, Ivan Vecera wrote: >> Add another helper functions that will be used by subsequent >> patch to refactor existing open-coded checks whether the version >> of running firmware and AdminQ API is recent enough to provide >> certain capabilities. >> >> Signed-off-by: Ivan Vecera >> --- >> drivers/net/ethernet/intel/i40e/i40e_type.h | 54 +++++++++++++++++++++ >> 1 file changed, 54 insertions(+) >> >> diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h >> index 050d479aeed3..bb62c14aa3d4 100644 >> --- a/drivers/net/ethernet/intel/i40e/i40e_type.h >> +++ b/drivers/net/ethernet/intel/i40e/i40e_type.h >> @@ -608,6 +608,60 @@ static inline bool i40e_is_aq_api_ver_ge(struct i40e_hw *hw, u16 maj, u16 min) >> (hw->aq.api_maj_ver == maj && hw->aq.api_min_ver >= min)); >> } >> >> +/** >> + * i40e_is_aq_api_ver_lt >> + * @hw: pointer to i40e_hw structure >> + * @maj: API major value to compare >> + * @min: API minor value to compare >> + * >> + * Assert whether current HW API version is less than provided. >> + **/ >> +static inline bool i40e_is_aq_api_ver_lt(struct i40e_hw *hw, u16 maj, u16 min) >> +{ >> + return !i40e_is_aq_api_ver_ge(hw, maj, min); >> +} > It feels a bit off to have those helpers in i40e_type.h. > We don't have i40e_common.h though so I'd move them to i40e_prototype.h or i40e.h. > Same comment regarding 1st patch (I know I gave it my tag but I spotted the issue > while reading the 2nd patch). I'm sorry I already submitted v2 and helpers are present i40e_type.h. I would submit v3 but there is also i40e_is_vf() inline function already present in i40e_type. Would you be OK with a follow-up that would move all these inlines into i40e_prototype.h? Btw i40e.h is not a good idea as this would bring a dependency on i40e.h into i40e_adminq.c, i40e_common.c and i40e_dcb.c. Regards, Ivan _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan