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

Function tap_promisc_disable

dpdk/drivers/net/tap/rte_eth_tap.c:1287–1313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1285}
1286
1287static int
1288tap_promisc_disable(struct rte_eth_dev *dev)
1289{
1290 struct pmd_internals *pmd = dev->data->dev_private;
1291 struct ifreq ifr = { .ifr_flags = IFF_PROMISC };
1292 int ret;
1293
1294 ret = tap_ioctl(pmd, SIOCSIFFLAGS, &ifr, 0, LOCAL_AND_REMOTE);
1295 if (ret != 0)
1296 return ret;
1297
1298 if (pmd->remote_if_index && !pmd->flow_isolate) {
1299 dev->data->promiscuous = 0;
1300 ret = tap_flow_implicit_destroy(pmd, TAP_REMOTE_PROMISC);
1301 if (ret != 0) {
1302 /* Rollback promisc flag */
1303 tap_ioctl(pmd, SIOCSIFFLAGS, &ifr, 1, LOCAL_AND_REMOTE);
1304 /*
1305 * rte_eth_dev_promiscuous_disable() rollback
1306 * dev->data->promiscuous in the case of failure.
1307 */
1308 return ret;
1309 }
1310 }
1311
1312 return 0;
1313}
1314
1315static int
1316tap_allmulti_enable(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 2

tap_ioctlFunction · 0.85

Tested by

no test coverage detected