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

Function fs_allmulticast_enable

dpdk/drivers/net/failsafe/failsafe_ops.c:787–819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

785}
786
787static int
788fs_allmulticast_enable(struct rte_eth_dev *dev)
789{
790 struct sub_device *sdev;
791 uint8_t i;
792 int ret = 0;
793
794 ret = fs_lock(dev, 0);
795 if (ret != 0)
796 return ret;
797 FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) {
798 ret = rte_eth_allmulticast_enable(PORT_ID(sdev));
799 ret = fs_err(sdev, ret);
800 if (ret != 0) {
801 ERROR("All-multicast mode enable failed for subdevice %d",
802 PORT_ID(sdev));
803 break;
804 }
805 }
806 if (ret != 0) {
807 /* Rollback in the case of failure */
808 FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) {
809 ret = rte_eth_allmulticast_disable(PORT_ID(sdev));
810 ret = fs_err(sdev, ret);
811 if (ret != 0)
812 ERROR("All-multicast mode disable during rollback failed for subdevice %d",
813 PORT_ID(sdev));
814 }
815 }
816 fs_unlock(dev, 0);
817
818 return ret;
819}
820
821static int
822fs_allmulticast_disable(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 6

fs_lockFunction · 0.85
FOREACH_SUBDEV_STATEFunction · 0.85
fs_errFunction · 0.85
fs_unlockFunction · 0.85

Tested by

no test coverage detected