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

Function tap_allmulti_disable

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

Source from the content-addressed store, hash-verified

1341}
1342
1343static int
1344tap_allmulti_disable(struct rte_eth_dev *dev)
1345{
1346 struct pmd_internals *pmd = dev->data->dev_private;
1347 struct ifreq ifr = { .ifr_flags = IFF_ALLMULTI };
1348 int ret;
1349
1350 ret = tap_ioctl(pmd, SIOCSIFFLAGS, &ifr, 0, LOCAL_AND_REMOTE);
1351 if (ret != 0)
1352 return ret;
1353
1354 if (pmd->remote_if_index && !pmd->flow_isolate) {
1355 dev->data->all_multicast = 0;
1356 ret = tap_flow_implicit_destroy(pmd, TAP_REMOTE_ALLMULTI);
1357 if (ret != 0) {
1358 /* Rollback allmulti flag */
1359 tap_ioctl(pmd, SIOCSIFFLAGS, &ifr, 1, LOCAL_AND_REMOTE);
1360 /*
1361 * rte_eth_dev_allmulticast_disable() rollback
1362 * dev->data->all_multicast in the case of failure.
1363 */
1364 return ret;
1365 }
1366 }
1367
1368 return 0;
1369}
1370
1371static int
1372tap_mac_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)

Callers

nothing calls this directly

Calls 2

tap_ioctlFunction · 0.85

Tested by

no test coverage detected