| 3204 | } |
| 3205 | |
| 3206 | static int |
| 3207 | eth_dev_get_xstats_count(uint16_t port_id) |
| 3208 | { |
| 3209 | struct rte_eth_dev *dev; |
| 3210 | int count; |
| 3211 | |
| 3212 | RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); |
| 3213 | dev = &rte_eth_devices[port_id]; |
| 3214 | if (dev->dev_ops->xstats_get_names != NULL) { |
| 3215 | count = (*dev->dev_ops->xstats_get_names)(dev, NULL, 0); |
| 3216 | if (count < 0) |
| 3217 | return eth_err(port_id, count); |
| 3218 | } else |
| 3219 | count = 0; |
| 3220 | |
| 3221 | |
| 3222 | count += eth_dev_get_xstats_basic_count(dev); |
| 3223 | |
| 3224 | return count; |
| 3225 | } |
| 3226 | |
| 3227 | int |
| 3228 | rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name, |
no test coverage detected