| 785 | } |
| 786 | |
| 787 | static int |
| 788 | fs_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 | |
| 821 | static int |
| 822 | fs_allmulticast_disable(struct rte_eth_dev *dev) |
nothing calls this directly
no test coverage detected