src/dpdk/drivers/net/txgbe/txgbe_rxtx.c
static inline void
tx4(volatile struct txgbe_tx_desc *txdp, struct rte_mbuf **pkts)
{
	uint64_t buf_dma_addr;
	uint32_t pkt_len;
	int i;

	for (i = 0; i < 4; ++i, ++txdp, ++pkts) {
		buf_dma_addr = rte_mbuf_data_iova(*pkts);
		pkt_len = (*pkts)->data_len;

		/* write data to descriptor */
		txdp->qw0 = rte_cpu_to_le_64(buf_dma_addr);
		txdp->dw2 = cpu_to_le32(TXGBE_TXD_FLAGS |
					TXGBE_TXD_DATLEN(pkt_len));
		txdp->dw3 = cpu_to_le32(TXGBE_TXD_PAYLEN(pkt_len));

		rte_prefetch0(&(*pkts)->pool);
	}
}
/* Populate 4 descriptors with data from 4 mbufs */
Populate 4 descriptors with data from 4 mbufs
Populate 4 descriptors with data from 4 mbufs
static inline void
tx4(volatile struct txgbe_tx_desc *txdp, struct rte_mbuf **pkts)
{
	uint64_t buf_dma_addr;
	uint32_t pkt_len;
	int i;
	for (i = 0; i < 4; ++i, ++txdp, ++pkts) {
		buf_dma_addr = rte_mbuf_data_iova(*pkts);
		pkt_len = (*pkts)->data_len;
		txdp->qw0 = rte_cpu_to_le_64(buf_dma_addr);
		txdp->dw2 = cpu_to_le32(TXGBE_TXD_FLAGS |
					TXGBE_TXD_DATLEN(pkt_len));
		txdp->dw3 = cpu_to_le32(TXGBE_TXD_PAYLEN(pkt_len));
		rte_prefetch0(&(*pkts)->pool);
	}
}
static inline void tx4 ( volatile struct txgbe_tx_desc * txdp , struct rte_mbuf * * pkts ) { uint64_t buf_dma_addr ; uint32_t pkt_len ; int i ; for ( i = 0 ; i < 4 ; ++ i , ++ txdp , ++ pkts ) { buf_dma_addr = rte_mbuf_data_iova ( * pkts ) ; pkt_len = ( * pkts ) -> data_len ; txdp -> qw0 = rte_cpu_to_le_64 ( buf_dma_addr ) ; txdp -> dw2 = cpu_to_le32 ( TXGBE_TXD_FLAGS | TXGBE_TXD_DATLEN ( pkt_len ) ) ; txdp -> dw3 = cpu_to_le32 ( TXGBE_TXD_PAYLEN ( pkt_len ) ) ; rte_prefetch0 ( & ( * pkts ) -> pool ) ; } }
Populate 4 descriptors with data from 4 mbufs
Populate 4 descriptors with data from 4 mbufs
/* write data to descriptor */