* Perform ifreq ioctl() on associated Ethernet device. * * @param[in] dev * Pointer to Ethernet device. * @param req * Request number to pass to ioctl(). * @param[out] ifr * Interface request structure output buffer. * * @return * 0 on success, a negative errno value otherwise and rte_errno is set. */
| 232 | * 0 on success, a negative errno value otherwise and rte_errno is set. |
| 233 | */ |
| 234 | static int |
| 235 | mlx5_ifreq(const struct rte_eth_dev *dev, int req, struct ifreq *ifr) |
| 236 | { |
| 237 | char ifname[sizeof(ifr->ifr_name)]; |
| 238 | int ret; |
| 239 | |
| 240 | ret = mlx5_get_ifname(dev, &ifname); |
| 241 | if (ret) |
| 242 | return -rte_errno; |
| 243 | return mlx5_ifreq_by_ifname(ifname, req, ifr); |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * Get device MTU. |
no test coverage detected