net/bnxt: add multi-device infrastructure
[dpdk.git] / drivers / net / bnxt / bnxt_rxr.c
index ca3e0a5..039217f 100644 (file)
@@ -795,6 +795,19 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
                goto rx;
        }
        rxr->rx_prod = prod;
+
+       if (BNXT_TRUFLOW_EN(bp) && (BNXT_VF_IS_TRUSTED(bp) || BNXT_PF(bp)) &&
+           vfr_flag) {
+               bnxt_vfr_recv(mark_id, rxq->queue_id, mbuf);
+               /* Now return an error so that nb_rx_pkts is not
+                * incremented.
+                * This packet was meant to be given to the representor.
+                * So no need to account the packet and give it to
+                * parent Rx burst function.
+                */
+               rc = -ENODEV;
+               goto next_rx;
+       }
        /*
         * All MBUFs are allocated with the same size under DPDK,
         * no optimization for rx_copy_thresh
@@ -802,20 +815,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 rx:
        *rx_pkt = mbuf;
 
-       if (BNXT_TRUFLOW_EN(bp) &&
-           (BNXT_VF_IS_TRUSTED(bp) || BNXT_PF(bp)) &&
-           vfr_flag) {
-               if (!bnxt_vfr_recv(mark_id, rxq->queue_id, mbuf)) {
-                       /* Now return an error so that nb_rx_pkts is not
-                        * incremented.
-                        * This packet was meant to be given to the representor.
-                        * So no need to account the packet and give it to
-                        * parent Rx burst function.
-                        */
-                       rc = -ENODEV;
-               }
-       }
-
 next_rx:
 
        *raw_cons = tmp_raw_cons;