| 1942 | } |
| 1943 | |
| 1944 | static int |
| 1945 | rte_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 | |
| 1974 | static int |
| 1975 | eth_dev_buffer_split_get_supported_hdrs_helper(uint16_t port_id, uint32_t **ptypes) |
no test coverage detected