Message ID | 7170a8f4429ecb5a539b0374c621697778ff8363.1712062203.git.petrm@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a0639236d42060c8f0e994ddf87fbb0f3cb2b048 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mlxsw: Preparations for improving performance | expand |
On Tue, Apr 02, 2024 at 03:54:24PM +0200, Petr Machata wrote: > From: Amit Cohen <amcohen@nvidia.com> > > This function will be broken into several functions later. As preparation, > reorder variables to reverse xmas tree. > > Signed-off-by: Amit Cohen <amcohen@nvidia.com> > Reviewed-by: Ido Schimmel <idosch@nvidia.com> > Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org>
diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c index 7f059306af5a..7c4b6e66f1fb 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/pci.c +++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c @@ -662,9 +662,9 @@ static void mlxsw_pci_cq_tasklet(struct tasklet_struct *t) { struct mlxsw_pci_queue *q = from_tasklet(q, t, tasklet); struct mlxsw_pci *mlxsw_pci = q->pci; + int credits = q->count >> 1; + int items = 0; char *cqe; - int items = 0; - int credits = q->count >> 1; while ((cqe = mlxsw_pci_cq_sw_cqe_get(q))) { u16 wqe_counter = mlxsw_pci_cqe_wqe_counter_get(cqe);