X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_pmd_ixgbe%2Fixgbe_rxtx_vec.c;h=1f46f0f6b4ecd6b4397de2ce21da01393d4ece38;hb=4769bc5a27ccaeb736542c4064ffc182bbd7e439;hp=3a30fa7ea2d2f29c6d66e412d20414557749cd91;hpb=51e16682cf5c8ee64b4ce4cc6a18d6d8f5e68948;p=dpdk.git diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c index 3a30fa7ea2..1f46f0f6b4 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c @@ -402,10 +402,10 @@ reassemble_packets(struct igb_rx_queue *rxq, struct rte_mbuf **rx_bufs, struct rte_mbuf *pkts[RTE_IXGBE_VPMD_RX_BURST]; /*finished pkts*/ struct rte_mbuf *start = rxq->pkt_first_seg; struct rte_mbuf *end = rxq->pkt_last_seg; - unsigned pkt_idx = 0, buf_idx = 0; + unsigned pkt_idx, buf_idx; - while (buf_idx < nb_bufs) { + for (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) { if (end != NULL) { /* processing a split packet */ end->next = rx_bufs[buf_idx]; @@ -448,7 +448,6 @@ reassemble_packets(struct igb_rx_queue *rxq, struct rte_mbuf **rx_bufs, rx_bufs[buf_idx]->data_len += rxq->crc_len; rx_bufs[buf_idx]->pkt_len += rxq->crc_len; } - buf_idx++; } /* save the partial packet for next time */ @@ -489,7 +488,7 @@ ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, unsigned i = 0; if (rxq->pkt_first_seg == NULL) { /* find the first split flag, and only reassemble then*/ - while (!split_flags[i] && i < nb_bufs) + while (i < nb_bufs && !split_flags[i]) i++; if (i == nb_bufs) return nb_bufs; @@ -540,20 +539,12 @@ ixgbe_tx_free_bufs(struct igb_tx_queue *txq) */ txep = &((struct igb_tx_entry_v *)txq->sw_ring)[txq->tx_next_dd - (n - 1)]; -#ifdef RTE_MBUF_REFCNT m = __rte_pktmbuf_prefree_seg(txep[0].mbuf); -#else - m = txep[0].mbuf; -#endif if (likely(m != NULL)) { free[0] = m; nb_free = 1; for (i = 1; i < n; i++) { -#ifdef RTE_MBUF_REFCNT m = __rte_pktmbuf_prefree_seg(txep[i].mbuf); -#else - m = txep[i].mbuf; -#endif if (likely(m != NULL)) { if (likely(m->pool == free[0]->pool)) free[nb_free++] = m;