2024-03-02 00:02:22

by Yifei Liu

[permalink] [raw]
Subject: [PATCH Linux-6.8-rc5 1/1] ixgbevf: start negotiate with api version 1.4

ixgbevf updates to api version to 1.5 via
commit 339f28964147d ("ixgbevf: Add support for new mailbox
communication between PF and VF")
while the pf side is not updated to 1.5 properly. It will lead to a
failure of negotiation of api version 1.5 This commit will enforce
the negotiation to start with 1.4 which is working fine.

Normally the pf and vf side should be updated together. Example:
commit adef9a26d6c39 ("ixgbevf: add defines for IPsec offload request")
commit 7269824046376 ("ixgbe: add VF IPsec offload request message handling")


Reported-by: Manjunatha Gowda <[email protected]>
Signed-off-by: Yifei Liu <[email protected]>
Reviewed-by: Jack Vogel <[email protected]>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index a44e4bd56142..a1b9b789d1d4 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -2286,6 +2286,12 @@ static void ixgbevf_negotiate_api(struct ixgbevf_adapter *adapter)

spin_lock_bh(&adapter->mbx_lock);

+ /* There is no corresponding drivers in pf for
+ * api version 1.5. Try to negociate with version
+ * 1.5 will always fail. Start to negociate with
+ * version 1.4.
+ */
+ idx = 1;
while (api[idx] != ixgbe_mbox_api_unknown) {
err = hw->mac.ops.negotiate_api_version(hw, api[idx]);
if (!err)
--
2.42.0



2024-03-02 08:20:29

by Paul Menzel

[permalink] [raw]
Subject: Re: [Intel-wired-lan] [PATCH Linux-6.8-rc5 1/1] ixgbevf: start negotiate with api version 1.4

Dear Yifei,


Thank you very much for your patch.

Am 02.03.24 um 00:58 schrieb Yifei Liu:
> ixgbevf updates to api version to 1.5 via
> commit 339f28964147d ("ixgbevf: Add support for new mailbox
> communication between PF and VF")
> while the pf side is not updated to 1.5 properly. It will lead to a
> failure of negotiation of api version 1.5 This commit will enforce
> the negotiation to start with 1.4 which is working fine.
>
> Normally the pf and vf side should be updated together. Example:
> commit adef9a26d6c39 ("ixgbevf: add defines for IPsec offload request")
> commit 7269824046376 ("ixgbe: add VF IPsec offload request message handling")

Why can’t the PF side not be updated to version 1.5 too?

If you don’t mind, I’d format the commit message like below.

Commit 339f28964147d ("ixgbevf: Add support for new mailbox communication
between PF and VF") updates the driver ixgbevf to API version 1.5 while the
pf side is not updated to 1.5 properly. This leads to a negotiation failure
of api version 1.5. So, enforce the negotiation to start with 1.4 which is
working fine.

Normally the pf and vf side should be updated together. Example:

1. commit adef9a26d6c39 ("ixgbevf: add defines for IPsec offload request")
2. commit 7269824046376 ("ixgbe: add VF IPsec offload request message
handling")

> Reported-by: Manjunatha Gowda <[email protected]>
> Signed-off-by: Yifei Liu <[email protected]>
> Reviewed-by: Jack Vogel <[email protected]>

Please add a Fixes: tag.

Fixes: 39f28964147d ("ixgbevf: Add support for new mailbox communication
between PF and VF")

Unfortunately, I am unable to find this commit hash. What archive/tree
is it from?

> ---
> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> index a44e4bd56142..a1b9b789d1d4 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> @@ -2286,6 +2286,12 @@ static void ixgbevf_negotiate_api(struct ixgbevf_adapter *adapter)
>
> spin_lock_bh(&adapter->mbx_lock);
>
> + /* There is no corresponding drivers in pf for
> + * api version 1.5. Try to negociate with version

negotiate

> + * 1.5 will always fail. Start to negociate with
> + * version 1.4.

Could you please use the fully allowed line length, so less lines are used?

> + */
> + idx = 1; > while (api[idx] != ixgbe_mbox_api_unknown) {
> err = hw->mac.ops.negotiate_api_version(hw, api[idx]);
> if (!err)

Where is `idx` set before?

Unrelated to the problem at hand, but enums or macros should be used for
the API version.


Kind regards,

Paul