From: Ivan Vecera <ivecera@redhat.com>
To: Wojciech Drewek <wojciech.drewek@intel.com>, netdev@vger.kernel.org
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
linux-kernel@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Jakub Kicinski <kuba@kernel.org>,
Jacob Keller <jacob.e.keller@intel.com>,
intel-wired-lan@lists.osuosl.org, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next 2/3] i40e: Add other helpers to check version of running firmware and AQ API
Date: Tue, 24 Oct 2023 15:01:03 +0200 [thread overview]
Message-ID: <d71f2fa2-e5b7-4221-bbd0-86285b6c1c33@redhat.com> (raw)
In-Reply-To: <2aba9a2d-9dfd-49f2-bfec-1ff563a5f017@intel.com>
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<ivecera@redhat.com>
>> ---
>> 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
WARNING: multiple messages have this Message-ID (diff)
From: Ivan Vecera <ivecera@redhat.com>
To: Wojciech Drewek <wojciech.drewek@intel.com>, netdev@vger.kernel.org
Cc: intel-wired-lan@lists.osuosl.org,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
linux-kernel@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next 2/3] i40e: Add other helpers to check version of running firmware and AQ API
Date: Tue, 24 Oct 2023 15:01:03 +0200 [thread overview]
Message-ID: <d71f2fa2-e5b7-4221-bbd0-86285b6c1c33@redhat.com> (raw)
In-Reply-To: <2aba9a2d-9dfd-49f2-bfec-1ff563a5f017@intel.com>
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<ivecera@redhat.com>
>> ---
>> 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
next prev parent reply other threads:[~2023-10-24 13:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 16:29 [Intel-wired-lan] [PATCH iwl-next 0/3] i40e: Add and use version check helpers Ivan Vecera
2023-10-23 16:29 ` Ivan Vecera
2023-10-23 16:29 ` [Intel-wired-lan] [PATCH iwl-next 1/3] i40e: Move i40e_is_aq_api_ver_ge helper Ivan Vecera
2023-10-23 16:29 ` Ivan Vecera
2023-10-23 22:01 ` [Intel-wired-lan] " Jacob Keller
2023-10-23 16:29 ` [Intel-wired-lan] [PATCH iwl-next 2/3] i40e: Add other helpers to check version of running firmware and AQ API Ivan Vecera
2023-10-23 16:29 ` Ivan Vecera
2023-10-23 18:57 ` [Intel-wired-lan] " kernel test robot
2023-10-23 18:57 ` kernel test robot
2023-10-23 22:01 ` [Intel-wired-lan] " Jacob Keller
2023-10-23 22:01 ` Jacob Keller
2023-10-24 10:24 ` [Intel-wired-lan] " Wojciech Drewek
2023-10-24 10:24 ` Wojciech Drewek
2023-10-24 13:01 ` Ivan Vecera [this message]
2023-10-24 13:01 ` Ivan Vecera
2023-10-24 13:11 ` Wojciech Drewek
2023-10-24 13:11 ` Wojciech Drewek
2023-10-24 20:02 ` Jacob Keller
2023-10-23 16:29 ` [Intel-wired-lan] [PATCH iwl-next 3/3] i40e: Use helpers to check running FW and AQ API versions Ivan Vecera
2023-10-23 16:29 ` Ivan Vecera
2023-10-23 22:02 ` [Intel-wired-lan] " Jacob Keller
2023-10-23 22:02 ` Jacob Keller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d71f2fa2-e5b7-4221-bbd0-86285b6c1c33@redhat.com \
--to=ivecera@redhat.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wojciech.drewek@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.