ionic: use index not pointer for queue tracking
Use index counters rather than pointers for tracking head and tail in the queues to save a little memory and to perhaps slightly faster queue processing. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ea5a8b09dc
commit
f1d2e894f1
@@ -76,7 +76,7 @@ static int q_tail_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
struct ionic_queue *q = seq->private;
|
||||
|
||||
seq_printf(seq, "%d\n", q->tail->index);
|
||||
seq_printf(seq, "%d\n", q->tail_idx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ static int q_head_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
struct ionic_queue *q = seq->private;
|
||||
|
||||
seq_printf(seq, "%d\n", q->head->index);
|
||||
seq_printf(seq, "%d\n", q->head_idx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ static int cq_tail_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
struct ionic_cq *cq = seq->private;
|
||||
|
||||
seq_printf(seq, "%d\n", cq->tail->index);
|
||||
seq_printf(seq, "%d\n", cq->tail_idx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user