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

Function rte_eth_promiscuous_disable

dpdk/lib/ethdev/rte_ethdev.c:2879–2904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2877}
2878
2879int
2880rte_eth_promiscuous_disable(uint16_t port_id)
2881{
2882 struct rte_eth_dev *dev;
2883 int diag = 0;
2884
2885 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
2886 dev = &rte_eth_devices[port_id];
2887
2888 if (dev->data->promiscuous == 0)
2889 return 0;
2890
2891 if (*dev->dev_ops->promiscuous_disable == NULL)
2892 return -ENOTSUP;
2893
2894 diag = (*dev->dev_ops->promiscuous_disable)(dev);
2895 if (diag == 0)
2896 dev->data->promiscuous = 0;
2897
2898 diag = eth_err(port_id, diag);
2899
2900 rte_eth_trace_promiscuous_disable(port_id, dev->data->promiscuous,
2901 diag);
2902
2903 return diag;
2904}
2905
2906int
2907rte_eth_promiscuous_get(uint16_t port_id)

Calls 1

eth_errFunction · 0.85