net/bnxt: fix ring and context memory allocation
[dpdk.git] / drivers / net / bnxt / bnxt_reps.c
index 12d677d..bdbad53 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2014-2020 Broadcom
+ * Copyright(c) 2014-2021 Broadcom
  * All rights reserved.
  */
 
@@ -29,7 +29,7 @@ static const struct eth_dev_ops bnxt_rep_dev_ops = {
        .dev_stop = bnxt_rep_dev_stop_op,
        .stats_get = bnxt_rep_stats_get_op,
        .stats_reset = bnxt_rep_stats_reset_op,
-       .filter_ctrl = bnxt_filter_ctrl_op
+       .flow_ops_get = bnxt_flow_ops_get_op
 };
 
 uint16_t
@@ -55,12 +55,12 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
        mask = rep_rxr->rx_ring_struct->ring_mask;
 
        /* Put this mbuf on the RxQ of the Representor */
-       prod_rx_buf = &rep_rxr->rx_buf_ring[rep_rxr->rx_prod & mask];
+       prod_rx_buf = &rep_rxr->rx_buf_ring[rep_rxr->rx_raw_prod & mask];
        if (*prod_rx_buf == NULL) {
                *prod_rx_buf = mbuf;
                vfr_bp->rx_bytes[que] += mbuf->pkt_len;
                vfr_bp->rx_pkts[que]++;
-               rep_rxr->rx_prod++;
+               rep_rxr->rx_raw_prod++;
        } else {
                /* Representor Rx ring full, drop pkt */
                vfr_bp->rx_drop_bytes[que] += mbuf->pkt_len;
@@ -104,7 +104,7 @@ bnxt_rep_rx_burst(void *rx_queue,
 static uint16_t
 bnxt_rep_tx_burst(void *tx_queue,
                     struct rte_mbuf **tx_pkts,
-                    __rte_unused uint16_t nb_pkts)
+                    uint16_t nb_pkts)
 {
        struct bnxt_vf_rep_tx_queue *vfr_txq = tx_queue;
        struct bnxt_tx_queue *ptxq;
@@ -548,7 +548,7 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
        return 0;
 }
 
-int bnxt_rep_dev_configure_op(__rte_unused struct rte_eth_dev *eth_dev)
+int bnxt_rep_dev_configure_op(struct rte_eth_dev *eth_dev)
 {
        struct bnxt_representor *rep_bp = eth_dev->data->dev_private;