* DPDK callback to change the MTU. * * @param priv * Pointer to Ethernet device structure. * @param mtu * MTU value to set. * * @return * 0 on success, negative errno value otherwise and rte_errno is set. */
| 221 | * 0 on success, negative errno value otherwise and rte_errno is set. |
| 222 | */ |
| 223 | int |
| 224 | mlx4_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) |
| 225 | { |
| 226 | struct mlx4_priv *priv = dev->data->dev_private; |
| 227 | struct ifreq request = { .ifr_mtu = mtu, }; |
| 228 | int ret = mlx4_ifreq(priv, SIOCSIFMTU, &request); |
| 229 | |
| 230 | if (ret) |
| 231 | return ret; |
| 232 | priv->mtu = mtu; |
| 233 | return 0; |
| 234 | } |
| 235 | |
| 236 | /** |
| 237 | * Set device flags. |
nothing calls this directly
no test coverage detected