MCPcopy Index your code
hub / github.com/F-Stack/f-stack / rte_eth_check_rx_mempool

Function rte_eth_check_rx_mempool

dpdk/lib/ethdev/rte_ethdev.c:1944–1972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1942}
1943
1944static int
1945rte_eth_check_rx_mempool(struct rte_mempool *mp, uint16_t offset,
1946 uint16_t min_length)
1947{
1948 uint16_t data_room_size;
1949
1950 /*
1951 * Check the size of the mbuf data buffer, this value
1952 * must be provided in the private data of the memory pool.
1953 * First check that the memory pool(s) has a valid private data.
1954 */
1955 if (mp->private_data_size <
1956 sizeof(struct rte_pktmbuf_pool_private)) {
1957 RTE_ETHDEV_LOG(ERR, "%s private_data_size %u < %u\n",
1958 mp->name, mp->private_data_size,
1959 (unsigned int)
1960 sizeof(struct rte_pktmbuf_pool_private));
1961 return -ENOSPC;
1962 }
1963 data_room_size = rte_pktmbuf_data_room_size(mp);
1964 if (data_room_size < offset + min_length) {
1965 RTE_ETHDEV_LOG(ERR,
1966 "%s mbuf_data_room_size %u < %u (%u + %u)\n",
1967 mp->name, data_room_size,
1968 offset + min_length, offset, min_length);
1969 return -EINVAL;
1970 }
1971 return 0;
1972}
1973
1974static int
1975eth_dev_buffer_split_get_supported_hdrs_helper(uint16_t port_id, uint32_t **ptypes)

Callers 3

rte_eth_rx_queue_setupFunction · 0.85

Calls 1

Tested by

no test coverage detected