Skip to content

Commit

Permalink
mvpp2: set rx offset using queue id
Browse files Browse the repository at this point in the history
If multiple ports are used on the same CP unit, the queue number for
these are separated by 32 i.e. queue 0 on port 0 is q0, but queue 0 on
port 1 is q32. Therefore the offset set code does not work for these
ports, as it tries to set q0-3 on each port instead of the correct queue
ids.
  • Loading branch information
Aryan Srivastava authored and carlgsmith committed Jan 7, 2025
1 parent 1434440 commit bdd5d1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions LINUX/mvpp2_netmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,11 @@ static void mvpp2_netmap_start(struct netmap_adapter *na)

/* Use netmap BM pools for this port */
for (i = 0; i < port->nrxqs; i++) {
mvpp2_rxq_drop_pkts(port, port->rxqs[i]);
struct mvpp2_rx_queue *rxq = port->rxqs[i];
mvpp2_rxq_drop_pkts(port, rxq);
mvpp2_rxq_short_pool_set(port, i, MVPP2_NETMAP_BMPOOL_FIRST + i);
mvpp2_rxq_long_pool_set(port, i, MVPP2_NETMAP_BMPOOL_FIRST + i);
mvpp2_rxq_offset_set(port, i, NETMAP_SLOT_HEADROOM);
mvpp2_rxq_offset_set(port, rxq->id, NETMAP_SLOT_HEADROOM);
}

/* Re-enable ingress if interface was running */
Expand Down

0 comments on commit bdd5d1d

Please sign in to comment.