Lines Matching refs:elem
80 struct bnx2x_exeq_elem *elem) in bnx2x_exe_queue_free_elem() argument
83 kfree(elem); in bnx2x_exe_queue_free_elem()
88 struct bnx2x_exeq_elem *elem; in bnx2x_exe_queue_length() local
93 list_for_each_entry(elem, &o->exe_queue, link) in bnx2x_exe_queue_length()
113 struct bnx2x_exeq_elem *elem, in bnx2x_exe_queue_add() argument
122 rc = o->optimize(bp, o->owner, elem); in bnx2x_exe_queue_add()
127 rc = o->validate(bp, o->owner, elem); in bnx2x_exe_queue_add()
135 list_add_tail(&elem->link, &o->exe_queue); in bnx2x_exe_queue_add()
142 bnx2x_exe_queue_free_elem(bp, elem); in bnx2x_exe_queue_add()
153 struct bnx2x_exeq_elem *elem; in __bnx2x_exe_queue_reset_pending() local
156 elem = list_first_entry(&o->pending_comp, in __bnx2x_exe_queue_reset_pending()
159 list_del(&elem->link); in __bnx2x_exe_queue_reset_pending()
160 bnx2x_exe_queue_free_elem(bp, elem); in __bnx2x_exe_queue_reset_pending()
177 struct bnx2x_exeq_elem *elem, spacer; in bnx2x_exe_queue_step() local
201 elem = list_first_entry(&o->exe_queue, struct bnx2x_exeq_elem, in bnx2x_exe_queue_step()
203 WARN_ON(!elem->cmd_len); in bnx2x_exe_queue_step()
205 if (cur_len + elem->cmd_len <= o->exe_chunk_len) { in bnx2x_exe_queue_step()
206 cur_len += elem->cmd_len; in bnx2x_exe_queue_step()
213 list_move_tail(&elem->link, &o->pending_comp); in bnx2x_exe_queue_step()
883 struct bnx2x_exeq_elem *elem, int rule_idx, in bnx2x_set_one_mac_e2() argument
889 int rule_cnt = rule_idx + 1, cmd = elem->cmd_data.vlan_mac.cmd; in bnx2x_set_one_mac_e2()
892 unsigned long *vlan_mac_flags = &elem->cmd_data.vlan_mac.vlan_mac_flags; in bnx2x_set_one_mac_e2()
893 u8 *mac = elem->cmd_data.vlan_mac.u.mac.mac; in bnx2x_set_one_mac_e2()
937 cpu_to_le16(elem->cmd_data.vlan_mac.u.mac.is_inner_mac); in bnx2x_set_one_mac_e2()
946 elem->cmd_data.vlan_mac.target_obj, in bnx2x_set_one_mac_e2()
955 cpu_to_le16(elem->cmd_data.vlan_mac. in bnx2x_set_one_mac_e2()
1044 struct bnx2x_exeq_elem *elem, int rule_idx, in bnx2x_set_one_mac_e1x() argument
1053 bool add = (elem->cmd_data.vlan_mac.cmd == BNX2X_VLAN_MAC_ADD) ? in bnx2x_set_one_mac_e1x()
1061 elem->cmd_data.vlan_mac.u.mac.mac, 0, in bnx2x_set_one_mac_e1x()
1067 struct bnx2x_exeq_elem *elem, int rule_idx, in bnx2x_set_one_vlan_e2() argument
1075 enum bnx2x_vlan_mac_cmd cmd = elem->cmd_data.vlan_mac.cmd; in bnx2x_set_one_vlan_e2()
1077 u16 vlan = elem->cmd_data.vlan_mac.u.vlan.vlan; in bnx2x_set_one_vlan_e2()
1100 elem->cmd_data.vlan_mac.target_obj, in bnx2x_set_one_vlan_e2()
1117 struct bnx2x_exeq_elem *elem, in bnx2x_set_one_vlan_mac_e2() argument
1125 enum bnx2x_vlan_mac_cmd cmd = elem->cmd_data.vlan_mac.cmd; in bnx2x_set_one_vlan_mac_e2()
1127 u16 vlan = elem->cmd_data.vlan_mac.u.vlan_mac.vlan; in bnx2x_set_one_vlan_mac_e2()
1128 u8 *mac = elem->cmd_data.vlan_mac.u.vlan_mac.mac; in bnx2x_set_one_vlan_mac_e2()
1144 inner_mac = elem->cmd_data.vlan_mac.u.vlan_mac.is_inner_mac; in bnx2x_set_one_vlan_mac_e2()
1154 target_obj = elem->cmd_data.vlan_mac.target_obj; in bnx2x_set_one_vlan_mac_e2()
1183 struct bnx2x_exeq_elem *elem, in bnx2x_set_one_vlan_mac_e1h() argument
1192 bool add = (elem->cmd_data.vlan_mac.cmd == BNX2X_VLAN_MAC_ADD) ? in bnx2x_set_one_vlan_mac_e1h()
1200 elem->cmd_data.vlan_mac.u.vlan_mac.mac, in bnx2x_set_one_vlan_mac_e1h()
1201 elem->cmd_data.vlan_mac.u.vlan_mac.vlan, in bnx2x_set_one_vlan_mac_e1h()
1272 struct bnx2x_exeq_elem *elem) in bnx2x_exeq_get_mac() argument
1275 struct bnx2x_mac_ramrod_data *data = &elem->cmd_data.vlan_mac.u.mac; in bnx2x_exeq_get_mac()
1281 (pos->cmd_data.vlan_mac.cmd == elem->cmd_data.vlan_mac.cmd)) in bnx2x_exeq_get_mac()
1289 struct bnx2x_exeq_elem *elem) in bnx2x_exeq_get_vlan() argument
1292 struct bnx2x_vlan_ramrod_data *data = &elem->cmd_data.vlan_mac.u.vlan; in bnx2x_exeq_get_vlan()
1298 (pos->cmd_data.vlan_mac.cmd == elem->cmd_data.vlan_mac.cmd)) in bnx2x_exeq_get_vlan()
1306 struct bnx2x_exeq_elem *elem) in bnx2x_exeq_get_vlan_mac() argument
1310 &elem->cmd_data.vlan_mac.u.vlan_mac; in bnx2x_exeq_get_vlan_mac()
1317 elem->cmd_data.vlan_mac.cmd)) in bnx2x_exeq_get_vlan_mac()
1338 struct bnx2x_exeq_elem *elem) in bnx2x_validate_vlan_mac_add() argument
1345 rc = o->check_add(bp, o, &elem->cmd_data.vlan_mac.u); in bnx2x_validate_vlan_mac_add()
1354 if (exeq->get(exeq, elem)) { in bnx2x_validate_vlan_mac_add()
1365 &elem->cmd_data.vlan_mac.vlan_mac_flags) || in bnx2x_validate_vlan_mac_add()
1386 struct bnx2x_exeq_elem *elem) in bnx2x_validate_vlan_mac_del() argument
1396 pos = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u); in bnx2x_validate_vlan_mac_del()
1405 memcpy(&query_elem, elem, sizeof(query_elem)); in bnx2x_validate_vlan_mac_del()
1415 if (exeq->get(exeq, elem)) { in bnx2x_validate_vlan_mac_del()
1422 &elem->cmd_data.vlan_mac.vlan_mac_flags) || in bnx2x_validate_vlan_mac_del()
1445 struct bnx2x_exeq_elem *elem) in bnx2x_validate_vlan_mac_move() argument
1448 struct bnx2x_vlan_mac_obj *dest_o = elem->cmd_data.vlan_mac.target_obj; in bnx2x_validate_vlan_mac_move()
1457 &elem->cmd_data.vlan_mac.u)) { in bnx2x_validate_vlan_mac_move()
1466 memcpy(&query_elem, elem, sizeof(query_elem)); in bnx2x_validate_vlan_mac_move()
1476 if (src_exeq->get(src_exeq, elem)) { in bnx2x_validate_vlan_mac_move()
1490 &elem->cmd_data.vlan_mac.vlan_mac_flags) || in bnx2x_validate_vlan_mac_move()
1495 &elem->cmd_data.vlan_mac.vlan_mac_flags) || in bnx2x_validate_vlan_mac_move()
1507 struct bnx2x_exeq_elem *elem) in bnx2x_validate_vlan_mac() argument
1509 switch (elem->cmd_data.vlan_mac.cmd) { in bnx2x_validate_vlan_mac()
1511 return bnx2x_validate_vlan_mac_add(bp, qo, elem); in bnx2x_validate_vlan_mac()
1513 return bnx2x_validate_vlan_mac_del(bp, qo, elem); in bnx2x_validate_vlan_mac()
1515 return bnx2x_validate_vlan_mac_move(bp, qo, elem); in bnx2x_validate_vlan_mac()
1523 struct bnx2x_exeq_elem *elem) in bnx2x_remove_vlan_mac() argument
1529 &elem->cmd_data.vlan_mac.vlan_mac_flags)) in bnx2x_remove_vlan_mac()
1532 switch (elem->cmd_data.vlan_mac.cmd) { in bnx2x_remove_vlan_mac()
1664 struct bnx2x_exeq_elem *elem) in bnx2x_optimize_vlan_mac() argument
1670 memcpy(&query, elem, sizeof(query)); in bnx2x_optimize_vlan_mac()
1672 switch (elem->cmd_data.vlan_mac.cmd) { in bnx2x_optimize_vlan_mac()
1702 (elem->cmd_data.vlan_mac.cmd == BNX2X_VLAN_MAC_ADD) ? in bnx2x_optimize_vlan_mac()
1727 struct bnx2x_exeq_elem *elem, in bnx2x_vlan_mac_get_registry_elem() argument
1731 enum bnx2x_vlan_mac_cmd cmd = elem->cmd_data.vlan_mac.cmd; in bnx2x_vlan_mac_get_registry_elem()
1754 memcpy(®_elem->u, &elem->cmd_data.vlan_mac.u, in bnx2x_vlan_mac_get_registry_elem()
1759 elem->cmd_data.vlan_mac.vlan_mac_flags; in bnx2x_vlan_mac_get_registry_elem()
1761 reg_elem = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u); in bnx2x_vlan_mac_get_registry_elem()
1782 struct bnx2x_exeq_elem *elem; in bnx2x_execute_vlan_mac() local
1801 list_for_each_entry(elem, exe_chunk, link) { in bnx2x_execute_vlan_mac()
1802 cmd = elem->cmd_data.vlan_mac.cmd; in bnx2x_execute_vlan_mac()
1807 cam_obj = elem->cmd_data.vlan_mac.target_obj; in bnx2x_execute_vlan_mac()
1812 elem, restore, in bnx2x_execute_vlan_mac()
1826 o->set_one_rule(bp, o, elem, idx, in bnx2x_execute_vlan_mac()
1852 list_for_each_entry(elem, exe_chunk, link) { in bnx2x_execute_vlan_mac()
1853 cmd = elem->cmd_data.vlan_mac.cmd; in bnx2x_execute_vlan_mac()
1857 &elem->cmd_data.vlan_mac.u); in bnx2x_execute_vlan_mac()
1876 list_for_each_entry(elem, exe_chunk, link) { in bnx2x_execute_vlan_mac()
1877 cmd = elem->cmd_data.vlan_mac.cmd; in bnx2x_execute_vlan_mac()
1880 cam_obj = elem->cmd_data.vlan_mac.target_obj; in bnx2x_execute_vlan_mac()
1889 &elem->cmd_data.vlan_mac.u); in bnx2x_execute_vlan_mac()
1904 struct bnx2x_exeq_elem *elem; in bnx2x_vlan_mac_push_new_cmd() local
1909 elem = bnx2x_exe_queue_alloc_elem(bp); in bnx2x_vlan_mac_push_new_cmd()
1910 if (!elem) in bnx2x_vlan_mac_push_new_cmd()
1916 elem->cmd_len = 2; in bnx2x_vlan_mac_push_new_cmd()
1919 elem->cmd_len = 1; in bnx2x_vlan_mac_push_new_cmd()
1923 memcpy(&elem->cmd_data.vlan_mac, &p->user_req, sizeof(p->user_req)); in bnx2x_vlan_mac_push_new_cmd()
1926 return bnx2x_exe_queue_add(bp, &o->exe_queue, elem, restore); in bnx2x_vlan_mac_push_new_cmd()
3155 u64 elem; in bnx2x_mcast_refresh_registry_e2() local
3158 elem = o->registry.aprox_match.vec[i]; in bnx2x_mcast_refresh_registry_e2()
3159 for (; elem; cnt++) in bnx2x_mcast_refresh_registry_e2()
3160 elem &= elem - 1; in bnx2x_mcast_refresh_registry_e2()
3510 struct bnx2x_mcast_mac_elem *elem; in bnx2x_mcast_handle_restore_cmd_e1() local
3515 list_for_each_entry(elem, &o->registry.exact_match.macs, link) { in bnx2x_mcast_handle_restore_cmd_e1()
3516 cfg_data.mac = &elem->mac[0]; in bnx2x_mcast_handle_restore_cmd_e1()
3614 struct bnx2x_mcast_mac_elem *elem; in bnx2x_mcast_refresh_registry_e1() local
3629 elem = kcalloc(len, sizeof(*elem), GFP_ATOMIC); in bnx2x_mcast_refresh_registry_e1()
3630 if (!elem) { in bnx2x_mcast_refresh_registry_e1()
3635 for (i = 0; i < len; i++, elem++) { in bnx2x_mcast_refresh_registry_e1()
3640 elem->mac); in bnx2x_mcast_refresh_registry_e1()
3642 elem->mac); in bnx2x_mcast_refresh_registry_e1()
3643 list_add_tail(&elem->link, in bnx2x_mcast_refresh_registry_e1()
3647 elem = list_first_entry(&o->registry.exact_match.macs, in bnx2x_mcast_refresh_registry_e1()
3650 kfree(elem); in bnx2x_mcast_refresh_registry_e1()