* 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 */
| 4772 | * @pool Memory pool of the Rx queue |
| 4773 | */ |
| 4774 | static inline uint32_t |
| 4775 | ixgbe_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 |
no test coverage detected