src/dpdk/drivers/net/mlx4/mlx4_ethdev.c
int
mlx4_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
{
	struct mlx4_priv *priv = dev->data->dev_private;
	struct ifreq request = { .ifr_mtu = mtu, };
	int ret = mlx4_ifreq(priv, SIOCSIFMTU, &request);

	if (ret)
		return ret;
	priv->mtu = mtu;
	return 0;
}
/**
 * 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.
 */
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.
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 .
int
mlx4_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
{
	struct mlx4_priv *priv = dev->data->dev_private;
	struct ifreq request = { .ifr_mtu = mtu, };
	int ret = mlx4_ifreq(priv, SIOCSIFMTU, &request);
	if (ret)
		return ret;
	priv->mtu = mtu;
	return 0;
}
int mlx4_mtu_set ( struct rte_eth_dev * dev , uint16_t mtu ) { struct mlx4_priv * priv = dev -> data -> dev_private ; struct ifreq request = { . ifr_mtu = mtu , } ; int ret = mlx4_ifreq ( priv , SIOCSIFMTU , & request ) ; if ( ret ) return ret ; priv -> mtu = mtu ; return 0 ; }
DPDK callback to change the MTU.
DPDK callback to change the MTU .