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

Function mlx5_allmulticast_disable

dpdk/drivers/net/mlx5/mlx5_rxmode.c:138–160  ·  view source on GitHub ↗

* DPDK callback to disable allmulti mode. * * @param dev * Pointer to Ethernet device structure. * * @return * 0 on success, a negative errno value otherwise and rte_errno is set. */

Source from the content-addressed store, hash-verified

136 * 0 on success, a negative errno value otherwise and rte_errno is set.
137 */
138int
139mlx5_allmulticast_disable(struct rte_eth_dev *dev)
140{
141 struct mlx5_priv *priv = dev->data->dev_private;
142 int ret;
143
144 dev->data->all_multicast = 0;
145 if (priv->sh->dev_cap.vf || priv->sh->dev_cap.sf) {
146 ret = mlx5_os_set_allmulti(dev, 0);
147 if (ret)
148 goto error;
149 }
150 ret = mlx5_traffic_restart(dev);
151 if (ret)
152 DRV_LOG(ERR, "port %u cannot disable allmulicast mode: %s",
153 dev->data->port_id, strerror(rte_errno));
154error:
155 /*
156 * rte_eth_allmulticast_disable() rollback
157 * dev->data->all_multicast in the case of failure.
158 */
159 return ret;
160}

Callers

nothing calls this directly

Calls 2

mlx5_traffic_restartFunction · 0.85
mlx5_os_set_allmultiFunction · 0.50

Tested by

no test coverage detected