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

Function rte_eth_promiscuous_enable

dpdk/lib/ethdev/rte_ethdev.c:2853–2877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2851}
2852
2853int
2854rte_eth_promiscuous_enable(uint16_t port_id)
2855{
2856 struct rte_eth_dev *dev;
2857 int diag = 0;
2858
2859 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
2860 dev = &rte_eth_devices[port_id];
2861
2862 if (dev->data->promiscuous == 1)
2863 return 0;
2864
2865 if (*dev->dev_ops->promiscuous_enable == NULL)
2866 return -ENOTSUP;
2867
2868 diag = (*dev->dev_ops->promiscuous_enable)(dev);
2869 dev->data->promiscuous = (diag == 0) ? 1 : 0;
2870
2871 diag = eth_err(port_id, diag);
2872
2873 rte_eth_trace_promiscuous_enable(port_id, dev->data->promiscuous,
2874 diag);
2875
2876 return diag;
2877}
2878
2879int
2880rte_eth_promiscuous_disable(uint16_t port_id)

Callers 15

init_port_startFunction · 0.85
fs_promiscuous_enableFunction · 0.85
fs_promiscuous_disableFunction · 0.85
fs_eth_dev_conf_applyFunction · 0.85
enable_pdumpFunction · 0.85
init_portFunction · 0.85
configure_vdevFunction · 0.85

Calls 1

eth_errFunction · 0.85