* [PATCH net] ice: always add legacy 32byte RXDID in supported_rxdids
@ 2023-09-20 11:54 Michal Schmidt
2023-09-20 14:08 ` Przemek Kitszel
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michal Schmidt @ 2023-09-20 11:54 UTC (permalink / raw)
To: intel-wired-lan
Cc: Jacob Keller, Leyi Rong, Michal Jaron, Mateusz Palczewski,
Paolo Abeni, netdev
When the PF and VF drivers both support flexible rx descriptors and have
negotiated the VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC capability, the VF driver
queries the PF for the list of supported descriptor formats
(VIRTCHNL_OP_GET_SUPPORTED_RXDIDS). The PF driver is supposed to set the
supported_rxdids bits that correspond to the descriptor formats the
firmware implements. The legacy 32-byte rx desc format is always
supported, even though it is not expressed in GLFLXP_RXDID_FLAGS.
The ice driver does not advertise the legacy 32-byte rx desc support,
which leads to this failure to bring up the VF using the Intel
out-of-tree iavf driver:
iavf 0000:41:01.0: PF does not list support for default Rx descriptor format
...
iavf 0000:41:01.0: PF returned error -5 (VIRTCHNL_STATUS_ERR_PARAM) to our request 6
The in-tree iavf driver does not expose this bug, because it does not
yet implement VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC.
The ice driver must always set the ICE_RXDID_LEGACY_1 bit in
supported_rxdids. The Intel out-of-tree ice driver and the ice driver in
DPDK both do this.
I copied this piece of the code and the comment text from the Intel
out-of-tree driver.
Fixes: e753df8fbca5 ("ice: Add support Flex RXD")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/intel/ice/ice_virtchnl.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
index b03426ac932b..db97353efd06 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
@@ -2617,12 +2617,14 @@ static int ice_vc_query_rxdid(struct ice_vf *vf)
goto err;
}
- /* Read flexiflag registers to determine whether the
- * corresponding RXDID is configured and supported or not.
- * Since Legacy 16byte descriptor format is not supported,
- * start from Legacy 32byte descriptor.
+ /* RXDIDs supported by DDP package can be read from the register
+ * to get the supported RXDID bitmap. But the legacy 32byte RXDID
+ * is not listed in DDP package, add it in the bitmap manually.
+ * Legacy 16byte descriptor is not supported.
*/
- for (i = ICE_RXDID_LEGACY_1; i < ICE_FLEX_DESC_RXDID_MAX_NUM; i++) {
+ rxdid->supported_rxdids |= BIT(ICE_RXDID_LEGACY_1);
+
+ for (i = ICE_RXDID_FLEX_NIC; i < ICE_FLEX_DESC_RXDID_MAX_NUM; i++) {
regval = rd32(hw, GLFLXP_RXDID_FLAGS(i, 0));
if ((regval >> GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_S)
& GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_M)
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] ice: always add legacy 32byte RXDID in supported_rxdids
2023-09-20 11:54 [PATCH net] ice: always add legacy 32byte RXDID in supported_rxdids Michal Schmidt
@ 2023-09-20 14:08 ` Przemek Kitszel
2023-09-20 21:30 ` Jacob Keller
2023-09-28 12:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Przemek Kitszel @ 2023-09-20 14:08 UTC (permalink / raw)
To: Michal Schmidt, intel-wired-lan
Cc: Jacob Keller, Leyi Rong, Michal Jaron, Mateusz Palczewski,
Paolo Abeni, netdev
On 9/20/23 13:54, Michal Schmidt wrote:
> When the PF and VF drivers both support flexible rx descriptors and have
> negotiated the VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC capability, the VF driver
> queries the PF for the list of supported descriptor formats
> (VIRTCHNL_OP_GET_SUPPORTED_RXDIDS). The PF driver is supposed to set the
> supported_rxdids bits that correspond to the descriptor formats the
> firmware implements. The legacy 32-byte rx desc format is always
> supported, even though it is not expressed in GLFLXP_RXDID_FLAGS.
>
> The ice driver does not advertise the legacy 32-byte rx desc support,
> which leads to this failure to bring up the VF using the Intel
> out-of-tree iavf driver:
> iavf 0000:41:01.0: PF does not list support for default Rx descriptor format
> ...
> iavf 0000:41:01.0: PF returned error -5 (VIRTCHNL_STATUS_ERR_PARAM) to our request 6
>
> The in-tree iavf driver does not expose this bug, because it does not
> yet implement VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC.
>
> The ice driver must always set the ICE_RXDID_LEGACY_1 bit in
> supported_rxdids. The Intel out-of-tree ice driver and the ice driver in
> DPDK both do this.
>
> I copied this piece of the code and the comment text from the Intel
> out-of-tree driver.
>
> Fixes: e753df8fbca5 ("ice: Add support Flex RXD")
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
> ---
> drivers/net/ethernet/intel/ice/ice_virtchnl.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
We have tried to upstream that as part of some big series "recently",
with no luck so far, so thank for standalone submission!
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> index b03426ac932b..db97353efd06 100644
> --- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> @@ -2617,12 +2617,14 @@ static int ice_vc_query_rxdid(struct ice_vf *vf)
> goto err;
> }
>
> - /* Read flexiflag registers to determine whether the
> - * corresponding RXDID is configured and supported or not.
> - * Since Legacy 16byte descriptor format is not supported,
> - * start from Legacy 32byte descriptor.
> + /* RXDIDs supported by DDP package can be read from the register
> + * to get the supported RXDID bitmap. But the legacy 32byte RXDID
> + * is not listed in DDP package, add it in the bitmap manually.
> + * Legacy 16byte descriptor is not supported.
> */
> - for (i = ICE_RXDID_LEGACY_1; i < ICE_FLEX_DESC_RXDID_MAX_NUM; i++) {
> + rxdid->supported_rxdids |= BIT(ICE_RXDID_LEGACY_1);
> +
> + for (i = ICE_RXDID_FLEX_NIC; i < ICE_FLEX_DESC_RXDID_MAX_NUM; i++) {
> regval = rd32(hw, GLFLXP_RXDID_FLAGS(i, 0));
> if ((regval >> GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_S)
> & GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_M)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] ice: always add legacy 32byte RXDID in supported_rxdids
2023-09-20 11:54 [PATCH net] ice: always add legacy 32byte RXDID in supported_rxdids Michal Schmidt
2023-09-20 14:08 ` Przemek Kitszel
@ 2023-09-20 21:30 ` Jacob Keller
2023-09-28 12:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Jacob Keller @ 2023-09-20 21:30 UTC (permalink / raw)
To: Michal Schmidt, intel-wired-lan
Cc: Leyi Rong, Michal Jaron, Mateusz Palczewski, Paolo Abeni, netdev
On 9/20/2023 4:54 AM, Michal Schmidt wrote:
> When the PF and VF drivers both support flexible rx descriptors and have
> negotiated the VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC capability, the VF driver
> queries the PF for the list of supported descriptor formats
> (VIRTCHNL_OP_GET_SUPPORTED_RXDIDS). The PF driver is supposed to set the
> supported_rxdids bits that correspond to the descriptor formats the
> firmware implements. The legacy 32-byte rx desc format is always
> supported, even though it is not expressed in GLFLXP_RXDID_FLAGS.
>
> The ice driver does not advertise the legacy 32-byte rx desc support,
> which leads to this failure to bring up the VF using the Intel
> out-of-tree iavf driver:
> iavf 0000:41:01.0: PF does not list support for default Rx descriptor format
> ...
> iavf 0000:41:01.0: PF returned error -5 (VIRTCHNL_STATUS_ERR_PARAM) to our request 6
>
> The in-tree iavf driver does not expose this bug, because it does not
> yet implement VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC.
>
> The ice driver must always set the ICE_RXDID_LEGACY_1 bit in
> supported_rxdids. The Intel out-of-tree ice driver and the ice driver in
> DPDK both do this.
>
> I copied this piece of the code and the comment text from the Intel
> out-of-tree driver.
>
> Fixes: e753df8fbca5 ("ice: Add support Flex RXD")
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Yep, this happens because of the way the feature interacts with
VIRTHCNL_VF_OFFLOAD_RX_FLEX_DESC and how that wasn't enabled in upstream
yet. Not sure how this got missed with the mentioned fixed commit but
probably a gap because the upstream iAVF didn't implement changing
descriptor format.
Thanks for fixing this!
-Jake
> ---
> drivers/net/ethernet/intel/ice/ice_virtchnl.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> index b03426ac932b..db97353efd06 100644
> --- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> @@ -2617,12 +2617,14 @@ static int ice_vc_query_rxdid(struct ice_vf *vf)
> goto err;
> }
>
> - /* Read flexiflag registers to determine whether the
> - * corresponding RXDID is configured and supported or not.
> - * Since Legacy 16byte descriptor format is not supported,
> - * start from Legacy 32byte descriptor.
> + /* RXDIDs supported by DDP package can be read from the register
> + * to get the supported RXDID bitmap. But the legacy 32byte RXDID
> + * is not listed in DDP package, add it in the bitmap manually.
> + * Legacy 16byte descriptor is not supported.
> */
> - for (i = ICE_RXDID_LEGACY_1; i < ICE_FLEX_DESC_RXDID_MAX_NUM; i++) {
> + rxdid->supported_rxdids |= BIT(ICE_RXDID_LEGACY_1);
> +
> + for (i = ICE_RXDID_FLEX_NIC; i < ICE_FLEX_DESC_RXDID_MAX_NUM; i++) {
> regval = rd32(hw, GLFLXP_RXDID_FLAGS(i, 0));
> if ((regval >> GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_S)
> & GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_M)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] ice: always add legacy 32byte RXDID in supported_rxdids
2023-09-20 11:54 [PATCH net] ice: always add legacy 32byte RXDID in supported_rxdids Michal Schmidt
2023-09-20 14:08 ` Przemek Kitszel
2023-09-20 21:30 ` Jacob Keller
@ 2023-09-28 12:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-09-28 12:10 UTC (permalink / raw)
To: Michal Schmidt
Cc: intel-wired-lan, jacob.e.keller, leyi.rong, michalx.jaron,
mateusz.palczewski, pabeni, netdev
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Wed, 20 Sep 2023 13:54:38 +0200 you wrote:
> When the PF and VF drivers both support flexible rx descriptors and have
> negotiated the VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC capability, the VF driver
> queries the PF for the list of supported descriptor formats
> (VIRTCHNL_OP_GET_SUPPORTED_RXDIDS). The PF driver is supposed to set the
> supported_rxdids bits that correspond to the descriptor formats the
> firmware implements. The legacy 32-byte rx desc format is always
> supported, even though it is not expressed in GLFLXP_RXDID_FLAGS.
>
> [...]
Here is the summary with links:
- [net] ice: always add legacy 32byte RXDID in supported_rxdids
https://git.kernel.org/netdev/net/c/c070e51db5e2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-28 12:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 11:54 [PATCH net] ice: always add legacy 32byte RXDID in supported_rxdids Michal Schmidt
2023-09-20 14:08 ` Przemek Kitszel
2023-09-20 21:30 ` Jacob Keller
2023-09-28 12:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).