MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ixgbe_get_rscctl_maxdesc

Function ixgbe_get_rscctl_maxdesc

dpdk/drivers/net/ixgbe/ixgbe_rxtx.c:4774–4792  ·  view source on GitHub ↗

* ixgbe_get_rscctl_maxdesc - Calculate the RSCCTL[n].MAXDESC for PF * * Return the RSCCTL[n].MAXDESC for 82599 and x540 PF devices according to the * spec rev. 3.0 chapter 8.2.3.8.13. * * @pool Memory pool of the Rx queue */

Source from the content-addressed store, hash-verified

4772 * @pool Memory pool of the Rx queue
4773 */
4774static inline uint32_t
4775ixgbe_get_rscctl_maxdesc(struct rte_mempool *pool)
4776{
4777 struct rte_pktmbuf_pool_private *mp_priv = rte_mempool_get_priv(pool);
4778
4779 /* MAXDESC * SRRCTL.BSIZEPKT must not exceed 64 KB minus one */
4780 uint16_t maxdesc =
4781 RTE_IPV4_MAX_PKT_LEN /
4782 (mp_priv->mbuf_data_room_size - RTE_PKTMBUF_HEADROOM);
4783
4784 if (maxdesc >= 16)
4785 return IXGBE_RSCCTL_MAXDESC_16;
4786 else if (maxdesc >= 8)
4787 return IXGBE_RSCCTL_MAXDESC_8;
4788 else if (maxdesc >= 4)
4789 return IXGBE_RSCCTL_MAXDESC_4;
4790 else
4791 return IXGBE_RSCCTL_MAXDESC_1;
4792}
4793
4794/**
4795 * ixgbe_set_ivar - Setup the correct IVAR register for a particular MSIX

Callers 1

ixgbe_set_rscFunction · 0.85

Calls 1

rte_mempool_get_privFunction · 0.85

Tested by

no test coverage detected