Skip to content

Commit

Permalink
net/ark: fix queue packet replacement
Browse files Browse the repository at this point in the history
[ upstream commit 7311db7 ]

Queue index was incorrectly incremented with port, which
caused incorrect queue packet placement. This manifested
when port number was != 0.

Fixes: c33d45a ("net/ark: add Tx initial version")

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
  • Loading branch information
czeck authored and kevintraynor committed Aug 28, 2019
1 parent 60c7ddb commit ce7bf1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ark/ark_ethdev_rx.c
Expand Up @@ -127,9 +127,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
uint32_t i;
int status;

/* Future works: divide the Q's evenly with multi-ports */
int port = dev->data->port_id;
int qidx = port + queue_idx;
int qidx = queue_idx;

/* We may already be setup, free memory prior to re-allocation */
if (dev->data->rx_queues[queue_idx] != NULL) {
Expand Down
4 changes: 1 addition & 3 deletions drivers/net/ark/ark_ethdev_tx.c
Expand Up @@ -211,9 +211,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
struct ark_tx_queue *queue;
int status;

/* Future: divide the Q's evenly with multi-ports */
int port = dev->data->port_id;
int qidx = port + queue_idx;
int qidx = queue_idx;

if (!rte_is_power_of_2(nb_desc)) {
PMD_DRV_LOG(ERR,
Expand Down

0 comments on commit ce7bf1b

Please sign in to comment.