* [PATCH iwl-net] ice: Add check for lport extraction to LAG init
@ 2024-01-19 21:15 Dave Ertman
2024-01-22 12:36 ` [Intel-wired-lan] " Marcin Szycik
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Dave Ertman @ 2024-01-19 21:15 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev, Przemek Kitszel
To fully support initializing the LAG support code, a DDP package that
extracts the logical port from the metadata is required. If such a
package is not present, there could be difficulties in supporting some
bond types.
Add a check into the initialization flow that will bypass the new paths
if any of the support pieces are missing.
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Fixes: df006dd4b1dc ("ice: Add initial support framework for LAG")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
---
drivers/net/ethernet/intel/ice/ice_lag.c | 25 ++++++++++++++++++++++--
drivers/net/ethernet/intel/ice/ice_lag.h | 3 +++
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c
index 2a25323105e5..467372d541d2 100644
--- a/drivers/net/ethernet/intel/ice/ice_lag.c
+++ b/drivers/net/ethernet/intel/ice/ice_lag.c
@@ -151,6 +151,27 @@ ice_lag_find_hw_by_lport(struct ice_lag *lag, u8 lport)
return NULL;
}
+/**
+ * ice_pkg_has_lport_extract - check if lport extraction supported
+ * @hw: HW struct
+ */
+static bool ice_pkg_has_lport_extract(struct ice_hw *hw)
+{
+ int i;
+
+ for (i = 0; i < hw->blk[ICE_BLK_SW].es.count; i++) {
+ u16 offset;
+ u8 fv_prot;
+
+ ice_find_prot_off(hw, ICE_BLK_SW, ICE_SW_DEFAULT_PROFILE, i,
+ &fv_prot, &offset);
+ if (fv_prot == ICE_FV_PROT_MDID &&
+ offset == ICE_LP_EXT_BUF_OFFSET)
+ return true;
+ }
+ return false;
+}
+
/**
* ice_lag_find_primary - returns pointer to primary interfaces lag struct
* @lag: local interfaces lag struct
@@ -1206,7 +1227,7 @@ static void ice_lag_del_prune_list(struct ice_lag *lag, struct ice_pf *event_pf)
}
/**
- * ice_lag_init_feature_support_flag - Check for NVM support for LAG
+ * ice_lag_init_feature_support_flag - Check for package and NVM support for LAG
* @pf: PF struct
*/
static void ice_lag_init_feature_support_flag(struct ice_pf *pf)
@@ -1219,7 +1240,7 @@ static void ice_lag_init_feature_support_flag(struct ice_pf *pf)
else
ice_clear_feature_support(pf, ICE_F_ROCE_LAG);
- if (caps->sriov_lag)
+ if (caps->sriov_lag && ice_pkg_has_lport_extract(&pf->hw))
ice_set_feature_support(pf, ICE_F_SRIOV_LAG);
else
ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);
diff --git a/drivers/net/ethernet/intel/ice/ice_lag.h b/drivers/net/ethernet/intel/ice/ice_lag.h
index ede833dfa658..183b38792ef2 100644
--- a/drivers/net/ethernet/intel/ice/ice_lag.h
+++ b/drivers/net/ethernet/intel/ice/ice_lag.h
@@ -17,6 +17,9 @@ enum ice_lag_role {
#define ICE_LAG_INVALID_PORT 0xFF
#define ICE_LAG_RESET_RETRIES 5
+#define ICE_SW_DEFAULT_PROFILE 0
+#define ICE_FV_PROT_MDID 255
+#define ICE_LP_EXT_BUF_OFFSET 32
struct ice_pf;
struct ice_vf;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net] ice: Add check for lport extraction to LAG init
2024-01-19 21:15 [PATCH iwl-net] ice: Add check for lport extraction to LAG init Dave Ertman
@ 2024-01-22 12:36 ` Marcin Szycik
2024-01-22 19:49 ` Simon Horman
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Marcin Szycik @ 2024-01-22 12:36 UTC (permalink / raw)
To: Dave Ertman, intel-wired-lan; +Cc: netdev, Przemek Kitszel
On 19.01.2024 22:15, Dave Ertman wrote:
> To fully support initializing the LAG support code, a DDP package that
> extracts the logical port from the metadata is required. If such a
> package is not present, there could be difficulties in supporting some
> bond types.
>
> Add a check into the initialization flow that will bypass the new paths
> if any of the support pieces are missing.
>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> Fixes: df006dd4b1dc ("ice: Add initial support framework for LAG")
> Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_lag.c | 25 ++++++++++++++++++++++--
> drivers/net/ethernet/intel/ice/ice_lag.h | 3 +++
> 2 files changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c
> index 2a25323105e5..467372d541d2 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lag.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lag.c
> @@ -151,6 +151,27 @@ ice_lag_find_hw_by_lport(struct ice_lag *lag, u8 lport)
> return NULL;
> }
>
> +/**
> + * ice_pkg_has_lport_extract - check if lport extraction supported
> + * @hw: HW struct
> + */
> +static bool ice_pkg_has_lport_extract(struct ice_hw *hw)
> +{
> + int i;
> +
> + for (i = 0; i < hw->blk[ICE_BLK_SW].es.count; i++) {
> + u16 offset;
> + u8 fv_prot;
> +
> + ice_find_prot_off(hw, ICE_BLK_SW, ICE_SW_DEFAULT_PROFILE, i,
> + &fv_prot, &offset);
> + if (fv_prot == ICE_FV_PROT_MDID &&
> + offset == ICE_LP_EXT_BUF_OFFSET)
> + return true;
> + }
> + return false;
> +}
> +
> /**
> * ice_lag_find_primary - returns pointer to primary interfaces lag struct
> * @lag: local interfaces lag struct
> @@ -1206,7 +1227,7 @@ static void ice_lag_del_prune_list(struct ice_lag *lag, struct ice_pf *event_pf)
> }
>
> /**
> - * ice_lag_init_feature_support_flag - Check for NVM support for LAG
> + * ice_lag_init_feature_support_flag - Check for package and NVM support for LAG
> * @pf: PF struct
> */
> static void ice_lag_init_feature_support_flag(struct ice_pf *pf)
> @@ -1219,7 +1240,7 @@ static void ice_lag_init_feature_support_flag(struct ice_pf *pf)
> else
> ice_clear_feature_support(pf, ICE_F_ROCE_LAG);
>
> - if (caps->sriov_lag)
> + if (caps->sriov_lag && ice_pkg_has_lport_extract(&pf->hw))
> ice_set_feature_support(pf, ICE_F_SRIOV_LAG);
> else
> ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);
> diff --git a/drivers/net/ethernet/intel/ice/ice_lag.h b/drivers/net/ethernet/intel/ice/ice_lag.h
> index ede833dfa658..183b38792ef2 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lag.h
> +++ b/drivers/net/ethernet/intel/ice/ice_lag.h
> @@ -17,6 +17,9 @@ enum ice_lag_role {
> #define ICE_LAG_INVALID_PORT 0xFF
>
> #define ICE_LAG_RESET_RETRIES 5
> +#define ICE_SW_DEFAULT_PROFILE 0
> +#define ICE_FV_PROT_MDID 255
> +#define ICE_LP_EXT_BUF_OFFSET 32
>
> struct ice_pf;
> struct ice_vf;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH iwl-net] ice: Add check for lport extraction to LAG init
2024-01-19 21:15 [PATCH iwl-net] ice: Add check for lport extraction to LAG init Dave Ertman
2024-01-22 12:36 ` [Intel-wired-lan] " Marcin Szycik
@ 2024-01-22 19:49 ` Simon Horman
2024-01-30 14:31 ` [Intel-wired-lan] " Buvaneswaran, Sujai
2024-02-09 11:08 ` Pucha, HimasekharX Reddy
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2024-01-22 19:49 UTC (permalink / raw)
To: Dave Ertman; +Cc: intel-wired-lan, netdev, Przemek Kitszel
On Fri, Jan 19, 2024 at 01:15:17PM -0800, Dave Ertman wrote:
> To fully support initializing the LAG support code, a DDP package that
> extracts the logical port from the metadata is required. If such a
> package is not present, there could be difficulties in supporting some
> bond types.
>
> Add a check into the initialization flow that will bypass the new paths
> if any of the support pieces are missing.
>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: df006dd4b1dc ("ice: Add initial support framework for LAG")
> Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-net] ice: Add check for lport extraction to LAG init
2024-01-19 21:15 [PATCH iwl-net] ice: Add check for lport extraction to LAG init Dave Ertman
2024-01-22 12:36 ` [Intel-wired-lan] " Marcin Szycik
2024-01-22 19:49 ` Simon Horman
@ 2024-01-30 14:31 ` Buvaneswaran, Sujai
2024-02-09 11:08 ` Pucha, HimasekharX Reddy
3 siblings, 0 replies; 5+ messages in thread
From: Buvaneswaran, Sujai @ 2024-01-30 14:31 UTC (permalink / raw)
To: Ertman, David M, intel-wired-lan; +Cc: netdev, Kitszel, Przemyslaw
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Dave Ertman
> Sent: Saturday, January 20, 2024 2:45 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net] ice: Add check for lport extraction
> to LAG init
>
> To fully support initializing the LAG support code, a DDP package that
> extracts the logical port from the metadata is required. If such a package is
> not present, there could be difficulties in supporting some bond types.
>
> Add a check into the initialization flow that will bypass the new paths if any
> of the support pieces are missing.
>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: df006dd4b1dc ("ice: Add initial support framework for LAG")
> Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_lag.c | 25 ++++++++++++++++++++++--
> drivers/net/ethernet/intel/ice/ice_lag.h | 3 +++
> 2 files changed, 26 insertions(+), 2 deletions(-)
>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-net] ice: Add check for lport extraction to LAG init
2024-01-19 21:15 [PATCH iwl-net] ice: Add check for lport extraction to LAG init Dave Ertman
` (2 preceding siblings ...)
2024-01-30 14:31 ` [Intel-wired-lan] " Buvaneswaran, Sujai
@ 2024-02-09 11:08 ` Pucha, HimasekharX Reddy
3 siblings, 0 replies; 5+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-02-09 11:08 UTC (permalink / raw)
To: Ertman, David M, intel-wired-lan; +Cc: netdev, Kitszel, Przemyslaw
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Dave Ertman
> Sent: Saturday, January 20, 2024 2:45 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net] ice: Add check for lport extraction to LAG init
>
> To fully support initializing the LAG support code, a DDP package that
> extracts the logical port from the metadata is required. If such a
> package is not present, there could be difficulties in supporting some
> bond types.
>
> Add a check into the initialization flow that will bypass the new paths
> if any of the support pieces are missing.
>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: df006dd4b1dc ("ice: Add initial support framework for LAG")
> Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_lag.c | 25 ++++++++++++++++++++++--
> drivers/net/ethernet/intel/ice/ice_lag.h | 3 +++
> 2 files changed, 26 insertions(+), 2 deletions(-)
>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-09 11:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-19 21:15 [PATCH iwl-net] ice: Add check for lport extraction to LAG init Dave Ertman
2024-01-22 12:36 ` [Intel-wired-lan] " Marcin Szycik
2024-01-22 19:49 ` Simon Horman
2024-01-30 14:31 ` [Intel-wired-lan] " Buvaneswaran, Sujai
2024-02-09 11:08 ` Pucha, HimasekharX Reddy
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).