MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx4_mtu_set

Function mlx4_mtu_set

dpdk/drivers/net/mlx4/mlx4_ethdev.c:223–234  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

221 * 0 on success, negative errno value otherwise and rte_errno is set.
222 */
223int
224mlx4_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.

Callers

nothing calls this directly

Calls 1

mlx4_ifreqFunction · 0.85

Tested by

no test coverage detected