src/dpdk/drivers/net/mlx4/mlx4_ethdev.c
static int
mlx4_set_flags(struct mlx4_priv *priv, unsigned int keep, unsigned int flags)
{
	struct ifreq request;
	int ret = mlx4_ifreq(priv, SIOCGIFFLAGS, &request);

	if (ret)
		return ret;
	request.ifr_flags &= keep;
	request.ifr_flags |= flags & ~keep;
	return mlx4_ifreq(priv, SIOCSIFFLAGS, &request);
}
/**
 * Set device flags.
 *
 * @param priv
 *   Pointer to private structure.
 * @param keep
 *   Bitmask for flags that must remain untouched.
 * @param flags
 *   Bitmask for flags to modify.
 *
 * @return
 *   0 on success, negative errno value otherwise and rte_errno is set.
 */
Set device flags.
@param priv
Pointer to private structure.
@param keep
Bitmask for flags that must remain untouched.
@param flags
Bitmask for flags to modify.

@return
0 on success, negative errno value otherwise and rte_errno is set.
Set device flags . @param priv Pointer to private structure . @param keep Bitmask for flags that must remain untouched . @param flags Bitmask for flags to modify . @return 0 on success negative errno value otherwise and rte_errno is set .
static int
mlx4_set_flags(struct mlx4_priv *priv, unsigned int keep, unsigned int flags)
{
	struct ifreq request;
	int ret = mlx4_ifreq(priv, SIOCGIFFLAGS, &request);
	if (ret)
		return ret;
	request.ifr_flags &= keep;
	request.ifr_flags |= flags & ~keep;
	return mlx4_ifreq(priv, SIOCSIFFLAGS, &request);
}
static int mlx4_set_flags ( struct mlx4_priv * priv , unsigned int keep , unsigned int flags ) { struct ifreq request ; int ret = mlx4_ifreq ( priv , SIOCGIFFLAGS , & request ) ; if ( ret ) return ret ; request . ifr_flags &= keep ; request . ifr_flags |= flags & ~ keep ; return mlx4_ifreq ( priv , SIOCSIFFLAGS , & request ) ; }
Set device flags.
Set device flags .