* **Updated the enic driver.**
- * Add support for mbuf fast free offload.
- * Add low cycle count Tx handler for no-offload Tx (except mbuf fast free).
+ * Add low cycle count Tx handler for no-offload Tx.
* Add low cycle count Rx handler for non-scattered Rx.
* Minor performance improvements to scattered Rx handler.
* Add handlers to add/delete VxLAN port number.
}
/*
- * Use the simple TX handler if possible. All offloads must be disabled
- * except mbuf fast free.
+ * Use the simple TX handler if possible. All offloads must be
+ * disabled.
*/
- if ((eth_dev->data->dev_conf.txmode.offloads &
- ~DEV_TX_OFFLOAD_MBUF_FAST_FREE) == 0) {
+ if (eth_dev->data->dev_conf.txmode.offloads == 0) {
PMD_INIT_LOG(DEBUG, " use the simple tx handler");
eth_dev->tx_pkt_burst = &enic_simple_xmit_pkts;
for (index = 0; index < enic->wq_count; index++)
* Default hardware capabilities. enic_dev_init() may add additional
* flags if it enables overlay offloads.
*/
- enic->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+ enic->tx_queue_offload_capa = 0;
enic->tx_offload_capa =
enic->tx_queue_offload_capa |
DEV_TX_OFFLOAD_MULTI_SEGS |
return rx - rx_pkts;
}
-static void enic_fast_free_wq_bufs(struct vnic_wq *wq, u16 completed_index)
-{
- unsigned int desc_count, n, nb_to_free, tail_idx;
- struct rte_mempool *pool;
- struct rte_mbuf **m;
-
- desc_count = wq->ring.desc_count;
- nb_to_free = enic_ring_sub(desc_count, wq->tail_idx, completed_index)
- + 1;
- tail_idx = wq->tail_idx;
- wq->tail_idx += nb_to_free;
- wq->ring.desc_avail += nb_to_free;
- if (wq->tail_idx >= desc_count)
- wq->tail_idx -= desc_count;
- /* First, free at most until the end of ring */
- m = &wq->bufs[tail_idx];
- pool = (*m)->pool;
- n = RTE_MIN(nb_to_free, desc_count - tail_idx);
- rte_mempool_put_bulk(pool, (void **)m, n);
- n = nb_to_free - n;
- /* Then wrap and free the rest */
- if (unlikely(n))
- rte_mempool_put_bulk(pool, (void **)wq->bufs, n);
-}
-
static inline void enic_free_wq_bufs(struct vnic_wq *wq, u16 completed_index)
{
struct rte_mbuf *buf;
completed_index = *((uint32_t *)wq->cqmsg_rz->addr) & 0xffff;
if (wq->last_completed_index != completed_index) {
- if (wq->offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
- enic_fast_free_wq_bufs(wq, completed_index);
- else
- enic_free_wq_bufs(wq, completed_index);
+ enic_free_wq_bufs(wq, completed_index);
wq->last_completed_index = completed_index;
}
return 0;