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

Function mlx5_set_flags

dpdk/drivers/net/mlx5/linux/mlx5_ethdev_os.c:301–312  ·  view source on GitHub ↗

* Set device flags. * * @param dev * Pointer to Ethernet device. * @param keep * Bitmask for flags that must remain untouched. * @param flags * Bitmask for flags to modify. * * @return * 0 on success, a negative errno value otherwise and rte_errno is set. */

Source from the content-addressed store, hash-verified

299 * 0 on success, a negative errno value otherwise and rte_errno is set.
300 */
301static int
302mlx5_set_flags(struct rte_eth_dev *dev, unsigned int keep, unsigned int flags)
303{
304 struct ifreq request;
305 int ret = mlx5_ifreq(dev, SIOCGIFFLAGS, &request);
306
307 if (ret)
308 return ret;
309 request.ifr_flags &= keep;
310 request.ifr_flags |= flags & ~keep;
311 return mlx5_ifreq(dev, SIOCSIFFLAGS, &request);
312}
313
314/**
315 * Get device current raw clock counter

Callers 2

mlx5_set_link_downFunction · 0.85
mlx5_set_link_upFunction · 0.85

Calls 1

mlx5_ifreqFunction · 0.85

Tested by

no test coverage detected