* Get device MTU. * * @param priv * Pointer to private structure. * @param[out] mtu * MTU value output buffer. * * @return * 0 on success, negative errno value otherwise and rte_errno is set. */
| 198 | * 0 on success, negative errno value otherwise and rte_errno is set. |
| 199 | */ |
| 200 | int |
| 201 | mlx4_mtu_get(struct mlx4_priv *priv, uint16_t *mtu) |
| 202 | { |
| 203 | struct ifreq request; |
| 204 | int ret = mlx4_ifreq(priv, SIOCGIFMTU, &request); |
| 205 | |
| 206 | if (ret) |
| 207 | return ret; |
| 208 | *mtu = request.ifr_mtu; |
| 209 | return 0; |
| 210 | } |
| 211 | |
| 212 | /** |
| 213 | * DPDK callback to change the MTU. |
no test coverage detected