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

Function mlx4_set_flags

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

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

Source from the content-addressed store, hash-verified

247 * 0 on success, negative errno value otherwise and rte_errno is set.
248 */
249static int
250mlx4_set_flags(struct mlx4_priv *priv, unsigned int keep, unsigned int flags)
251{
252 struct ifreq request;
253 int ret = mlx4_ifreq(priv, SIOCGIFFLAGS, &request);
254
255 if (ret)
256 return ret;
257 request.ifr_flags &= keep;
258 request.ifr_flags |= flags & ~keep;
259 return mlx4_ifreq(priv, SIOCSIFFLAGS, &request);
260}
261
262/**
263 * Change the link state (UP / DOWN).

Callers 1

mlx4_dev_set_linkFunction · 0.85

Calls 1

mlx4_ifreqFunction · 0.85

Tested by

no test coverage detected