src/dpdk/drivers/net/i40e/i40e_rxtx.c
static inline uint16_t
i40e_calc_pkt_desc(struct rte_mbuf *tx_pkt)
{
	struct rte_mbuf *txd = tx_pkt;
	uint16_t count = 0;

	while (txd != NULL) {
		count += DIV_ROUND_UP(txd->data_len, I40E_MAX_DATA_PER_TXD);
		txd = txd->next;
	}

	return count;
}
/* Calculate the number of TX descriptors needed for each pkt */
Calculate the number of TX descriptors needed for each pkt
Calculate the number of TX descriptors needed for each pkt
static inline uint16_t
i40e_calc_pkt_desc(struct rte_mbuf *tx_pkt)
{
	struct rte_mbuf *txd = tx_pkt;
	uint16_t count = 0;
	while (txd != NULL) {
		count += DIV_ROUND_UP(txd->data_len, I40E_MAX_DATA_PER_TXD);
		txd = txd->next;
	}
	return count;
}
static inline uint16_t i40e_calc_pkt_desc ( struct rte_mbuf * tx_pkt ) { struct rte_mbuf * txd = tx_pkt ; uint16_t count = 0 ; while ( txd != NULL ) { count += DIV_ROUND_UP ( txd -> data_len , I40E_MAX_DATA_PER_TXD ) ; txd = txd -> next ; } return count ; }
Calculate the number of TX descriptors needed for each pkt
Calculate the number of TX descriptors needed for each pkt