Lines Matching refs:cmds
69 struct netdev_event_work_cmd cmds[ROCE_NETDEV_CALLBACK_SZ]; member
625 for (i = 0; i < ARRAY_SIZE(work->cmds) && work->cmds[i].cb; i++) { in netdevice_event_work_handler()
626 ib_enum_all_roce_netdevs(work->cmds[i].filter, in netdevice_event_work_handler()
627 work->cmds[i].filter_ndev, in netdevice_event_work_handler()
628 work->cmds[i].cb, in netdevice_event_work_handler()
629 work->cmds[i].ndev); in netdevice_event_work_handler()
630 dev_put(work->cmds[i].ndev); in netdevice_event_work_handler()
631 dev_put(work->cmds[i].filter_ndev); in netdevice_event_work_handler()
637 static int netdevice_queue_work(struct netdev_event_work_cmd *cmds, in netdevice_queue_work() argument
647 memcpy(ndev_work->cmds, cmds, sizeof(ndev_work->cmds)); in netdevice_queue_work()
648 for (i = 0; i < ARRAY_SIZE(ndev_work->cmds) && ndev_work->cmds[i].cb; i++) { in netdevice_queue_work()
649 if (!ndev_work->cmds[i].ndev) in netdevice_queue_work()
650 ndev_work->cmds[i].ndev = ndev; in netdevice_queue_work()
651 if (!ndev_work->cmds[i].filter_ndev) in netdevice_queue_work()
652 ndev_work->cmds[i].filter_ndev = ndev; in netdevice_queue_work()
653 dev_hold(ndev_work->cmds[i].ndev); in netdevice_queue_work()
654 dev_hold(ndev_work->cmds[i].filter_ndev); in netdevice_queue_work()
675 struct netdev_event_work_cmd *cmds) in ndev_event_unlink() argument
683 cmds[0] = upper_ips_del_cmd; in ndev_event_unlink()
684 cmds[0].ndev = changeupper_info->upper_dev; in ndev_event_unlink()
685 cmds[1] = add_cmd; in ndev_event_unlink()
696 struct netdev_event_work_cmd *cmds) in ndev_event_link() argument
707 cmds[0] = bonding_default_del_cmd; in ndev_event_link()
708 cmds[0].ndev = event_ndev; in ndev_event_link()
709 cmds[0].filter_ndev = changeupper_info->upper_dev; in ndev_event_link()
712 cmds[1] = bonding_default_add_cmd; in ndev_event_link()
713 cmds[1].ndev = changeupper_info->upper_dev; in ndev_event_link()
714 cmds[1].filter_ndev = changeupper_info->upper_dev; in ndev_event_link()
717 cmds[2] = add_cmd_upper_ips; in ndev_event_link()
718 cmds[2].ndev = changeupper_info->upper_dev; in ndev_event_link()
719 cmds[2].filter_ndev = changeupper_info->upper_dev; in ndev_event_link()
724 struct netdev_event_work_cmd *cmds) in netdevice_event_changeupper() argument
727 ndev_event_link(event_ndev, changeupper_info, cmds); in netdevice_event_changeupper()
729 ndev_event_unlink(changeupper_info, cmds); in netdevice_event_changeupper()
755 struct netdev_event_work_cmd cmds[ROCE_NETDEV_CALLBACK_SZ] = { {NULL} }; in netdevice_event() local
763 cmds[0] = bonding_default_del_cmd_join; in netdevice_event()
764 cmds[1] = add_default_gid_cmd; in netdevice_event()
765 cmds[2] = add_cmd; in netdevice_event()
770 cmds[0] = del_cmd; in netdevice_event()
776 cmds[0] = netdev_del_cmd; in netdevice_event()
778 cmds[1] = add_default_gid_cmd; in netdevice_event()
779 cmds[2] = add_cmd; in netdevice_event()
786 cmds); in netdevice_event()
790 cmds[0] = bonding_event_ips_del_cmd; in netdevice_event()
792 cmds[1] = bonding_default_add_cmd; in netdevice_event()
794 cmds[2] = add_cmd_upper_ips; in netdevice_event()
801 return netdevice_queue_work(cmds, ndev); in netdevice_event()