* [PATCH iwl-net v1] ice: Rebuild TC queues on VSI queue reconfiguration
@ 2024-05-29 7:17 Karen Ostrowska
2024-05-30 5:01 ` [Intel-wired-lan] " Paul Menzel
2024-06-19 8:25 ` Pucha, HimasekharX Reddy
0 siblings, 2 replies; 3+ messages in thread
From: Karen Ostrowska @ 2024-05-29 7:17 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev, Jan Sokolowski, Wojciech Drewek, Karen Ostrowska
From: Jan Sokolowski <jan.sokolowski@intel.com>
TC queues needs to be correctly updated when the number of queues on
a VSI is reconfigured, so netdev's queue and TC settings will be
dynamically adjusted and could accurately represent the underlying
hardware state after changes to the VSI queue counts.
Fixes: 0754d65bd4be ("ice: Add infrastructure for mqprio support via ndo_setup_tc")
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Signed-off-by: Karen Ostrowska <karen.ostrowska@intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 1b61ca3a6eb6..a1798ec4d904 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4136,7 +4136,7 @@ bool ice_is_wol_supported(struct ice_hw *hw)
int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
{
struct ice_pf *pf = vsi->back;
- int err = 0, timeout = 50;
+ int i, err = 0, timeout = 50;
if (!new_rx && !new_tx)
return -EINVAL;
@@ -4162,6 +4162,14 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
ice_vsi_close(vsi);
ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
+
+ ice_for_each_traffic_class(i) {
+ if (vsi->tc_cfg.ena_tc & BIT(i))
+ netdev_set_tc_queue(vsi->netdev,
+ vsi->tc_cfg.tc_info[i].netdev_tc,
+ vsi->tc_cfg.tc_info[i].qcount_tx,
+ vsi->tc_cfg.tc_info[i].qoffset);
+ }
ice_pf_dcb_recfg(pf, locked);
ice_vsi_open(vsi);
done:
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Intel-wired-lan] [PATCH iwl-net v1] ice: Rebuild TC queues on VSI queue reconfiguration
2024-05-29 7:17 [PATCH iwl-net v1] ice: Rebuild TC queues on VSI queue reconfiguration Karen Ostrowska
@ 2024-05-30 5:01 ` Paul Menzel
2024-06-19 8:25 ` Pucha, HimasekharX Reddy
1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2024-05-30 5:01 UTC (permalink / raw)
To: Karen Ostrowska; +Cc: intel-wired-lan, netdev, Jan Sokolowski, Wojciech Drewek
Dear Karen, dear Jan,
Thank you for the patch.
Am 29.05.24 um 09:17 schrieb Karen Ostrowska:
> From: Jan Sokolowski <jan.sokolowski@intel.com>
>
> TC queues needs to be correctly updated when the number of queues on
need
> a VSI is reconfigured, so netdev's queue and TC settings will be
> dynamically adjusted and could accurately represent the underlying
> hardware state after changes to the VSI queue counts.
Please document the test configuration, and how to test/verify your change.
> Fixes: 0754d65bd4be ("ice: Add infrastructure for mqprio support via ndo_setup_tc")
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
> Signed-off-by: Karen Ostrowska <karen.ostrowska@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 1b61ca3a6eb6..a1798ec4d904 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -4136,7 +4136,7 @@ bool ice_is_wol_supported(struct ice_hw *hw)
> int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
> {
> struct ice_pf *pf = vsi->back;
> - int err = 0, timeout = 50;
> + int i, err = 0, timeout = 50;
unsigned int
> if (!new_rx && !new_tx)
> return -EINVAL;
> @@ -4162,6 +4162,14 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
>
> ice_vsi_close(vsi);
> ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
> +
> + ice_for_each_traffic_class(i) {
> + if (vsi->tc_cfg.ena_tc & BIT(i))
> + netdev_set_tc_queue(vsi->netdev,
> + vsi->tc_cfg.tc_info[i].netdev_tc,
> + vsi->tc_cfg.tc_info[i].qcount_tx,
> + vsi->tc_cfg.tc_info[i].qoffset);
> + }
> ice_pf_dcb_recfg(pf, locked);
> ice_vsi_open(vsi);
> done:
Kind regards,
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: [Intel-wired-lan] [PATCH iwl-net v1] ice: Rebuild TC queues on VSI queue reconfiguration
2024-05-29 7:17 [PATCH iwl-net v1] ice: Rebuild TC queues on VSI queue reconfiguration Karen Ostrowska
2024-05-30 5:01 ` [Intel-wired-lan] " Paul Menzel
@ 2024-06-19 8:25 ` Pucha, HimasekharX Reddy
1 sibling, 0 replies; 3+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-06-19 8:25 UTC (permalink / raw)
To: Ostrowska, Karen, intel-wired-lan@lists.osuosl.org
Cc: Ostrowska, Karen, netdev@vger.kernel.org, Sokolowski, Jan,
Drewek, Wojciech
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Karen Ostrowska
> Sent: Wednesday, May 29, 2024 12:48 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: Ostrowska, Karen <karen.ostrowska@intel.com>; netdev@vger.kernel.org; Sokolowski, Jan <jan.sokolowski@intel.com>; Drewek, Wojciech <wojciech.drewek@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v1] ice: Rebuild TC queues on VSI queue reconfiguration
>
> From: Jan Sokolowski <jan.sokolowski@intel.com>
>
> TC queues needs to be correctly updated when the number of queues on a VSI is reconfigured, so netdev's queue and TC settings will be dynamically adjusted and could accurately represent the underlying hardware state after changes to the VSI queue counts.
>
> Fixes: 0754d65bd4be ("ice: Add infrastructure for mqprio support via ndo_setup_tc")
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
> Signed-off-by: Karen Ostrowska <karen.ostrowska@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-19 8:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29 7:17 [PATCH iwl-net v1] ice: Rebuild TC queues on VSI queue reconfiguration Karen Ostrowska
2024-05-30 5:01 ` [Intel-wired-lan] " Paul Menzel
2024-06-19 8:25 ` 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).