Lines Matching refs:cmds
69 struct netdev_event_work_cmd cmds[ROCE_NETDEV_CALLBACK_SZ]; member
626 for (i = 0; i < ARRAY_SIZE(work->cmds) && work->cmds[i].cb; i++) { in netdevice_event_work_handler()
627 ib_enum_all_roce_netdevs(work->cmds[i].filter, in netdevice_event_work_handler()
628 work->cmds[i].filter_ndev, in netdevice_event_work_handler()
629 work->cmds[i].cb, in netdevice_event_work_handler()
630 work->cmds[i].ndev); in netdevice_event_work_handler()
631 dev_put(work->cmds[i].ndev); in netdevice_event_work_handler()
632 dev_put(work->cmds[i].filter_ndev); in netdevice_event_work_handler()
638 static int netdevice_queue_work(struct netdev_event_work_cmd *cmds, in netdevice_queue_work() argument
648 memcpy(ndev_work->cmds, cmds, sizeof(ndev_work->cmds)); in netdevice_queue_work()
649 for (i = 0; i < ARRAY_SIZE(ndev_work->cmds) && ndev_work->cmds[i].cb; i++) { in netdevice_queue_work()
650 if (!ndev_work->cmds[i].ndev) in netdevice_queue_work()
651 ndev_work->cmds[i].ndev = ndev; in netdevice_queue_work()
652 if (!ndev_work->cmds[i].filter_ndev) in netdevice_queue_work()
653 ndev_work->cmds[i].filter_ndev = ndev; in netdevice_queue_work()
654 dev_hold(ndev_work->cmds[i].ndev); in netdevice_queue_work()
655 dev_hold(ndev_work->cmds[i].filter_ndev); in netdevice_queue_work()
676 struct netdev_event_work_cmd *cmds) in ndev_event_unlink() argument
684 cmds[0] = upper_ips_del_cmd; in ndev_event_unlink()
685 cmds[0].ndev = changeupper_info->upper_dev; in ndev_event_unlink()
686 cmds[1] = add_cmd; in ndev_event_unlink()
697 struct netdev_event_work_cmd *cmds) in ndev_event_link() argument
708 cmds[0] = bonding_default_del_cmd; in ndev_event_link()
709 cmds[0].ndev = event_ndev; in ndev_event_link()
710 cmds[0].filter_ndev = changeupper_info->upper_dev; in ndev_event_link()
713 cmds[1] = bonding_default_add_cmd; in ndev_event_link()
714 cmds[1].ndev = changeupper_info->upper_dev; in ndev_event_link()
715 cmds[1].filter_ndev = changeupper_info->upper_dev; in ndev_event_link()
718 cmds[2] = add_cmd_upper_ips; in ndev_event_link()
719 cmds[2].ndev = changeupper_info->upper_dev; in ndev_event_link()
720 cmds[2].filter_ndev = changeupper_info->upper_dev; in ndev_event_link()
725 struct netdev_event_work_cmd *cmds) in netdevice_event_changeupper() argument
728 ndev_event_link(event_ndev, changeupper_info, cmds); in netdevice_event_changeupper()
730 ndev_event_unlink(changeupper_info, cmds); in netdevice_event_changeupper()
756 struct netdev_event_work_cmd cmds[ROCE_NETDEV_CALLBACK_SZ] = { {NULL} }; in netdevice_event() local
764 cmds[0] = bonding_default_del_cmd_join; in netdevice_event()
765 cmds[1] = add_default_gid_cmd; in netdevice_event()
766 cmds[2] = add_cmd; in netdevice_event()
771 cmds[0] = del_cmd; in netdevice_event()
777 cmds[0] = netdev_del_cmd; in netdevice_event()
779 cmds[1] = add_default_gid_cmd; in netdevice_event()
780 cmds[2] = add_cmd; in netdevice_event()
787 cmds); in netdevice_event()
791 cmds[0] = bonding_event_ips_del_cmd; in netdevice_event()
793 cmds[1] = bonding_default_add_cmd; in netdevice_event()
795 cmds[2] = add_cmd_upper_ips; in netdevice_event()
802 return netdevice_queue_work(cmds, ndev); in netdevice_event()