Lines Matching refs:payload

30 #define MLXSW_REG_ZERO(type, payload) memset(payload, 0, MLXSW_REG(type)->len)  argument
49 static inline void mlxsw_reg_sgcr_pack(char *payload, bool llb) in mlxsw_reg_sgcr_pack() argument
51 MLXSW_REG_ZERO(sgcr, payload); in mlxsw_reg_sgcr_pack()
52 mlxsw_reg_sgcr_llb_set(payload, !!llb); in mlxsw_reg_sgcr_pack()
118 static inline void mlxsw_reg_sspr_pack(char *payload, u16 local_port) in mlxsw_reg_sspr_pack() argument
120 MLXSW_REG_ZERO(sspr, payload); in mlxsw_reg_sspr_pack()
121 mlxsw_reg_sspr_m_set(payload, 1); in mlxsw_reg_sspr_pack()
122 mlxsw_reg_sspr_local_port_set(payload, local_port); in mlxsw_reg_sspr_pack()
123 mlxsw_reg_sspr_sub_port_set(payload, 0); in mlxsw_reg_sspr_pack()
124 mlxsw_reg_sspr_system_port_set(payload, local_port); in mlxsw_reg_sspr_pack()
152 static inline void mlxsw_reg_sfdat_pack(char *payload, u32 age_time) in mlxsw_reg_sfdat_pack() argument
154 MLXSW_REG_ZERO(sfdat, payload); in mlxsw_reg_sfdat_pack()
155 mlxsw_reg_sfdat_swid_set(payload, 0); in mlxsw_reg_sfdat_pack()
156 mlxsw_reg_sfdat_age_time_set(payload, age_time); in mlxsw_reg_sfdat_pack()
233 static inline void mlxsw_reg_sfd_pack(char *payload, enum mlxsw_reg_sfd_op op, in mlxsw_reg_sfd_pack() argument
236 MLXSW_REG_ZERO(sfd, payload); in mlxsw_reg_sfd_pack()
237 mlxsw_reg_sfd_op_set(payload, op); in mlxsw_reg_sfd_pack()
238 mlxsw_reg_sfd_record_locator_set(payload, record_locator); in mlxsw_reg_sfd_pack()
366 static inline void mlxsw_reg_sfd_rec_pack(char *payload, int rec_index, in mlxsw_reg_sfd_rec_pack() argument
371 u8 num_rec = mlxsw_reg_sfd_num_rec_get(payload); in mlxsw_reg_sfd_rec_pack()
374 mlxsw_reg_sfd_num_rec_set(payload, rec_index + 1); in mlxsw_reg_sfd_rec_pack()
375 mlxsw_reg_sfd_rec_swid_set(payload, rec_index, 0); in mlxsw_reg_sfd_rec_pack()
376 mlxsw_reg_sfd_rec_type_set(payload, rec_index, rec_type); in mlxsw_reg_sfd_rec_pack()
377 mlxsw_reg_sfd_rec_mac_memcpy_to(payload, rec_index, mac); in mlxsw_reg_sfd_rec_pack()
378 mlxsw_reg_sfd_rec_action_set(payload, rec_index, action); in mlxsw_reg_sfd_rec_pack()
381 static inline void mlxsw_reg_sfd_uc_pack(char *payload, int rec_index, in mlxsw_reg_sfd_uc_pack() argument
387 mlxsw_reg_sfd_rec_pack(payload, rec_index, in mlxsw_reg_sfd_uc_pack()
389 mlxsw_reg_sfd_rec_policy_set(payload, rec_index, policy); in mlxsw_reg_sfd_uc_pack()
390 mlxsw_reg_sfd_uc_sub_port_set(payload, rec_index, 0); in mlxsw_reg_sfd_uc_pack()
391 mlxsw_reg_sfd_uc_fid_vid_set(payload, rec_index, fid_vid); in mlxsw_reg_sfd_uc_pack()
392 mlxsw_reg_sfd_uc_set_vid_set(payload, rec_index, vid ? true : false); in mlxsw_reg_sfd_uc_pack()
393 mlxsw_reg_sfd_uc_vid_set(payload, rec_index, vid); in mlxsw_reg_sfd_uc_pack()
394 mlxsw_reg_sfd_uc_system_port_set(payload, rec_index, local_port); in mlxsw_reg_sfd_uc_pack()
447 mlxsw_reg_sfd_uc_lag_pack(char *payload, int rec_index, in mlxsw_reg_sfd_uc_lag_pack() argument
453 mlxsw_reg_sfd_rec_pack(payload, rec_index, in mlxsw_reg_sfd_uc_lag_pack()
456 mlxsw_reg_sfd_rec_policy_set(payload, rec_index, policy); in mlxsw_reg_sfd_uc_lag_pack()
457 mlxsw_reg_sfd_uc_lag_sub_port_set(payload, rec_index, 0); in mlxsw_reg_sfd_uc_lag_pack()
458 mlxsw_reg_sfd_uc_lag_fid_vid_set(payload, rec_index, fid_vid); in mlxsw_reg_sfd_uc_lag_pack()
459 mlxsw_reg_sfd_uc_lag_set_vid_set(payload, rec_index, true); in mlxsw_reg_sfd_uc_lag_pack()
460 mlxsw_reg_sfd_uc_lag_lag_vid_set(payload, rec_index, lag_vid); in mlxsw_reg_sfd_uc_lag_pack()
461 mlxsw_reg_sfd_uc_lag_lag_id_set(payload, rec_index, lag_id); in mlxsw_reg_sfd_uc_lag_pack()
492 mlxsw_reg_sfd_mc_pack(char *payload, int rec_index, in mlxsw_reg_sfd_mc_pack() argument
496 mlxsw_reg_sfd_rec_pack(payload, rec_index, in mlxsw_reg_sfd_mc_pack()
498 mlxsw_reg_sfd_mc_pgi_set(payload, rec_index, 0x1FFF); in mlxsw_reg_sfd_mc_pack()
499 mlxsw_reg_sfd_mc_fid_vid_set(payload, rec_index, fid_vid); in mlxsw_reg_sfd_mc_pack()
500 mlxsw_reg_sfd_mc_mid_set(payload, rec_index, mid); in mlxsw_reg_sfd_mc_pack()
542 mlxsw_reg_sfd_uc_tunnel_pack(char *payload, int rec_index, in mlxsw_reg_sfd_uc_tunnel_pack() argument
548 mlxsw_reg_sfd_rec_pack(payload, rec_index, in mlxsw_reg_sfd_uc_tunnel_pack()
551 mlxsw_reg_sfd_rec_policy_set(payload, rec_index, policy); in mlxsw_reg_sfd_uc_tunnel_pack()
552 mlxsw_reg_sfd_uc_tunnel_fid_set(payload, rec_index, fid); in mlxsw_reg_sfd_uc_tunnel_pack()
553 mlxsw_reg_sfd_uc_tunnel_protocol_set(payload, rec_index, proto); in mlxsw_reg_sfd_uc_tunnel_pack()
557 mlxsw_reg_sfd_uc_tunnel_pack4(char *payload, int rec_index, in mlxsw_reg_sfd_uc_tunnel_pack4() argument
562 mlxsw_reg_sfd_uc_tunnel_uip_msb_set(payload, rec_index, uip >> 24); in mlxsw_reg_sfd_uc_tunnel_pack4()
563 mlxsw_reg_sfd_uc_tunnel_uip_lsb_set(payload, rec_index, uip); in mlxsw_reg_sfd_uc_tunnel_pack4()
564 mlxsw_reg_sfd_uc_tunnel_pack(payload, rec_index, policy, mac, fid, in mlxsw_reg_sfd_uc_tunnel_pack4()
570 mlxsw_reg_sfd_uc_tunnel_pack6(char *payload, int rec_index, const char *mac, in mlxsw_reg_sfd_uc_tunnel_pack6() argument
574 mlxsw_reg_sfd_uc_tunnel_uip_lsb_set(payload, rec_index, uip_ptr); in mlxsw_reg_sfd_uc_tunnel_pack6()
576 mlxsw_reg_sfd_uc_tunnel_pack(payload, rec_index, in mlxsw_reg_sfd_uc_tunnel_pack6()
625 static inline void mlxsw_reg_sfn_pack(char *payload) in mlxsw_reg_sfn_pack() argument
627 MLXSW_REG_ZERO(sfn, payload); in mlxsw_reg_sfn_pack()
628 mlxsw_reg_sfn_swid_set(payload, 0); in mlxsw_reg_sfn_pack()
629 mlxsw_reg_sfn_end_set(payload, 0); in mlxsw_reg_sfn_pack()
630 mlxsw_reg_sfn_num_rec_set(payload, MLXSW_REG_SFN_REC_MAX_COUNT); in mlxsw_reg_sfn_pack()
691 static inline void mlxsw_reg_sfn_mac_unpack(char *payload, int rec_index, in mlxsw_reg_sfn_mac_unpack() argument
695 mlxsw_reg_sfn_rec_mac_memcpy_from(payload, rec_index, mac); in mlxsw_reg_sfn_mac_unpack()
696 *p_vid = mlxsw_reg_sfn_mac_fid_get(payload, rec_index); in mlxsw_reg_sfn_mac_unpack()
697 *p_local_port = mlxsw_reg_sfn_mac_system_port_get(payload, rec_index); in mlxsw_reg_sfn_mac_unpack()
707 static inline void mlxsw_reg_sfn_mac_lag_unpack(char *payload, int rec_index, in mlxsw_reg_sfn_mac_lag_unpack() argument
711 mlxsw_reg_sfn_rec_mac_memcpy_from(payload, rec_index, mac); in mlxsw_reg_sfn_mac_lag_unpack()
712 *p_vid = mlxsw_reg_sfn_mac_fid_get(payload, rec_index); in mlxsw_reg_sfn_mac_lag_unpack()
713 *p_lag_id = mlxsw_reg_sfn_mac_lag_lag_id_get(payload, rec_index); in mlxsw_reg_sfn_mac_lag_unpack()
755 mlxsw_reg_sfn_uc_tunnel_unpack(char *payload, int rec_index, char *mac, in mlxsw_reg_sfn_uc_tunnel_unpack() argument
761 mlxsw_reg_sfn_rec_mac_memcpy_from(payload, rec_index, mac); in mlxsw_reg_sfn_uc_tunnel_unpack()
762 *p_fid = mlxsw_reg_sfn_mac_fid_get(payload, rec_index); in mlxsw_reg_sfn_uc_tunnel_unpack()
763 uip_msb = mlxsw_reg_sfn_uc_tunnel_uip_msb_get(payload, rec_index); in mlxsw_reg_sfn_uc_tunnel_unpack()
764 uip_lsb = mlxsw_reg_sfn_uc_tunnel_uip_lsb_get(payload, rec_index); in mlxsw_reg_sfn_uc_tunnel_unpack()
766 *p_proto = mlxsw_reg_sfn_uc_tunnel_protocol_get(payload, rec_index); in mlxsw_reg_sfn_uc_tunnel_unpack()
801 static inline void mlxsw_reg_spms_pack(char *payload, u16 local_port) in mlxsw_reg_spms_pack() argument
803 MLXSW_REG_ZERO(spms, payload); in mlxsw_reg_spms_pack()
804 mlxsw_reg_spms_local_port_set(payload, local_port); in mlxsw_reg_spms_pack()
807 static inline void mlxsw_reg_spms_vid_pack(char *payload, u16 vid, in mlxsw_reg_spms_vid_pack() argument
810 mlxsw_reg_spms_state_set(payload, vid, state); in mlxsw_reg_spms_vid_pack()
869 static inline void mlxsw_reg_spvid_pack(char *payload, u16 local_port, u16 pvid, in mlxsw_reg_spvid_pack() argument
872 MLXSW_REG_ZERO(spvid, payload); in mlxsw_reg_spvid_pack()
873 mlxsw_reg_spvid_local_port_set(payload, local_port); in mlxsw_reg_spvid_pack()
874 mlxsw_reg_spvid_pvid_set(payload, pvid); in mlxsw_reg_spvid_pack()
875 mlxsw_reg_spvid_et_vlan_set(payload, et_vlan); in mlxsw_reg_spvid_pack()
960 static inline void mlxsw_reg_spvm_pack(char *payload, u16 local_port, in mlxsw_reg_spvm_pack() argument
967 MLXSW_REG_ZERO(spvm, payload); in mlxsw_reg_spvm_pack()
968 mlxsw_reg_spvm_local_port_set(payload, local_port); in mlxsw_reg_spvm_pack()
969 mlxsw_reg_spvm_num_rec_set(payload, size); in mlxsw_reg_spvm_pack()
972 mlxsw_reg_spvm_rec_i_set(payload, i, is_member); in mlxsw_reg_spvm_pack()
973 mlxsw_reg_spvm_rec_e_set(payload, i, is_member); in mlxsw_reg_spvm_pack()
974 mlxsw_reg_spvm_rec_u_set(payload, i, untagged); in mlxsw_reg_spvm_pack()
975 mlxsw_reg_spvm_rec_vid_set(payload, i, vid_begin + i); in mlxsw_reg_spvm_pack()
1022 static inline void mlxsw_reg_spaft_pack(char *payload, u16 local_port, in mlxsw_reg_spaft_pack() argument
1025 MLXSW_REG_ZERO(spaft, payload); in mlxsw_reg_spaft_pack()
1026 mlxsw_reg_spaft_local_port_set(payload, local_port); in mlxsw_reg_spaft_pack()
1027 mlxsw_reg_spaft_allow_untagged_set(payload, allow_untagged); in mlxsw_reg_spaft_pack()
1028 mlxsw_reg_spaft_allow_prio_tagged_set(payload, allow_untagged); in mlxsw_reg_spaft_pack()
1029 mlxsw_reg_spaft_allow_tagged_set(payload, true); in mlxsw_reg_spaft_pack()
1117 mlxsw_reg_sfgc_pack(char *payload, enum mlxsw_reg_sfgc_type type, in mlxsw_reg_sfgc_pack() argument
1122 MLXSW_REG_ZERO(sfgc, payload); in mlxsw_reg_sfgc_pack()
1123 mlxsw_reg_sfgc_type_set(payload, type); in mlxsw_reg_sfgc_pack()
1124 mlxsw_reg_sfgc_bridge_type_set(payload, bridge_type); in mlxsw_reg_sfgc_pack()
1125 mlxsw_reg_sfgc_table_type_set(payload, table_type); in mlxsw_reg_sfgc_pack()
1126 mlxsw_reg_sfgc_flood_table_set(payload, flood_table); in mlxsw_reg_sfgc_pack()
1127 mlxsw_reg_sfgc_mid_base_set(payload, mid_base); in mlxsw_reg_sfgc_pack()
1181 static inline void mlxsw_reg_sfdf_pack(char *payload, in mlxsw_reg_sfdf_pack() argument
1184 MLXSW_REG_ZERO(sfdf, payload); in mlxsw_reg_sfdf_pack()
1185 mlxsw_reg_sfdf_flush_type_set(payload, type); in mlxsw_reg_sfdf_pack()
1186 mlxsw_reg_sfdf_flush_static_set(payload, true); in mlxsw_reg_sfdf_pack()
1252 static inline void mlxsw_reg_sldr_lag_create_pack(char *payload, u8 lag_id) in mlxsw_reg_sldr_lag_create_pack() argument
1254 MLXSW_REG_ZERO(sldr, payload); in mlxsw_reg_sldr_lag_create_pack()
1255 mlxsw_reg_sldr_op_set(payload, MLXSW_REG_SLDR_OP_LAG_CREATE); in mlxsw_reg_sldr_lag_create_pack()
1256 mlxsw_reg_sldr_lag_id_set(payload, lag_id); in mlxsw_reg_sldr_lag_create_pack()
1259 static inline void mlxsw_reg_sldr_lag_destroy_pack(char *payload, u8 lag_id) in mlxsw_reg_sldr_lag_destroy_pack() argument
1261 MLXSW_REG_ZERO(sldr, payload); in mlxsw_reg_sldr_lag_destroy_pack()
1262 mlxsw_reg_sldr_op_set(payload, MLXSW_REG_SLDR_OP_LAG_DESTROY); in mlxsw_reg_sldr_lag_destroy_pack()
1263 mlxsw_reg_sldr_lag_id_set(payload, lag_id); in mlxsw_reg_sldr_lag_destroy_pack()
1280 static inline void mlxsw_reg_sldr_lag_add_port_pack(char *payload, u8 lag_id, in mlxsw_reg_sldr_lag_add_port_pack() argument
1283 MLXSW_REG_ZERO(sldr, payload); in mlxsw_reg_sldr_lag_add_port_pack()
1284 mlxsw_reg_sldr_op_set(payload, MLXSW_REG_SLDR_OP_LAG_ADD_PORT_LIST); in mlxsw_reg_sldr_lag_add_port_pack()
1285 mlxsw_reg_sldr_lag_id_set(payload, lag_id); in mlxsw_reg_sldr_lag_add_port_pack()
1286 mlxsw_reg_sldr_num_ports_set(payload, 1); in mlxsw_reg_sldr_lag_add_port_pack()
1287 mlxsw_reg_sldr_system_port_set(payload, 0, local_port); in mlxsw_reg_sldr_lag_add_port_pack()
1290 static inline void mlxsw_reg_sldr_lag_remove_port_pack(char *payload, u8 lag_id, in mlxsw_reg_sldr_lag_remove_port_pack() argument
1293 MLXSW_REG_ZERO(sldr, payload); in mlxsw_reg_sldr_lag_remove_port_pack()
1294 mlxsw_reg_sldr_op_set(payload, MLXSW_REG_SLDR_OP_LAG_REMOVE_PORT_LIST); in mlxsw_reg_sldr_lag_remove_port_pack()
1295 mlxsw_reg_sldr_lag_id_set(payload, lag_id); in mlxsw_reg_sldr_lag_remove_port_pack()
1296 mlxsw_reg_sldr_num_ports_set(payload, 1); in mlxsw_reg_sldr_lag_remove_port_pack()
1297 mlxsw_reg_sldr_system_port_set(payload, 0, local_port); in mlxsw_reg_sldr_lag_remove_port_pack()
1411 static inline void mlxsw_reg_slcr_pack(char *payload, u16 lag_hash, u32 seed) in mlxsw_reg_slcr_pack() argument
1413 MLXSW_REG_ZERO(slcr, payload); in mlxsw_reg_slcr_pack()
1414 mlxsw_reg_slcr_pp_set(payload, MLXSW_REG_SLCR_PP_GLOBAL); in mlxsw_reg_slcr_pack()
1415 mlxsw_reg_slcr_type_set(payload, MLXSW_REG_SLCR_TYPE_CRC); in mlxsw_reg_slcr_pack()
1416 mlxsw_reg_slcr_lag_hash_set(payload, lag_hash); in mlxsw_reg_slcr_pack()
1417 mlxsw_reg_slcr_seed_set(payload, seed); in mlxsw_reg_slcr_pack()
1464 static inline void mlxsw_reg_slcor_pack(char *payload, in mlxsw_reg_slcor_pack() argument
1468 MLXSW_REG_ZERO(slcor, payload); in mlxsw_reg_slcor_pack()
1469 mlxsw_reg_slcor_col_set(payload, col); in mlxsw_reg_slcor_pack()
1470 mlxsw_reg_slcor_local_port_set(payload, local_port); in mlxsw_reg_slcor_pack()
1471 mlxsw_reg_slcor_lag_id_set(payload, lag_id); in mlxsw_reg_slcor_pack()
1474 static inline void mlxsw_reg_slcor_port_add_pack(char *payload, in mlxsw_reg_slcor_port_add_pack() argument
1478 mlxsw_reg_slcor_pack(payload, local_port, lag_id, in mlxsw_reg_slcor_port_add_pack()
1480 mlxsw_reg_slcor_port_index_set(payload, port_index); in mlxsw_reg_slcor_port_add_pack()
1483 static inline void mlxsw_reg_slcor_port_remove_pack(char *payload, in mlxsw_reg_slcor_port_remove_pack() argument
1486 mlxsw_reg_slcor_pack(payload, local_port, lag_id, in mlxsw_reg_slcor_port_remove_pack()
1490 static inline void mlxsw_reg_slcor_col_enable_pack(char *payload, in mlxsw_reg_slcor_col_enable_pack() argument
1493 mlxsw_reg_slcor_pack(payload, local_port, lag_id, in mlxsw_reg_slcor_col_enable_pack()
1497 static inline void mlxsw_reg_slcor_col_disable_pack(char *payload, in mlxsw_reg_slcor_col_disable_pack() argument
1500 mlxsw_reg_slcor_pack(payload, local_port, lag_id, in mlxsw_reg_slcor_col_disable_pack()
1545 static inline void mlxsw_reg_spmlr_pack(char *payload, u16 local_port, in mlxsw_reg_spmlr_pack() argument
1548 MLXSW_REG_ZERO(spmlr, payload); in mlxsw_reg_spmlr_pack()
1549 mlxsw_reg_spmlr_local_port_set(payload, local_port); in mlxsw_reg_spmlr_pack()
1550 mlxsw_reg_spmlr_sub_port_set(payload, 0); in mlxsw_reg_spmlr_pack()
1551 mlxsw_reg_spmlr_learn_mode_set(payload, mode); in mlxsw_reg_spmlr_pack()
1659 static inline void __mlxsw_reg_svfa_pack(char *payload, in __mlxsw_reg_svfa_pack() argument
1663 MLXSW_REG_ZERO(svfa, payload); in __mlxsw_reg_svfa_pack()
1664 mlxsw_reg_svfa_swid_set(payload, 0); in __mlxsw_reg_svfa_pack()
1665 mlxsw_reg_svfa_mapping_table_set(payload, mt); in __mlxsw_reg_svfa_pack()
1666 mlxsw_reg_svfa_v_set(payload, valid); in __mlxsw_reg_svfa_pack()
1667 mlxsw_reg_svfa_fid_set(payload, fid); in __mlxsw_reg_svfa_pack()
1668 mlxsw_reg_svfa_irif_v_set(payload, irif_v); in __mlxsw_reg_svfa_pack()
1669 mlxsw_reg_svfa_irif_set(payload, irif_v ? irif : 0); in __mlxsw_reg_svfa_pack()
1672 static inline void mlxsw_reg_svfa_port_vid_pack(char *payload, u16 local_port, in mlxsw_reg_svfa_port_vid_pack() argument
1678 __mlxsw_reg_svfa_pack(payload, mt, valid, fid, irif_v, irif); in mlxsw_reg_svfa_port_vid_pack()
1679 mlxsw_reg_svfa_local_port_set(payload, local_port); in mlxsw_reg_svfa_port_vid_pack()
1680 mlxsw_reg_svfa_vid_set(payload, vid); in mlxsw_reg_svfa_port_vid_pack()
1683 static inline void mlxsw_reg_svfa_vid_pack(char *payload, bool valid, u16 fid, in mlxsw_reg_svfa_vid_pack() argument
1688 __mlxsw_reg_svfa_pack(payload, mt, valid, fid, irif_v, irif); in mlxsw_reg_svfa_vid_pack()
1689 mlxsw_reg_svfa_vid_set(payload, vid); in mlxsw_reg_svfa_vid_pack()
1692 static inline void mlxsw_reg_svfa_vni_pack(char *payload, bool valid, u16 fid, in mlxsw_reg_svfa_vni_pack() argument
1697 __mlxsw_reg_svfa_pack(payload, mt, valid, fid, irif_v, irif); in mlxsw_reg_svfa_vni_pack()
1698 mlxsw_reg_svfa_vni_set(payload, vni); in mlxsw_reg_svfa_vni_pack()
1793 static inline void mlxsw_reg_spvtr_pack(char *payload, bool tport, in mlxsw_reg_spvtr_pack() argument
1797 MLXSW_REG_ZERO(spvtr, payload); in mlxsw_reg_spvtr_pack()
1798 mlxsw_reg_spvtr_tport_set(payload, tport); in mlxsw_reg_spvtr_pack()
1799 mlxsw_reg_spvtr_local_port_set(payload, local_port); in mlxsw_reg_spvtr_pack()
1800 mlxsw_reg_spvtr_ipvid_mode_set(payload, ipvid_mode); in mlxsw_reg_spvtr_pack()
1801 mlxsw_reg_spvtr_ipve_set(payload, true); in mlxsw_reg_spvtr_pack()
1829 static inline void mlxsw_reg_svpe_pack(char *payload, u16 local_port, in mlxsw_reg_svpe_pack() argument
1832 MLXSW_REG_ZERO(svpe, payload); in mlxsw_reg_svpe_pack()
1833 mlxsw_reg_svpe_local_port_set(payload, local_port); in mlxsw_reg_svpe_pack()
1834 mlxsw_reg_svpe_vp_en_set(payload, enable); in mlxsw_reg_svpe_pack()
1969 static inline void mlxsw_reg_sfmr_pack(char *payload, in mlxsw_reg_sfmr_pack() argument
1975 MLXSW_REG_ZERO(sfmr, payload); in mlxsw_reg_sfmr_pack()
1976 mlxsw_reg_sfmr_op_set(payload, op); in mlxsw_reg_sfmr_pack()
1977 mlxsw_reg_sfmr_fid_set(payload, fid); in mlxsw_reg_sfmr_pack()
1978 mlxsw_reg_sfmr_fid_offset_set(payload, fid_offset); in mlxsw_reg_sfmr_pack()
1979 mlxsw_reg_sfmr_vtfp_set(payload, false); in mlxsw_reg_sfmr_pack()
1980 mlxsw_reg_sfmr_vv_set(payload, false); in mlxsw_reg_sfmr_pack()
1981 mlxsw_reg_sfmr_flood_rsp_set(payload, flood_rsp); in mlxsw_reg_sfmr_pack()
1982 mlxsw_reg_sfmr_flood_bridge_type_set(payload, bridge_type); in mlxsw_reg_sfmr_pack()
1983 mlxsw_reg_sfmr_smpe_valid_set(payload, smpe_valid); in mlxsw_reg_sfmr_pack()
1984 mlxsw_reg_sfmr_smpe_set(payload, smpe); in mlxsw_reg_sfmr_pack()
2030 static inline void mlxsw_reg_spvmlr_pack(char *payload, u16 local_port, in mlxsw_reg_spvmlr_pack() argument
2039 MLXSW_REG_ZERO(spvmlr, payload); in mlxsw_reg_spvmlr_pack()
2040 mlxsw_reg_spvmlr_local_port_set(payload, local_port); in mlxsw_reg_spvmlr_pack()
2041 mlxsw_reg_spvmlr_num_rec_set(payload, num_rec); in mlxsw_reg_spvmlr_pack()
2044 mlxsw_reg_spvmlr_rec_learn_enable_set(payload, i, learn_enable); in mlxsw_reg_spvmlr_pack()
2045 mlxsw_reg_spvmlr_rec_vid_set(payload, i, vid_begin + i); in mlxsw_reg_spvmlr_pack()
2133 static inline void mlxsw_reg_spvc_pack(char *payload, u16 local_port, bool et1, in mlxsw_reg_spvc_pack() argument
2136 MLXSW_REG_ZERO(spvc, payload); in mlxsw_reg_spvc_pack()
2137 mlxsw_reg_spvc_local_port_set(payload, local_port); in mlxsw_reg_spvc_pack()
2141 mlxsw_reg_spvc_inner_et1_set(payload, 1); in mlxsw_reg_spvc_pack()
2142 mlxsw_reg_spvc_inner_et0_set(payload, 1); in mlxsw_reg_spvc_pack()
2143 mlxsw_reg_spvc_et1_set(payload, et1); in mlxsw_reg_spvc_pack()
2144 mlxsw_reg_spvc_et0_set(payload, et0); in mlxsw_reg_spvc_pack()
2174 static inline void mlxsw_reg_spevet_pack(char *payload, u16 local_port, in mlxsw_reg_spevet_pack() argument
2177 MLXSW_REG_ZERO(spevet, payload); in mlxsw_reg_spevet_pack()
2178 mlxsw_reg_spevet_local_port_set(payload, local_port); in mlxsw_reg_spevet_pack()
2179 mlxsw_reg_spevet_et_vlan_set(payload, et_vlan); in mlxsw_reg_spevet_pack()
2212 static inline void mlxsw_reg_smpe_pack(char *payload, u16 local_port, in mlxsw_reg_smpe_pack() argument
2215 MLXSW_REG_ZERO(smpe, payload); in mlxsw_reg_smpe_pack()
2216 mlxsw_reg_smpe_local_port_set(payload, local_port); in mlxsw_reg_smpe_pack()
2217 mlxsw_reg_smpe_smpe_index_set(payload, smpe_index); in mlxsw_reg_smpe_pack()
2218 mlxsw_reg_smpe_evid_set(payload, evid); in mlxsw_reg_smpe_pack()
2274 static inline void mlxsw_reg_smid2_pack(char *payload, u16 mid, u16 port, in mlxsw_reg_smid2_pack() argument
2277 MLXSW_REG_ZERO(smid2, payload); in mlxsw_reg_smid2_pack()
2278 mlxsw_reg_smid2_swid_set(payload, 0); in mlxsw_reg_smid2_pack()
2279 mlxsw_reg_smid2_mid_set(payload, mid); in mlxsw_reg_smid2_pack()
2280 mlxsw_reg_smid2_port_set(payload, port, set); in mlxsw_reg_smid2_pack()
2281 mlxsw_reg_smid2_port_mask_set(payload, port, 1); in mlxsw_reg_smid2_pack()
2282 mlxsw_reg_smid2_smpe_valid_set(payload, smpe_valid); in mlxsw_reg_smid2_pack()
2283 mlxsw_reg_smid2_smpe_set(payload, smpe_valid ? smpe : 0); in mlxsw_reg_smid2_pack()
2336 static inline void mlxsw_reg_cwtp_pack(char *payload, u16 local_port, in mlxsw_reg_cwtp_pack() argument
2341 MLXSW_REG_ZERO(cwtp, payload); in mlxsw_reg_cwtp_pack()
2342 mlxsw_reg_cwtp_local_port_set(payload, local_port); in mlxsw_reg_cwtp_pack()
2343 mlxsw_reg_cwtp_traffic_class_set(payload, traffic_class); in mlxsw_reg_cwtp_pack()
2346 mlxsw_reg_cwtp_profile_min_set(payload, i, in mlxsw_reg_cwtp_pack()
2348 mlxsw_reg_cwtp_profile_max_set(payload, i, in mlxsw_reg_cwtp_pack()
2356 mlxsw_reg_cwtp_profile_pack(char *payload, u8 profile, u32 min, u32 max, in mlxsw_reg_cwtp_profile_pack() argument
2361 mlxsw_reg_cwtp_profile_min_set(payload, index, min); in mlxsw_reg_cwtp_profile_pack()
2362 mlxsw_reg_cwtp_profile_max_set(payload, index, max); in mlxsw_reg_cwtp_profile_pack()
2363 mlxsw_reg_cwtp_profile_percent_set(payload, index, probability); in mlxsw_reg_cwtp_profile_pack()
2454 static inline void mlxsw_reg_cwtpm_pack(char *payload, u16 local_port, in mlxsw_reg_cwtpm_pack() argument
2458 MLXSW_REG_ZERO(cwtpm, payload); in mlxsw_reg_cwtpm_pack()
2459 mlxsw_reg_cwtpm_local_port_set(payload, local_port); in mlxsw_reg_cwtpm_pack()
2460 mlxsw_reg_cwtpm_traffic_class_set(payload, traffic_class); in mlxsw_reg_cwtpm_pack()
2461 mlxsw_reg_cwtpm_ew_set(payload, wred); in mlxsw_reg_cwtpm_pack()
2462 mlxsw_reg_cwtpm_ee_set(payload, ecn); in mlxsw_reg_cwtpm_pack()
2463 mlxsw_reg_cwtpm_tcp_g_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2464 mlxsw_reg_cwtpm_tcp_y_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2465 mlxsw_reg_cwtpm_tcp_r_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2466 mlxsw_reg_cwtpm_ntcp_g_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2467 mlxsw_reg_cwtpm_ntcp_y_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2468 mlxsw_reg_cwtpm_ntcp_r_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2487 static inline void mlxsw_reg_pgcr_pack(char *payload, u32 pointer_base) in mlxsw_reg_pgcr_pack() argument
2489 MLXSW_REG_ZERO(pgcr, payload); in mlxsw_reg_pgcr_pack()
2490 mlxsw_reg_pgcr_default_action_pointer_base_set(payload, pointer_base); in mlxsw_reg_pgcr_pack()
2543 static inline void mlxsw_reg_ppbt_pack(char *payload, enum mlxsw_reg_pxbt_e e, in mlxsw_reg_ppbt_pack() argument
2547 MLXSW_REG_ZERO(ppbt, payload); in mlxsw_reg_ppbt_pack()
2548 mlxsw_reg_ppbt_e_set(payload, e); in mlxsw_reg_ppbt_pack()
2549 mlxsw_reg_ppbt_op_set(payload, op); in mlxsw_reg_ppbt_pack()
2550 mlxsw_reg_ppbt_local_port_set(payload, local_port); in mlxsw_reg_ppbt_pack()
2551 mlxsw_reg_ppbt_g_set(payload, true); in mlxsw_reg_ppbt_pack()
2552 mlxsw_reg_ppbt_acl_info_set(payload, acl_info); in mlxsw_reg_ppbt_pack()
2588 static inline void mlxsw_reg_pacl_pack(char *payload, u16 acl_id, in mlxsw_reg_pacl_pack() argument
2591 MLXSW_REG_ZERO(pacl, payload); in mlxsw_reg_pacl_pack()
2592 mlxsw_reg_pacl_acl_id_set(payload, acl_id); in mlxsw_reg_pacl_pack()
2593 mlxsw_reg_pacl_v_set(payload, valid); in mlxsw_reg_pacl_pack()
2594 mlxsw_reg_pacl_tcam_region_info_memcpy_to(payload, tcam_region_info); in mlxsw_reg_pacl_pack()
2642 static inline void mlxsw_reg_pagt_pack(char *payload, u16 acl_group_id) in mlxsw_reg_pagt_pack() argument
2644 MLXSW_REG_ZERO(pagt, payload); in mlxsw_reg_pagt_pack()
2645 mlxsw_reg_pagt_acl_group_id_set(payload, acl_group_id); in mlxsw_reg_pagt_pack()
2648 static inline void mlxsw_reg_pagt_acl_id_pack(char *payload, int index, in mlxsw_reg_pagt_acl_id_pack() argument
2651 u8 size = mlxsw_reg_pagt_size_get(payload); in mlxsw_reg_pagt_acl_id_pack()
2654 mlxsw_reg_pagt_size_set(payload, index + 1); in mlxsw_reg_pagt_acl_id_pack()
2655 mlxsw_reg_pagt_multi_set(payload, index, multi); in mlxsw_reg_pagt_acl_id_pack()
2656 mlxsw_reg_pagt_acl_id_set(payload, index, acl_id); in mlxsw_reg_pagt_acl_id_pack()
2744 static inline void mlxsw_reg_ptar_pack(char *payload, enum mlxsw_reg_ptar_op op, in mlxsw_reg_ptar_pack() argument
2749 MLXSW_REG_ZERO(ptar, payload); in mlxsw_reg_ptar_pack()
2750 mlxsw_reg_ptar_op_set(payload, op); in mlxsw_reg_ptar_pack()
2751 mlxsw_reg_ptar_action_set_type_set(payload, 2); /* "flexible" */ in mlxsw_reg_ptar_pack()
2752 mlxsw_reg_ptar_key_type_set(payload, key_type); in mlxsw_reg_ptar_pack()
2753 mlxsw_reg_ptar_region_size_set(payload, region_size); in mlxsw_reg_ptar_pack()
2754 mlxsw_reg_ptar_region_id_set(payload, region_id); in mlxsw_reg_ptar_pack()
2755 mlxsw_reg_ptar_tcam_region_info_memcpy_to(payload, tcam_region_info); in mlxsw_reg_ptar_pack()
2758 static inline void mlxsw_reg_ptar_key_id_pack(char *payload, int index, in mlxsw_reg_ptar_key_id_pack() argument
2761 mlxsw_reg_ptar_flexible_key_id_set(payload, index, key_id); in mlxsw_reg_ptar_key_id_pack()
2764 static inline void mlxsw_reg_ptar_unpack(char *payload, char *tcam_region_info) in mlxsw_reg_ptar_unpack() argument
2766 mlxsw_reg_ptar_tcam_region_info_memcpy_from(payload, tcam_region_info); in mlxsw_reg_ptar_unpack()
2791 static inline void mlxsw_reg_ppbs_pack(char *payload, u32 pbs_ptr, in mlxsw_reg_ppbs_pack() argument
2794 MLXSW_REG_ZERO(ppbs, payload); in mlxsw_reg_ppbs_pack()
2795 mlxsw_reg_ppbs_pbs_ptr_set(payload, pbs_ptr); in mlxsw_reg_ppbs_pack()
2796 mlxsw_reg_ppbs_system_port_set(payload, system_port); in mlxsw_reg_ppbs_pack()
2858 static inline void mlxsw_reg_prcr_pack(char *payload, enum mlxsw_reg_prcr_op op, in mlxsw_reg_prcr_pack() argument
2864 MLXSW_REG_ZERO(prcr, payload); in mlxsw_reg_prcr_pack()
2865 mlxsw_reg_prcr_op_set(payload, op); in mlxsw_reg_prcr_pack()
2866 mlxsw_reg_prcr_offset_set(payload, src_offset); in mlxsw_reg_prcr_pack()
2867 mlxsw_reg_prcr_size_set(payload, size); in mlxsw_reg_prcr_pack()
2868 mlxsw_reg_prcr_tcam_region_info_memcpy_to(payload, in mlxsw_reg_prcr_pack()
2870 mlxsw_reg_prcr_dest_offset_set(payload, dest_offset); in mlxsw_reg_prcr_pack()
2871 mlxsw_reg_prcr_dest_tcam_region_info_memcpy_to(payload, in mlxsw_reg_prcr_pack()
2917 static inline void mlxsw_reg_pefa_pack(char *payload, u32 index, bool ca, in mlxsw_reg_pefa_pack() argument
2920 MLXSW_REG_ZERO(pefa, payload); in mlxsw_reg_pefa_pack()
2921 mlxsw_reg_pefa_index_set(payload, index); in mlxsw_reg_pefa_pack()
2922 mlxsw_reg_pefa_ca_set(payload, ca); in mlxsw_reg_pefa_pack()
2924 mlxsw_reg_pefa_flex_action_set_memcpy_to(payload, in mlxsw_reg_pefa_pack()
2928 static inline void mlxsw_reg_pefa_unpack(char *payload, bool *p_a) in mlxsw_reg_pefa_unpack() argument
2930 *p_a = mlxsw_reg_pefa_a_get(payload); in mlxsw_reg_pefa_unpack()
2962 mlxsw_reg_pemrbt_pack(char *payload, enum mlxsw_reg_pemrbt_protocol protocol, in mlxsw_reg_pemrbt_pack() argument
2965 MLXSW_REG_ZERO(pemrbt, payload); in mlxsw_reg_pemrbt_pack()
2966 mlxsw_reg_pemrbt_protocol_set(payload, protocol); in mlxsw_reg_pemrbt_pack()
2967 mlxsw_reg_pemrbt_group_id_set(payload, group_id); in mlxsw_reg_pemrbt_pack()
3064 static inline void mlxsw_reg_ptce2_pack(char *payload, bool valid, in mlxsw_reg_ptce2_pack() argument
3069 MLXSW_REG_ZERO(ptce2, payload); in mlxsw_reg_ptce2_pack()
3070 mlxsw_reg_ptce2_v_set(payload, valid); in mlxsw_reg_ptce2_pack()
3071 mlxsw_reg_ptce2_op_set(payload, op); in mlxsw_reg_ptce2_pack()
3072 mlxsw_reg_ptce2_offset_set(payload, offset); in mlxsw_reg_ptce2_pack()
3073 mlxsw_reg_ptce2_priority_set(payload, priority); in mlxsw_reg_ptce2_pack()
3074 mlxsw_reg_ptce2_tcam_region_info_memcpy_to(payload, tcam_region_info); in mlxsw_reg_ptce2_pack()
3161 static inline void mlxsw_reg_perpt_erp_vector_pack(char *payload, in mlxsw_reg_perpt_erp_vector_pack() argument
3168 mlxsw_reg_perpt_erp_vector_set(payload, bit, true); in mlxsw_reg_perpt_erp_vector_pack()
3172 mlxsw_reg_perpt_pack(char *payload, u8 erpt_bank, u8 erpt_index, in mlxsw_reg_perpt_pack() argument
3177 MLXSW_REG_ZERO(perpt, payload); in mlxsw_reg_perpt_pack()
3178 mlxsw_reg_perpt_erpt_bank_set(payload, erpt_bank); in mlxsw_reg_perpt_pack()
3179 mlxsw_reg_perpt_erpt_index_set(payload, erpt_index); in mlxsw_reg_perpt_pack()
3180 mlxsw_reg_perpt_key_size_set(payload, key_size); in mlxsw_reg_perpt_pack()
3181 mlxsw_reg_perpt_bf_bypass_set(payload, false); in mlxsw_reg_perpt_pack()
3182 mlxsw_reg_perpt_erp_id_set(payload, erp_id); in mlxsw_reg_perpt_pack()
3183 mlxsw_reg_perpt_erpt_base_bank_set(payload, erpt_base_bank); in mlxsw_reg_perpt_pack()
3184 mlxsw_reg_perpt_erpt_base_index_set(payload, erpt_base_index); in mlxsw_reg_perpt_pack()
3185 mlxsw_reg_perpt_erp_index_in_vector_set(payload, erp_index); in mlxsw_reg_perpt_pack()
3186 mlxsw_reg_perpt_mask_memcpy_to(payload, mask); in mlxsw_reg_perpt_pack()
3222 static inline void mlxsw_reg_perar_pack(char *payload, u16 region_id, in mlxsw_reg_perar_pack() argument
3225 MLXSW_REG_ZERO(perar, payload); in mlxsw_reg_perar_pack()
3226 mlxsw_reg_perar_region_id_set(payload, region_id); in mlxsw_reg_perar_pack()
3227 mlxsw_reg_perar_hw_region_set(payload, hw_region); in mlxsw_reg_perar_pack()
3368 static inline void mlxsw_reg_ptce3_pack(char *payload, bool valid, in mlxsw_reg_ptce3_pack() argument
3377 MLXSW_REG_ZERO(ptce3, payload); in mlxsw_reg_ptce3_pack()
3378 mlxsw_reg_ptce3_v_set(payload, valid); in mlxsw_reg_ptce3_pack()
3379 mlxsw_reg_ptce3_op_set(payload, op); in mlxsw_reg_ptce3_pack()
3380 mlxsw_reg_ptce3_priority_set(payload, priority); in mlxsw_reg_ptce3_pack()
3381 mlxsw_reg_ptce3_tcam_region_info_memcpy_to(payload, tcam_region_info); in mlxsw_reg_ptce3_pack()
3382 mlxsw_reg_ptce3_flex2_key_blocks_memcpy_to(payload, key); in mlxsw_reg_ptce3_pack()
3383 mlxsw_reg_ptce3_erp_id_set(payload, erp_id); in mlxsw_reg_ptce3_pack()
3384 mlxsw_reg_ptce3_delta_start_set(payload, delta_start); in mlxsw_reg_ptce3_pack()
3385 mlxsw_reg_ptce3_delta_mask_set(payload, delta_mask); in mlxsw_reg_ptce3_pack()
3386 mlxsw_reg_ptce3_delta_value_set(payload, delta_value); in mlxsw_reg_ptce3_pack()
3387 mlxsw_reg_ptce3_large_exists_set(payload, large_exists); in mlxsw_reg_ptce3_pack()
3388 mlxsw_reg_ptce3_large_entry_key_id_set(payload, lkey_id); in mlxsw_reg_ptce3_pack()
3389 mlxsw_reg_ptce3_action_pointer_set(payload, action_pointer); in mlxsw_reg_ptce3_pack()
3438 static inline void mlxsw_reg_percr_pack(char *payload, u16 region_id) in mlxsw_reg_percr_pack() argument
3440 MLXSW_REG_ZERO(percr, payload); in mlxsw_reg_percr_pack()
3441 mlxsw_reg_percr_region_id_set(payload, region_id); in mlxsw_reg_percr_pack()
3442 mlxsw_reg_percr_atcam_ignore_prune_set(payload, false); in mlxsw_reg_percr_pack()
3443 mlxsw_reg_percr_ctcam_ignore_prune_set(payload, false); in mlxsw_reg_percr_pack()
3444 mlxsw_reg_percr_bf_bypass_set(payload, false); in mlxsw_reg_percr_pack()
3509 static inline void mlxsw_reg_pererp_erp_vector_pack(char *payload, in mlxsw_reg_pererp_erp_vector_pack() argument
3516 mlxsw_reg_pererp_erpt_vector_set(payload, bit, true); in mlxsw_reg_pererp_erp_vector_pack()
3519 static inline void mlxsw_reg_pererp_pack(char *payload, u16 region_id, in mlxsw_reg_pererp_pack() argument
3524 MLXSW_REG_ZERO(pererp, payload); in mlxsw_reg_pererp_pack()
3525 mlxsw_reg_pererp_region_id_set(payload, region_id); in mlxsw_reg_pererp_pack()
3526 mlxsw_reg_pererp_ctcam_le_set(payload, ctcam_le); in mlxsw_reg_pererp_pack()
3527 mlxsw_reg_pererp_erpt_pointer_valid_set(payload, erpt_pointer_valid); in mlxsw_reg_pererp_pack()
3528 mlxsw_reg_pererp_erpt_bank_pointer_set(payload, erpt_bank_pointer); in mlxsw_reg_pererp_pack()
3529 mlxsw_reg_pererp_erpt_pointer_set(payload, erpt_pointer); in mlxsw_reg_pererp_pack()
3530 mlxsw_reg_pererp_master_rp_id_set(payload, master_rp_id); in mlxsw_reg_pererp_pack()
3582 static inline void mlxsw_reg_peabfe_pack(char *payload) in mlxsw_reg_peabfe_pack() argument
3584 MLXSW_REG_ZERO(peabfe, payload); in mlxsw_reg_peabfe_pack()
3587 static inline void mlxsw_reg_peabfe_rec_pack(char *payload, int rec_index, in mlxsw_reg_peabfe_rec_pack() argument
3590 u8 num_rec = mlxsw_reg_peabfe_size_get(payload); in mlxsw_reg_peabfe_rec_pack()
3593 mlxsw_reg_peabfe_size_set(payload, rec_index + 1); in mlxsw_reg_peabfe_rec_pack()
3594 mlxsw_reg_peabfe_bf_entry_state_set(payload, rec_index, state); in mlxsw_reg_peabfe_rec_pack()
3595 mlxsw_reg_peabfe_bf_entry_bank_set(payload, rec_index, bank); in mlxsw_reg_peabfe_rec_pack()
3596 mlxsw_reg_peabfe_bf_entry_index_set(payload, rec_index, bf_index); in mlxsw_reg_peabfe_rec_pack()
3642 static inline void mlxsw_reg_iedr_pack(char *payload) in mlxsw_reg_iedr_pack() argument
3644 MLXSW_REG_ZERO(iedr, payload); in mlxsw_reg_iedr_pack()
3647 static inline void mlxsw_reg_iedr_rec_pack(char *payload, int rec_index, in mlxsw_reg_iedr_rec_pack() argument
3651 u8 num_rec = mlxsw_reg_iedr_num_rec_get(payload); in mlxsw_reg_iedr_rec_pack()
3654 mlxsw_reg_iedr_num_rec_set(payload, rec_index + 1); in mlxsw_reg_iedr_rec_pack()
3655 mlxsw_reg_iedr_rec_type_set(payload, rec_index, rec_type); in mlxsw_reg_iedr_rec_pack()
3656 mlxsw_reg_iedr_rec_size_set(payload, rec_index, rec_size); in mlxsw_reg_iedr_rec_pack()
3657 mlxsw_reg_iedr_rec_index_start_set(payload, rec_index, rec_index_start); in mlxsw_reg_iedr_rec_pack()
3689 static inline void mlxsw_reg_qpts_pack(char *payload, u16 local_port, in mlxsw_reg_qpts_pack() argument
3692 MLXSW_REG_ZERO(qpts, payload); in mlxsw_reg_qpts_pack()
3694 mlxsw_reg_qpts_local_port_set(payload, local_port); in mlxsw_reg_qpts_pack()
3695 mlxsw_reg_qpts_trust_state_set(payload, ts); in mlxsw_reg_qpts_pack()
3848 static inline void mlxsw_reg_qpcr_pack(char *payload, u16 pid, in mlxsw_reg_qpcr_pack() argument
3852 MLXSW_REG_ZERO(qpcr, payload); in mlxsw_reg_qpcr_pack()
3853 mlxsw_reg_qpcr_pid_set(payload, pid); in mlxsw_reg_qpcr_pack()
3854 mlxsw_reg_qpcr_g_set(payload, MLXSW_REG_QPCR_G_GLOBAL); in mlxsw_reg_qpcr_pack()
3855 mlxsw_reg_qpcr_rate_type_set(payload, MLXSW_REG_QPCR_RATE_TYPE_SINGLE); in mlxsw_reg_qpcr_pack()
3856 mlxsw_reg_qpcr_violate_action_set(payload, in mlxsw_reg_qpcr_pack()
3858 mlxsw_reg_qpcr_cir_set(payload, cir); in mlxsw_reg_qpcr_pack()
3859 mlxsw_reg_qpcr_ir_units_set(payload, ir_units); in mlxsw_reg_qpcr_pack()
3860 mlxsw_reg_qpcr_bytes_set(payload, bytes); in mlxsw_reg_qpcr_pack()
3861 mlxsw_reg_qpcr_cbs_set(payload, cbs); in mlxsw_reg_qpcr_pack()
3905 static inline void mlxsw_reg_qtct_pack(char *payload, u16 local_port, in mlxsw_reg_qtct_pack() argument
3908 MLXSW_REG_ZERO(qtct, payload); in mlxsw_reg_qtct_pack()
3909 mlxsw_reg_qtct_local_port_set(payload, local_port); in mlxsw_reg_qtct_pack()
3910 mlxsw_reg_qtct_switch_prio_set(payload, switch_prio); in mlxsw_reg_qtct_pack()
3911 mlxsw_reg_qtct_tclass_set(payload, tclass); in mlxsw_reg_qtct_pack()
4073 static inline void mlxsw_reg_qeec_pack(char *payload, u16 local_port, in mlxsw_reg_qeec_pack() argument
4077 MLXSW_REG_ZERO(qeec, payload); in mlxsw_reg_qeec_pack()
4078 mlxsw_reg_qeec_local_port_set(payload, local_port); in mlxsw_reg_qeec_pack()
4079 mlxsw_reg_qeec_element_hierarchy_set(payload, hr); in mlxsw_reg_qeec_pack()
4080 mlxsw_reg_qeec_element_index_set(payload, index); in mlxsw_reg_qeec_pack()
4081 mlxsw_reg_qeec_next_element_index_set(payload, next_index); in mlxsw_reg_qeec_pack()
4084 static inline void mlxsw_reg_qeec_ptps_pack(char *payload, u16 local_port, in mlxsw_reg_qeec_ptps_pack() argument
4087 MLXSW_REG_ZERO(qeec, payload); in mlxsw_reg_qeec_ptps_pack()
4088 mlxsw_reg_qeec_local_port_set(payload, local_port); in mlxsw_reg_qeec_ptps_pack()
4089 mlxsw_reg_qeec_element_hierarchy_set(payload, MLXSW_REG_QEEC_HR_PORT); in mlxsw_reg_qeec_ptps_pack()
4090 mlxsw_reg_qeec_ptps_set(payload, ptps); in mlxsw_reg_qeec_ptps_pack()
4122 static inline void mlxsw_reg_qrwe_pack(char *payload, u16 local_port, in mlxsw_reg_qrwe_pack() argument
4125 MLXSW_REG_ZERO(qrwe, payload); in mlxsw_reg_qrwe_pack()
4126 mlxsw_reg_qrwe_local_port_set(payload, local_port); in mlxsw_reg_qrwe_pack()
4127 mlxsw_reg_qrwe_pcp_set(payload, rewrite_pcp); in mlxsw_reg_qrwe_pack()
4128 mlxsw_reg_qrwe_dscp_set(payload, rewrite_dscp); in mlxsw_reg_qrwe_pack()
4202 static inline void mlxsw_reg_qpdsm_pack(char *payload, u16 local_port) in mlxsw_reg_qpdsm_pack() argument
4204 MLXSW_REG_ZERO(qpdsm, payload); in mlxsw_reg_qpdsm_pack()
4205 mlxsw_reg_qpdsm_local_port_set(payload, local_port); in mlxsw_reg_qpdsm_pack()
4209 mlxsw_reg_qpdsm_prio_pack(char *payload, unsigned short prio, u8 dscp) in mlxsw_reg_qpdsm_prio_pack() argument
4211 mlxsw_reg_qpdsm_prio_entry_color0_e_set(payload, prio, 1); in mlxsw_reg_qpdsm_prio_pack()
4212 mlxsw_reg_qpdsm_prio_entry_color0_dscp_set(payload, prio, dscp); in mlxsw_reg_qpdsm_prio_pack()
4213 mlxsw_reg_qpdsm_prio_entry_color1_e_set(payload, prio, 1); in mlxsw_reg_qpdsm_prio_pack()
4214 mlxsw_reg_qpdsm_prio_entry_color1_dscp_set(payload, prio, dscp); in mlxsw_reg_qpdsm_prio_pack()
4215 mlxsw_reg_qpdsm_prio_entry_color2_e_set(payload, prio, 1); in mlxsw_reg_qpdsm_prio_pack()
4216 mlxsw_reg_qpdsm_prio_entry_color2_dscp_set(payload, prio, dscp); in mlxsw_reg_qpdsm_prio_pack()
4243 static inline void mlxsw_reg_qpdp_pack(char *payload, u16 local_port, in mlxsw_reg_qpdp_pack() argument
4246 MLXSW_REG_ZERO(qpdp, payload); in mlxsw_reg_qpdp_pack()
4247 mlxsw_reg_qpdp_local_port_set(payload, local_port); in mlxsw_reg_qpdp_pack()
4248 mlxsw_reg_qpdp_switch_prio_set(payload, switch_prio); in mlxsw_reg_qpdp_pack()
4289 static inline void mlxsw_reg_qpdpm_pack(char *payload, u16 local_port) in mlxsw_reg_qpdpm_pack() argument
4291 MLXSW_REG_ZERO(qpdpm, payload); in mlxsw_reg_qpdpm_pack()
4292 mlxsw_reg_qpdpm_local_port_set(payload, local_port); in mlxsw_reg_qpdpm_pack()
4296 mlxsw_reg_qpdpm_dscp_pack(char *payload, unsigned short dscp, u8 prio) in mlxsw_reg_qpdpm_dscp_pack() argument
4298 mlxsw_reg_qpdpm_dscp_entry_e_set(payload, dscp, 1); in mlxsw_reg_qpdpm_dscp_pack()
4299 mlxsw_reg_qpdpm_dscp_entry_prio_set(payload, dscp, prio); in mlxsw_reg_qpdpm_dscp_pack()
4331 mlxsw_reg_qtctm_pack(char *payload, u16 local_port, bool mc) in mlxsw_reg_qtctm_pack() argument
4333 MLXSW_REG_ZERO(qtctm, payload); in mlxsw_reg_qtctm_pack()
4334 mlxsw_reg_qtctm_local_port_set(payload, local_port); in mlxsw_reg_qtctm_pack()
4335 mlxsw_reg_qtctm_mc_set(payload, mc); in mlxsw_reg_qtctm_pack()
4427 mlxsw_reg_qpsc_pack(char *payload, enum mlxsw_reg_qpsc_port_speed port_speed, in mlxsw_reg_qpsc_pack() argument
4432 MLXSW_REG_ZERO(qpsc, payload); in mlxsw_reg_qpsc_pack()
4433 mlxsw_reg_qpsc_port_speed_set(payload, port_speed); in mlxsw_reg_qpsc_pack()
4434 mlxsw_reg_qpsc_shaper_time_exp_set(payload, shaper_time_exp); in mlxsw_reg_qpsc_pack()
4435 mlxsw_reg_qpsc_shaper_time_mantissa_set(payload, shaper_time_mantissa); in mlxsw_reg_qpsc_pack()
4436 mlxsw_reg_qpsc_shaper_inc_set(payload, shaper_inc); in mlxsw_reg_qpsc_pack()
4437 mlxsw_reg_qpsc_shaper_bs_set(payload, shaper_bs); in mlxsw_reg_qpsc_pack()
4438 mlxsw_reg_qpsc_ptsc_we_set(payload, true); in mlxsw_reg_qpsc_pack()
4439 mlxsw_reg_qpsc_port_to_shaper_credits_set(payload, port_to_shaper_credits); in mlxsw_reg_qpsc_pack()
4440 mlxsw_reg_qpsc_ing_timestamp_inc_set(payload, ing_timestamp_inc); in mlxsw_reg_qpsc_pack()
4441 mlxsw_reg_qpsc_egr_timestamp_inc_set(payload, egr_timestamp_inc); in mlxsw_reg_qpsc_pack()
4504 static inline void mlxsw_reg_pmlp_pack(char *payload, u16 local_port) in mlxsw_reg_pmlp_pack() argument
4506 MLXSW_REG_ZERO(pmlp, payload); in mlxsw_reg_pmlp_pack()
4507 mlxsw_reg_pmlp_local_port_set(payload, local_port); in mlxsw_reg_pmlp_pack()
4551 static inline void mlxsw_reg_pmtu_pack(char *payload, u16 local_port, in mlxsw_reg_pmtu_pack() argument
4554 MLXSW_REG_ZERO(pmtu, payload); in mlxsw_reg_pmtu_pack()
4555 mlxsw_reg_pmtu_local_port_set(payload, local_port); in mlxsw_reg_pmtu_pack()
4556 mlxsw_reg_pmtu_max_mtu_set(payload, 0); in mlxsw_reg_pmtu_pack()
4557 mlxsw_reg_pmtu_admin_mtu_set(payload, new_mtu); in mlxsw_reg_pmtu_pack()
4558 mlxsw_reg_pmtu_oper_mtu_set(payload, 0); in mlxsw_reg_pmtu_pack()
4704 static inline void mlxsw_reg_ptys_eth_pack(char *payload, u16 local_port, in mlxsw_reg_ptys_eth_pack() argument
4707 MLXSW_REG_ZERO(ptys, payload); in mlxsw_reg_ptys_eth_pack()
4708 mlxsw_reg_ptys_local_port_set(payload, local_port); in mlxsw_reg_ptys_eth_pack()
4709 mlxsw_reg_ptys_proto_mask_set(payload, MLXSW_REG_PTYS_PROTO_MASK_ETH); in mlxsw_reg_ptys_eth_pack()
4710 mlxsw_reg_ptys_eth_proto_admin_set(payload, proto_admin); in mlxsw_reg_ptys_eth_pack()
4711 mlxsw_reg_ptys_an_disable_admin_set(payload, !autoneg); in mlxsw_reg_ptys_eth_pack()
4714 static inline void mlxsw_reg_ptys_ext_eth_pack(char *payload, u16 local_port, in mlxsw_reg_ptys_ext_eth_pack() argument
4717 MLXSW_REG_ZERO(ptys, payload); in mlxsw_reg_ptys_ext_eth_pack()
4718 mlxsw_reg_ptys_local_port_set(payload, local_port); in mlxsw_reg_ptys_ext_eth_pack()
4719 mlxsw_reg_ptys_proto_mask_set(payload, MLXSW_REG_PTYS_PROTO_MASK_ETH); in mlxsw_reg_ptys_ext_eth_pack()
4720 mlxsw_reg_ptys_ext_eth_proto_admin_set(payload, proto_admin); in mlxsw_reg_ptys_ext_eth_pack()
4721 mlxsw_reg_ptys_an_disable_admin_set(payload, !autoneg); in mlxsw_reg_ptys_ext_eth_pack()
4724 static inline void mlxsw_reg_ptys_eth_unpack(char *payload, in mlxsw_reg_ptys_eth_unpack() argument
4731 mlxsw_reg_ptys_eth_proto_cap_get(payload); in mlxsw_reg_ptys_eth_unpack()
4734 mlxsw_reg_ptys_eth_proto_admin_get(payload); in mlxsw_reg_ptys_eth_unpack()
4737 mlxsw_reg_ptys_eth_proto_oper_get(payload); in mlxsw_reg_ptys_eth_unpack()
4740 static inline void mlxsw_reg_ptys_ext_eth_unpack(char *payload, in mlxsw_reg_ptys_ext_eth_unpack() argument
4747 mlxsw_reg_ptys_ext_eth_proto_cap_get(payload); in mlxsw_reg_ptys_ext_eth_unpack()
4750 mlxsw_reg_ptys_ext_eth_proto_admin_get(payload); in mlxsw_reg_ptys_ext_eth_unpack()
4753 mlxsw_reg_ptys_ext_eth_proto_oper_get(payload); in mlxsw_reg_ptys_ext_eth_unpack()
4786 static inline void mlxsw_reg_ppad_pack(char *payload, bool single_base_mac, in mlxsw_reg_ppad_pack() argument
4789 MLXSW_REG_ZERO(ppad, payload); in mlxsw_reg_ppad_pack()
4790 mlxsw_reg_ppad_single_base_mac_set(payload, !!single_base_mac); in mlxsw_reg_ppad_pack()
4791 mlxsw_reg_ppad_local_port_set(payload, local_port); in mlxsw_reg_ppad_pack()
4861 static inline void mlxsw_reg_paos_pack(char *payload, u16 local_port, in mlxsw_reg_paos_pack() argument
4864 MLXSW_REG_ZERO(paos, payload); in mlxsw_reg_paos_pack()
4865 mlxsw_reg_paos_swid_set(payload, 0); in mlxsw_reg_paos_pack()
4866 mlxsw_reg_paos_local_port_set(payload, local_port); in mlxsw_reg_paos_pack()
4867 mlxsw_reg_paos_admin_status_set(payload, status); in mlxsw_reg_paos_pack()
4868 mlxsw_reg_paos_oper_status_set(payload, 0); in mlxsw_reg_paos_pack()
4869 mlxsw_reg_paos_ase_set(payload, 1); in mlxsw_reg_paos_pack()
4870 mlxsw_reg_paos_ee_set(payload, 1); in mlxsw_reg_paos_pack()
4871 mlxsw_reg_paos_e_set(payload, 1); in mlxsw_reg_paos_pack()
4996 static inline void mlxsw_reg_pfcc_prio_pack(char *payload, u8 pfc_en) in mlxsw_reg_pfcc_prio_pack() argument
4998 mlxsw_reg_pfcc_prio_mask_tx_set(payload, MLXSW_REG_PFCC_ALL_PRIO); in mlxsw_reg_pfcc_prio_pack()
4999 mlxsw_reg_pfcc_prio_mask_rx_set(payload, MLXSW_REG_PFCC_ALL_PRIO); in mlxsw_reg_pfcc_prio_pack()
5000 mlxsw_reg_pfcc_pfctx_set(payload, pfc_en); in mlxsw_reg_pfcc_prio_pack()
5001 mlxsw_reg_pfcc_pfcrx_set(payload, pfc_en); in mlxsw_reg_pfcc_prio_pack()
5004 static inline void mlxsw_reg_pfcc_pack(char *payload, u16 local_port) in mlxsw_reg_pfcc_pack() argument
5006 MLXSW_REG_ZERO(pfcc, payload); in mlxsw_reg_pfcc_pack()
5007 mlxsw_reg_pfcc_local_port_set(payload, local_port); in mlxsw_reg_pfcc_pack()
5515 static inline void mlxsw_reg_ppcnt_pack(char *payload, u16 local_port, in mlxsw_reg_ppcnt_pack() argument
5519 MLXSW_REG_ZERO(ppcnt, payload); in mlxsw_reg_ppcnt_pack()
5520 mlxsw_reg_ppcnt_swid_set(payload, 0); in mlxsw_reg_ppcnt_pack()
5521 mlxsw_reg_ppcnt_local_port_set(payload, local_port); in mlxsw_reg_ppcnt_pack()
5522 mlxsw_reg_ppcnt_pnat_set(payload, 0); in mlxsw_reg_ppcnt_pack()
5523 mlxsw_reg_ppcnt_grp_set(payload, grp); in mlxsw_reg_ppcnt_pack()
5524 mlxsw_reg_ppcnt_clr_set(payload, 0); in mlxsw_reg_ppcnt_pack()
5525 mlxsw_reg_ppcnt_lp_gl_set(payload, 1); in mlxsw_reg_ppcnt_pack()
5526 mlxsw_reg_ppcnt_prio_tc_set(payload, prio_tc); in mlxsw_reg_ppcnt_pack()
5606 static inline void mlxsw_reg_pptb_pack(char *payload, u16 local_port) in mlxsw_reg_pptb_pack() argument
5608 MLXSW_REG_ZERO(pptb, payload); in mlxsw_reg_pptb_pack()
5609 mlxsw_reg_pptb_mm_set(payload, MLXSW_REG_PPTB_MM_UM); in mlxsw_reg_pptb_pack()
5610 mlxsw_reg_pptb_local_port_set(payload, local_port); in mlxsw_reg_pptb_pack()
5611 mlxsw_reg_pptb_pm_set(payload, MLXSW_REG_PPTB_ALL_PRIO); in mlxsw_reg_pptb_pack()
5612 mlxsw_reg_pptb_pm_msb_set(payload, MLXSW_REG_PPTB_ALL_PRIO); in mlxsw_reg_pptb_pack()
5615 static inline void mlxsw_reg_pptb_prio_to_buff_pack(char *payload, u8 prio, in mlxsw_reg_pptb_prio_to_buff_pack() argument
5618 mlxsw_reg_pptb_prio_to_buff_set(payload, prio, buff); in mlxsw_reg_pptb_prio_to_buff_pack()
5619 mlxsw_reg_pptb_prio_to_buff_msb_set(payload, prio, buff); in mlxsw_reg_pptb_prio_to_buff_pack()
5703 static inline void mlxsw_reg_pbmc_pack(char *payload, u16 local_port, in mlxsw_reg_pbmc_pack() argument
5706 MLXSW_REG_ZERO(pbmc, payload); in mlxsw_reg_pbmc_pack()
5707 mlxsw_reg_pbmc_local_port_set(payload, local_port); in mlxsw_reg_pbmc_pack()
5708 mlxsw_reg_pbmc_xoff_timer_value_set(payload, xoff_timer_value); in mlxsw_reg_pbmc_pack()
5709 mlxsw_reg_pbmc_xoff_refresh_set(payload, xoff_refresh); in mlxsw_reg_pbmc_pack()
5712 static inline void mlxsw_reg_pbmc_lossy_buffer_pack(char *payload, in mlxsw_reg_pbmc_lossy_buffer_pack() argument
5716 mlxsw_reg_pbmc_buf_lossy_set(payload, buf_index, 1); in mlxsw_reg_pbmc_lossy_buffer_pack()
5717 mlxsw_reg_pbmc_buf_epsb_set(payload, buf_index, 0); in mlxsw_reg_pbmc_lossy_buffer_pack()
5718 mlxsw_reg_pbmc_buf_size_set(payload, buf_index, size); in mlxsw_reg_pbmc_lossy_buffer_pack()
5721 static inline void mlxsw_reg_pbmc_lossless_buffer_pack(char *payload, in mlxsw_reg_pbmc_lossless_buffer_pack() argument
5725 mlxsw_reg_pbmc_buf_lossy_set(payload, buf_index, 0); in mlxsw_reg_pbmc_lossless_buffer_pack()
5726 mlxsw_reg_pbmc_buf_epsb_set(payload, buf_index, 0); in mlxsw_reg_pbmc_lossless_buffer_pack()
5727 mlxsw_reg_pbmc_buf_size_set(payload, buf_index, size); in mlxsw_reg_pbmc_lossless_buffer_pack()
5728 mlxsw_reg_pbmc_buf_xoff_threshold_set(payload, buf_index, threshold); in mlxsw_reg_pbmc_lossless_buffer_pack()
5729 mlxsw_reg_pbmc_buf_xon_threshold_set(payload, buf_index, threshold); in mlxsw_reg_pbmc_lossless_buffer_pack()
5761 static inline void mlxsw_reg_pspa_pack(char *payload, u8 swid, u16 local_port) in mlxsw_reg_pspa_pack() argument
5763 MLXSW_REG_ZERO(pspa, payload); in mlxsw_reg_pspa_pack()
5764 mlxsw_reg_pspa_swid_set(payload, swid); in mlxsw_reg_pspa_pack()
5765 mlxsw_reg_pspa_local_port_set(payload, local_port); in mlxsw_reg_pspa_pack()
5766 mlxsw_reg_pspa_sub_port_set(payload, 0); in mlxsw_reg_pspa_pack()
5844 static inline void mlxsw_reg_pmaos_pack(char *payload, u8 slot_index, u8 module) in mlxsw_reg_pmaos_pack() argument
5846 MLXSW_REG_ZERO(pmaos, payload); in mlxsw_reg_pmaos_pack()
5847 mlxsw_reg_pmaos_slot_index_set(payload, slot_index); in mlxsw_reg_pmaos_pack()
5848 mlxsw_reg_pmaos_module_set(payload, module); in mlxsw_reg_pmaos_pack()
5877 static inline void mlxsw_reg_pplr_pack(char *payload, u16 local_port, in mlxsw_reg_pplr_pack() argument
5880 MLXSW_REG_ZERO(pplr, payload); in mlxsw_reg_pplr_pack()
5881 mlxsw_reg_pplr_local_port_set(payload, local_port); in mlxsw_reg_pplr_pack()
5882 mlxsw_reg_pplr_lb_en_set(payload, in mlxsw_reg_pplr_pack()
5940 static inline void mlxsw_reg_pmtdb_pack(char *payload, u8 slot_index, u8 module, in mlxsw_reg_pmtdb_pack() argument
5943 MLXSW_REG_ZERO(pmtdb, payload); in mlxsw_reg_pmtdb_pack()
5944 mlxsw_reg_pmtdb_slot_index_set(payload, slot_index); in mlxsw_reg_pmtdb_pack()
5945 mlxsw_reg_pmtdb_module_set(payload, module); in mlxsw_reg_pmtdb_pack()
5946 mlxsw_reg_pmtdb_ports_width_set(payload, ports_width); in mlxsw_reg_pmtdb_pack()
5947 mlxsw_reg_pmtdb_num_ports_set(payload, num_ports); in mlxsw_reg_pmtdb_pack()
6002 static inline void mlxsw_reg_pmecr_pack(char *payload, u16 local_port, in mlxsw_reg_pmecr_pack() argument
6005 MLXSW_REG_ZERO(pmecr, payload); in mlxsw_reg_pmecr_pack()
6006 mlxsw_reg_pmecr_local_port_set(payload, local_port); in mlxsw_reg_pmecr_pack()
6007 mlxsw_reg_pmecr_e_set(payload, e); in mlxsw_reg_pmecr_pack()
6008 mlxsw_reg_pmecr_ee_set(payload, true); in mlxsw_reg_pmecr_pack()
6009 mlxsw_reg_pmecr_swi_set(payload, true); in mlxsw_reg_pmecr_pack()
6010 mlxsw_reg_pmecr_eswi_set(payload, true); in mlxsw_reg_pmecr_pack()
6099 static inline void mlxsw_reg_pddr_pack(char *payload, u16 local_port, in mlxsw_reg_pddr_pack() argument
6102 MLXSW_REG_ZERO(pddr, payload); in mlxsw_reg_pddr_pack()
6103 mlxsw_reg_pddr_local_port_set(payload, local_port); in mlxsw_reg_pddr_pack()
6104 mlxsw_reg_pddr_page_select_set(payload, page_select); in mlxsw_reg_pddr_pack()
6156 static inline void mlxsw_reg_pmmp_pack(char *payload, u8 slot_index, u8 module) in mlxsw_reg_pmmp_pack() argument
6158 MLXSW_REG_ZERO(pmmp, payload); in mlxsw_reg_pmmp_pack()
6159 mlxsw_reg_pmmp_slot_index_set(payload, slot_index); in mlxsw_reg_pmmp_pack()
6160 mlxsw_reg_pmmp_module_set(payload, module); in mlxsw_reg_pmmp_pack()
6196 static inline void mlxsw_reg_pllp_pack(char *payload, u16 local_port) in mlxsw_reg_pllp_pack() argument
6198 MLXSW_REG_ZERO(pllp, payload); in mlxsw_reg_pllp_pack()
6199 mlxsw_reg_pllp_local_port_set(payload, local_port); in mlxsw_reg_pllp_pack()
6202 static inline void mlxsw_reg_pllp_unpack(char *payload, u8 *label_port, in mlxsw_reg_pllp_unpack() argument
6205 *label_port = mlxsw_reg_pllp_label_port_get(payload); in mlxsw_reg_pllp_unpack()
6206 *split_num = mlxsw_reg_pllp_split_num_get(payload); in mlxsw_reg_pllp_unpack()
6207 *slot_index = mlxsw_reg_pllp_slot_index_get(payload); in mlxsw_reg_pllp_unpack()
6255 static inline void mlxsw_reg_pmtm_pack(char *payload, u8 slot_index, u8 module) in mlxsw_reg_pmtm_pack() argument
6257 MLXSW_REG_ZERO(pmtm, payload); in mlxsw_reg_pmtm_pack()
6258 mlxsw_reg_pmtm_slot_index_set(payload, slot_index); in mlxsw_reg_pmtm_pack()
6259 mlxsw_reg_pmtm_module_set(payload, module); in mlxsw_reg_pmtm_pack()
6404 static inline void mlxsw_reg_htgt_pack(char *payload, u8 group, u8 policer_id, in mlxsw_reg_htgt_pack() argument
6407 MLXSW_REG_ZERO(htgt, payload); in mlxsw_reg_htgt_pack()
6410 mlxsw_reg_htgt_pide_set(payload, in mlxsw_reg_htgt_pack()
6413 mlxsw_reg_htgt_pide_set(payload, in mlxsw_reg_htgt_pack()
6415 mlxsw_reg_htgt_pid_set(payload, policer_id); in mlxsw_reg_htgt_pack()
6418 mlxsw_reg_htgt_type_set(payload, MLXSW_REG_HTGT_PATH_TYPE_LOCAL); in mlxsw_reg_htgt_pack()
6419 mlxsw_reg_htgt_trap_group_set(payload, group); in mlxsw_reg_htgt_pack()
6420 mlxsw_reg_htgt_mirror_action_set(payload, MLXSW_REG_HTGT_TRAP_TO_CPU); in mlxsw_reg_htgt_pack()
6421 mlxsw_reg_htgt_mirroring_agent_set(payload, 0); in mlxsw_reg_htgt_pack()
6422 mlxsw_reg_htgt_priority_set(payload, priority); in mlxsw_reg_htgt_pack()
6423 mlxsw_reg_htgt_local_path_cpu_tclass_set(payload, tc); in mlxsw_reg_htgt_pack()
6424 mlxsw_reg_htgt_local_path_rdq_set(payload, group); in mlxsw_reg_htgt_pack()
6510 static inline void mlxsw_reg_hpkt_pack(char *payload, u8 action, u16 trap_id, in mlxsw_reg_hpkt_pack() argument
6514 MLXSW_REG_ZERO(hpkt, payload); in mlxsw_reg_hpkt_pack()
6515 mlxsw_reg_hpkt_ack_set(payload, MLXSW_REG_HPKT_ACK_NOT_REQUIRED); in mlxsw_reg_hpkt_pack()
6516 mlxsw_reg_hpkt_action_set(payload, action); in mlxsw_reg_hpkt_pack()
6517 mlxsw_reg_hpkt_trap_group_set(payload, trap_group); in mlxsw_reg_hpkt_pack()
6518 mlxsw_reg_hpkt_trap_id_set(payload, trap_id); in mlxsw_reg_hpkt_pack()
6519 mlxsw_reg_hpkt_ctrl_set(payload, is_ctrl ? in mlxsw_reg_hpkt_pack()
6589 static inline void mlxsw_reg_rgcr_pack(char *payload, bool ipv4_en, in mlxsw_reg_rgcr_pack() argument
6592 MLXSW_REG_ZERO(rgcr, payload); in mlxsw_reg_rgcr_pack()
6593 mlxsw_reg_rgcr_ipv4_en_set(payload, ipv4_en); in mlxsw_reg_rgcr_pack()
6594 mlxsw_reg_rgcr_ipv6_en_set(payload, ipv6_en); in mlxsw_reg_rgcr_pack()
6932 static inline void mlxsw_reg_ritr_counter_pack(char *payload, u32 index, in mlxsw_reg_ritr_counter_pack() argument
6943 mlxsw_reg_ritr_egress_counter_set_type_set(payload, set_type); in mlxsw_reg_ritr_counter_pack()
6944 mlxsw_reg_ritr_egress_counter_index_set(payload, index); in mlxsw_reg_ritr_counter_pack()
6946 mlxsw_reg_ritr_ingress_counter_set_type_set(payload, set_type); in mlxsw_reg_ritr_counter_pack()
6947 mlxsw_reg_ritr_ingress_counter_index_set(payload, index); in mlxsw_reg_ritr_counter_pack()
6951 static inline void mlxsw_reg_ritr_rif_pack(char *payload, u16 rif) in mlxsw_reg_ritr_rif_pack() argument
6953 MLXSW_REG_ZERO(ritr, payload); in mlxsw_reg_ritr_rif_pack()
6954 mlxsw_reg_ritr_rif_set(payload, rif); in mlxsw_reg_ritr_rif_pack()
6957 static inline void mlxsw_reg_ritr_sp_if_pack(char *payload, bool lag, in mlxsw_reg_ritr_sp_if_pack() argument
6960 mlxsw_reg_ritr_sp_if_lag_set(payload, lag); in mlxsw_reg_ritr_sp_if_pack()
6961 mlxsw_reg_ritr_sp_if_system_port_set(payload, system_port); in mlxsw_reg_ritr_sp_if_pack()
6962 mlxsw_reg_ritr_sp_if_efid_set(payload, efid); in mlxsw_reg_ritr_sp_if_pack()
6963 mlxsw_reg_ritr_sp_if_vid_set(payload, vid); in mlxsw_reg_ritr_sp_if_pack()
6966 static inline void mlxsw_reg_ritr_pack(char *payload, bool enable, in mlxsw_reg_ritr_pack() argument
6972 MLXSW_REG_ZERO(ritr, payload); in mlxsw_reg_ritr_pack()
6973 mlxsw_reg_ritr_enable_set(payload, enable); in mlxsw_reg_ritr_pack()
6974 mlxsw_reg_ritr_ipv4_set(payload, 1); in mlxsw_reg_ritr_pack()
6975 mlxsw_reg_ritr_ipv6_set(payload, 1); in mlxsw_reg_ritr_pack()
6976 mlxsw_reg_ritr_ipv4_mc_set(payload, 1); in mlxsw_reg_ritr_pack()
6977 mlxsw_reg_ritr_ipv6_mc_set(payload, 1); in mlxsw_reg_ritr_pack()
6978 mlxsw_reg_ritr_type_set(payload, type); in mlxsw_reg_ritr_pack()
6979 mlxsw_reg_ritr_op_set(payload, op); in mlxsw_reg_ritr_pack()
6980 mlxsw_reg_ritr_rif_set(payload, rif); in mlxsw_reg_ritr_pack()
6981 mlxsw_reg_ritr_ipv4_fe_set(payload, 1); in mlxsw_reg_ritr_pack()
6982 mlxsw_reg_ritr_ipv6_fe_set(payload, 1); in mlxsw_reg_ritr_pack()
6983 mlxsw_reg_ritr_ipv4_mc_fe_set(payload, 1); in mlxsw_reg_ritr_pack()
6984 mlxsw_reg_ritr_ipv6_mc_fe_set(payload, 1); in mlxsw_reg_ritr_pack()
6985 mlxsw_reg_ritr_lb_en_set(payload, 1); in mlxsw_reg_ritr_pack()
6986 mlxsw_reg_ritr_virtual_router_set(payload, vr_id); in mlxsw_reg_ritr_pack()
6987 mlxsw_reg_ritr_mtu_set(payload, mtu); in mlxsw_reg_ritr_pack()
6990 static inline void mlxsw_reg_ritr_mac_pack(char *payload, const char *mac) in mlxsw_reg_ritr_mac_pack() argument
6992 mlxsw_reg_ritr_if_mac_memcpy_to(payload, mac); in mlxsw_reg_ritr_mac_pack()
6996 mlxsw_reg_ritr_vlan_if_pack(char *payload, bool enable, u16 rif, u16 vr_id, in mlxsw_reg_ritr_vlan_if_pack() argument
7002 mlxsw_reg_ritr_pack(payload, enable, type, rif, vr_id, mtu); in mlxsw_reg_ritr_vlan_if_pack()
7003 mlxsw_reg_ritr_if_mac_memcpy_to(payload, mac); in mlxsw_reg_ritr_vlan_if_pack()
7004 mlxsw_reg_ritr_if_mac_profile_id_set(payload, mac_profile_id); in mlxsw_reg_ritr_vlan_if_pack()
7005 mlxsw_reg_ritr_vlan_if_vlan_id_set(payload, vlan_id); in mlxsw_reg_ritr_vlan_if_pack()
7006 mlxsw_reg_ritr_vlan_if_efid_set(payload, efid); in mlxsw_reg_ritr_vlan_if_pack()
7010 mlxsw_reg_ritr_loopback_ipip_common_pack(char *payload, in mlxsw_reg_ritr_loopback_ipip_common_pack() argument
7015 mlxsw_reg_ritr_loopback_ipip_type_set(payload, ipip_type); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7016 mlxsw_reg_ritr_loopback_ipip_options_set(payload, options); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7017 mlxsw_reg_ritr_loopback_ipip_uvr_set(payload, uvr_id); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7018 mlxsw_reg_ritr_loopback_ipip_underlay_rif_set(payload, underlay_rif); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7019 mlxsw_reg_ritr_loopback_ipip_gre_key_set(payload, gre_key); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7023 mlxsw_reg_ritr_loopback_ipip4_pack(char *payload, in mlxsw_reg_ritr_loopback_ipip4_pack() argument
7028 mlxsw_reg_ritr_loopback_protocol_set(payload, in mlxsw_reg_ritr_loopback_ipip4_pack()
7030 mlxsw_reg_ritr_loopback_ipip_common_pack(payload, ipip_type, options, in mlxsw_reg_ritr_loopback_ipip4_pack()
7032 mlxsw_reg_ritr_loopback_ipip_usip4_set(payload, usip); in mlxsw_reg_ritr_loopback_ipip4_pack()
7036 mlxsw_reg_ritr_loopback_ipip6_pack(char *payload, in mlxsw_reg_ritr_loopback_ipip6_pack() argument
7045 mlxsw_reg_ritr_loopback_protocol_set(payload, protocol); in mlxsw_reg_ritr_loopback_ipip6_pack()
7046 mlxsw_reg_ritr_loopback_ipip_common_pack(payload, ipip_type, options, in mlxsw_reg_ritr_loopback_ipip6_pack()
7048 mlxsw_reg_ritr_loopback_ipip_usip6_memcpy_to(payload, in mlxsw_reg_ritr_loopback_ipip6_pack()
7092 static inline void mlxsw_reg_rtar_pack(char *payload, in mlxsw_reg_rtar_pack() argument
7097 MLXSW_REG_ZERO(rtar, payload); in mlxsw_reg_rtar_pack()
7098 mlxsw_reg_rtar_op_set(payload, op); in mlxsw_reg_rtar_pack()
7099 mlxsw_reg_rtar_key_type_set(payload, key_type); in mlxsw_reg_rtar_pack()
7100 mlxsw_reg_rtar_region_size_set(payload, region_size); in mlxsw_reg_rtar_pack()
7294 mlxsw_reg_ratr_pack(char *payload, in mlxsw_reg_ratr_pack() argument
7299 MLXSW_REG_ZERO(ratr, payload); in mlxsw_reg_ratr_pack()
7300 mlxsw_reg_ratr_op_set(payload, op); in mlxsw_reg_ratr_pack()
7301 mlxsw_reg_ratr_v_set(payload, valid); in mlxsw_reg_ratr_pack()
7302 mlxsw_reg_ratr_type_set(payload, type); in mlxsw_reg_ratr_pack()
7303 mlxsw_reg_ratr_adjacency_index_low_set(payload, adjacency_index); in mlxsw_reg_ratr_pack()
7304 mlxsw_reg_ratr_adjacency_index_high_set(payload, adjacency_index >> 16); in mlxsw_reg_ratr_pack()
7305 mlxsw_reg_ratr_egress_router_interface_set(payload, egress_rif); in mlxsw_reg_ratr_pack()
7308 static inline void mlxsw_reg_ratr_eth_entry_pack(char *payload, in mlxsw_reg_ratr_eth_entry_pack() argument
7311 mlxsw_reg_ratr_eth_destination_mac_memcpy_to(payload, dest_mac); in mlxsw_reg_ratr_eth_entry_pack()
7314 static inline void mlxsw_reg_ratr_ipip4_entry_pack(char *payload, u32 ipv4_udip) in mlxsw_reg_ratr_ipip4_entry_pack() argument
7316 mlxsw_reg_ratr_ipip_type_set(payload, MLXSW_REG_RATR_IPIP_TYPE_IPV4); in mlxsw_reg_ratr_ipip4_entry_pack()
7317 mlxsw_reg_ratr_ipip_ipv4_udip_set(payload, ipv4_udip); in mlxsw_reg_ratr_ipip4_entry_pack()
7320 static inline void mlxsw_reg_ratr_ipip6_entry_pack(char *payload, u32 ipv6_ptr) in mlxsw_reg_ratr_ipip6_entry_pack() argument
7322 mlxsw_reg_ratr_ipip_type_set(payload, MLXSW_REG_RATR_IPIP_TYPE_IPV6); in mlxsw_reg_ratr_ipip6_entry_pack()
7323 mlxsw_reg_ratr_ipip_ipv6_ptr_set(payload, ipv6_ptr); in mlxsw_reg_ratr_ipip6_entry_pack()
7326 static inline void mlxsw_reg_ratr_counter_pack(char *payload, u64 counter_index, in mlxsw_reg_ratr_counter_pack() argument
7336 mlxsw_reg_ratr_counter_index_set(payload, counter_index); in mlxsw_reg_ratr_counter_pack()
7337 mlxsw_reg_ratr_counter_set_type_set(payload, set_type); in mlxsw_reg_ratr_counter_pack()
7369 static inline void mlxsw_reg_rdpm_pack(char *payload, unsigned short index, in mlxsw_reg_rdpm_pack() argument
7372 mlxsw_reg_rdpm_dscp_entry_e_set(payload, index, 1); in mlxsw_reg_rdpm_pack()
7373 mlxsw_reg_rdpm_dscp_entry_prio_set(payload, index, prio); in mlxsw_reg_rdpm_pack()
7489 static inline void mlxsw_reg_ricnt_pack(char *payload, u32 index, in mlxsw_reg_ricnt_pack() argument
7492 MLXSW_REG_ZERO(ricnt, payload); in mlxsw_reg_ricnt_pack()
7493 mlxsw_reg_ricnt_op_set(payload, op); in mlxsw_reg_ricnt_pack()
7494 mlxsw_reg_ricnt_counter_index_set(payload, index); in mlxsw_reg_ricnt_pack()
7495 mlxsw_reg_ricnt_counter_set_type_set(payload, in mlxsw_reg_ricnt_pack()
7545 static inline void mlxsw_reg_rrcr_pack(char *payload, enum mlxsw_reg_rrcr_op op, in mlxsw_reg_rrcr_pack() argument
7550 MLXSW_REG_ZERO(rrcr, payload); in mlxsw_reg_rrcr_pack()
7551 mlxsw_reg_rrcr_op_set(payload, op); in mlxsw_reg_rrcr_pack()
7552 mlxsw_reg_rrcr_offset_set(payload, offset); in mlxsw_reg_rrcr_pack()
7553 mlxsw_reg_rrcr_size_set(payload, size); in mlxsw_reg_rrcr_pack()
7554 mlxsw_reg_rrcr_table_id_set(payload, table_id); in mlxsw_reg_rrcr_pack()
7555 mlxsw_reg_rrcr_dest_offset_set(payload, dest_offset); in mlxsw_reg_rrcr_pack()
7595 static inline void mlxsw_reg_ralta_pack(char *payload, bool alloc, in mlxsw_reg_ralta_pack() argument
7599 MLXSW_REG_ZERO(ralta, payload); in mlxsw_reg_ralta_pack()
7600 mlxsw_reg_ralta_op_set(payload, !alloc); in mlxsw_reg_ralta_pack()
7601 mlxsw_reg_ralta_protocol_set(payload, protocol); in mlxsw_reg_ralta_pack()
7602 mlxsw_reg_ralta_tree_id_set(payload, tree_id); in mlxsw_reg_ralta_pack()
7654 static inline void mlxsw_reg_ralst_pack(char *payload, u8 root_bin, u8 tree_id) in mlxsw_reg_ralst_pack() argument
7656 MLXSW_REG_ZERO(ralst, payload); in mlxsw_reg_ralst_pack()
7659 memset(payload + MLXSW_REG_RALST_BIN_OFFSET, in mlxsw_reg_ralst_pack()
7662 mlxsw_reg_ralst_root_bin_set(payload, root_bin); in mlxsw_reg_ralst_pack()
7663 mlxsw_reg_ralst_tree_id_set(payload, tree_id); in mlxsw_reg_ralst_pack()
7666 static inline void mlxsw_reg_ralst_bin_pack(char *payload, u8 bin_number, in mlxsw_reg_ralst_bin_pack() argument
7672 mlxsw_reg_ralst_left_child_bin_set(payload, bin_index, left_child_bin); in mlxsw_reg_ralst_bin_pack()
7673 mlxsw_reg_ralst_right_child_bin_set(payload, bin_index, in mlxsw_reg_ralst_bin_pack()
7707 static inline void mlxsw_reg_raltb_pack(char *payload, u16 virtual_router, in mlxsw_reg_raltb_pack() argument
7711 MLXSW_REG_ZERO(raltb, payload); in mlxsw_reg_raltb_pack()
7712 mlxsw_reg_raltb_virtual_router_set(payload, virtual_router); in mlxsw_reg_raltb_pack()
7713 mlxsw_reg_raltb_protocol_set(payload, protocol); in mlxsw_reg_raltb_pack()
7714 mlxsw_reg_raltb_tree_id_set(payload, tree_id); in mlxsw_reg_raltb_pack()
7921 static inline void mlxsw_reg_ralue_pack(char *payload, in mlxsw_reg_ralue_pack() argument
7926 MLXSW_REG_ZERO(ralue, payload); in mlxsw_reg_ralue_pack()
7927 mlxsw_reg_ralue_protocol_set(payload, protocol); in mlxsw_reg_ralue_pack()
7928 mlxsw_reg_ralue_op_set(payload, op); in mlxsw_reg_ralue_pack()
7929 mlxsw_reg_ralue_virtual_router_set(payload, virtual_router); in mlxsw_reg_ralue_pack()
7930 mlxsw_reg_ralue_prefix_len_set(payload, prefix_len); in mlxsw_reg_ralue_pack()
7931 mlxsw_reg_ralue_entry_type_set(payload, in mlxsw_reg_ralue_pack()
7933 mlxsw_reg_ralue_bmp_len_set(payload, prefix_len); in mlxsw_reg_ralue_pack()
7936 static inline void mlxsw_reg_ralue_pack4(char *payload, in mlxsw_reg_ralue_pack4() argument
7942 mlxsw_reg_ralue_pack(payload, protocol, op, virtual_router, prefix_len); in mlxsw_reg_ralue_pack4()
7943 mlxsw_reg_ralue_dip4_set(payload, dip); in mlxsw_reg_ralue_pack4()
7946 static inline void mlxsw_reg_ralue_pack6(char *payload, in mlxsw_reg_ralue_pack6() argument
7952 mlxsw_reg_ralue_pack(payload, protocol, op, virtual_router, prefix_len); in mlxsw_reg_ralue_pack6()
7953 mlxsw_reg_ralue_dip6_memcpy_to(payload, dip); in mlxsw_reg_ralue_pack6()
7957 mlxsw_reg_ralue_act_remote_pack(char *payload, in mlxsw_reg_ralue_act_remote_pack() argument
7961 mlxsw_reg_ralue_action_type_set(payload, in mlxsw_reg_ralue_act_remote_pack()
7963 mlxsw_reg_ralue_trap_action_set(payload, trap_action); in mlxsw_reg_ralue_act_remote_pack()
7964 mlxsw_reg_ralue_trap_id_set(payload, trap_id); in mlxsw_reg_ralue_act_remote_pack()
7965 mlxsw_reg_ralue_adjacency_index_set(payload, adjacency_index); in mlxsw_reg_ralue_act_remote_pack()
7966 mlxsw_reg_ralue_ecmp_size_set(payload, ecmp_size); in mlxsw_reg_ralue_act_remote_pack()
7970 mlxsw_reg_ralue_act_local_pack(char *payload, in mlxsw_reg_ralue_act_local_pack() argument
7974 mlxsw_reg_ralue_action_type_set(payload, in mlxsw_reg_ralue_act_local_pack()
7976 mlxsw_reg_ralue_trap_action_set(payload, trap_action); in mlxsw_reg_ralue_act_local_pack()
7977 mlxsw_reg_ralue_trap_id_set(payload, trap_id); in mlxsw_reg_ralue_act_local_pack()
7978 mlxsw_reg_ralue_local_erif_set(payload, local_erif); in mlxsw_reg_ralue_act_local_pack()
7982 mlxsw_reg_ralue_act_ip2me_pack(char *payload) in mlxsw_reg_ralue_act_ip2me_pack() argument
7984 mlxsw_reg_ralue_action_type_set(payload, in mlxsw_reg_ralue_act_ip2me_pack()
7989 mlxsw_reg_ralue_act_ip2me_tun_pack(char *payload, u32 tunnel_ptr) in mlxsw_reg_ralue_act_ip2me_tun_pack() argument
7991 mlxsw_reg_ralue_action_type_set(payload, in mlxsw_reg_ralue_act_ip2me_tun_pack()
7993 mlxsw_reg_ralue_ip2me_v_set(payload, 1); in mlxsw_reg_ralue_act_ip2me_tun_pack()
7994 mlxsw_reg_ralue_ip2me_tunnel_ptr_set(payload, tunnel_ptr); in mlxsw_reg_ralue_act_ip2me_tun_pack()
8115 static inline void mlxsw_reg_rauht_pack(char *payload, in mlxsw_reg_rauht_pack() argument
8119 MLXSW_REG_ZERO(rauht, payload); in mlxsw_reg_rauht_pack()
8120 mlxsw_reg_rauht_op_set(payload, op); in mlxsw_reg_rauht_pack()
8121 mlxsw_reg_rauht_rif_set(payload, rif); in mlxsw_reg_rauht_pack()
8122 mlxsw_reg_rauht_mac_memcpy_to(payload, mac); in mlxsw_reg_rauht_pack()
8125 static inline void mlxsw_reg_rauht_pack4(char *payload, in mlxsw_reg_rauht_pack4() argument
8129 mlxsw_reg_rauht_pack(payload, op, rif, mac); in mlxsw_reg_rauht_pack4()
8130 mlxsw_reg_rauht_dip4_set(payload, dip); in mlxsw_reg_rauht_pack4()
8133 static inline void mlxsw_reg_rauht_pack6(char *payload, in mlxsw_reg_rauht_pack6() argument
8137 mlxsw_reg_rauht_pack(payload, op, rif, mac); in mlxsw_reg_rauht_pack6()
8138 mlxsw_reg_rauht_type_set(payload, MLXSW_REG_RAUHT_TYPE_IPV6); in mlxsw_reg_rauht_pack6()
8139 mlxsw_reg_rauht_dip6_memcpy_to(payload, dip); in mlxsw_reg_rauht_pack6()
8142 static inline void mlxsw_reg_rauht_pack_counter(char *payload, in mlxsw_reg_rauht_pack_counter() argument
8145 mlxsw_reg_rauht_counter_index_set(payload, counter_index); in mlxsw_reg_rauht_pack_counter()
8146 mlxsw_reg_rauht_counter_set_type_set(payload, in mlxsw_reg_rauht_pack_counter()
8198 static inline void mlxsw_reg_raleu_pack(char *payload, in mlxsw_reg_raleu_pack() argument
8205 MLXSW_REG_ZERO(raleu, payload); in mlxsw_reg_raleu_pack()
8206 mlxsw_reg_raleu_protocol_set(payload, protocol); in mlxsw_reg_raleu_pack()
8207 mlxsw_reg_raleu_virtual_router_set(payload, virtual_router); in mlxsw_reg_raleu_pack()
8208 mlxsw_reg_raleu_adjacency_index_set(payload, adjacency_index); in mlxsw_reg_raleu_pack()
8209 mlxsw_reg_raleu_ecmp_size_set(payload, ecmp_size); in mlxsw_reg_raleu_pack()
8210 mlxsw_reg_raleu_new_adjacency_index_set(payload, new_adjacency_index); in mlxsw_reg_raleu_pack()
8211 mlxsw_reg_raleu_new_ecmp_size_set(payload, new_ecmp_size); in mlxsw_reg_raleu_pack()
8292 static inline void mlxsw_reg_rauhtd_pack(char *payload, in mlxsw_reg_rauhtd_pack() argument
8295 MLXSW_REG_ZERO(rauhtd, payload); in mlxsw_reg_rauhtd_pack()
8296 mlxsw_reg_rauhtd_filter_fields_set(payload, MLXSW_REG_RAUHTD_FILTER_A); in mlxsw_reg_rauhtd_pack()
8297 mlxsw_reg_rauhtd_op_set(payload, MLXSW_REG_RAUHTD_OP_DUMP_AND_CLEAR); in mlxsw_reg_rauhtd_pack()
8298 mlxsw_reg_rauhtd_num_rec_set(payload, MLXSW_REG_RAUHTD_REC_MAX_NUM); in mlxsw_reg_rauhtd_pack()
8299 mlxsw_reg_rauhtd_entry_a_set(payload, 1); in mlxsw_reg_rauhtd_pack()
8300 mlxsw_reg_rauhtd_type_set(payload, type); in mlxsw_reg_rauhtd_pack()
8372 static inline void mlxsw_reg_rauhtd_ent_ipv4_unpack(char *payload, in mlxsw_reg_rauhtd_ent_ipv4_unpack() argument
8376 *p_rif = mlxsw_reg_rauhtd_ipv4_ent_rif_get(payload, ent_index); in mlxsw_reg_rauhtd_ent_ipv4_unpack()
8377 *p_dip = mlxsw_reg_rauhtd_ipv4_ent_dip_get(payload, ent_index); in mlxsw_reg_rauhtd_ent_ipv4_unpack()
8380 static inline void mlxsw_reg_rauhtd_ent_ipv6_unpack(char *payload, in mlxsw_reg_rauhtd_ent_ipv6_unpack() argument
8384 *p_rif = mlxsw_reg_rauhtd_ipv6_ent_rif_get(payload, rec_index); in mlxsw_reg_rauhtd_ent_ipv6_unpack()
8385 mlxsw_reg_rauhtd_ipv6_ent_dip_memcpy_from(payload, rec_index, p_dip); in mlxsw_reg_rauhtd_ent_ipv6_unpack()
8499 static inline void mlxsw_reg_rtdp_pack(char *payload, in mlxsw_reg_rtdp_pack() argument
8503 MLXSW_REG_ZERO(rtdp, payload); in mlxsw_reg_rtdp_pack()
8504 mlxsw_reg_rtdp_type_set(payload, type); in mlxsw_reg_rtdp_pack()
8505 mlxsw_reg_rtdp_tunnel_index_set(payload, tunnel_index); in mlxsw_reg_rtdp_pack()
8509 mlxsw_reg_rtdp_ipip_pack(char *payload, u16 irif, in mlxsw_reg_rtdp_ipip_pack() argument
8514 mlxsw_reg_rtdp_ipip_irif_set(payload, irif); in mlxsw_reg_rtdp_ipip_pack()
8515 mlxsw_reg_rtdp_ipip_sip_check_set(payload, sip_check); in mlxsw_reg_rtdp_ipip_pack()
8516 mlxsw_reg_rtdp_ipip_type_check_set(payload, type_check); in mlxsw_reg_rtdp_ipip_pack()
8517 mlxsw_reg_rtdp_ipip_gre_key_check_set(payload, gre_key_check); in mlxsw_reg_rtdp_ipip_pack()
8518 mlxsw_reg_rtdp_ipip_expected_gre_key_set(payload, expected_gre_key); in mlxsw_reg_rtdp_ipip_pack()
8522 mlxsw_reg_rtdp_ipip4_pack(char *payload, u16 irif, in mlxsw_reg_rtdp_ipip4_pack() argument
8527 mlxsw_reg_rtdp_ipip_pack(payload, irif, sip_check, type_check, in mlxsw_reg_rtdp_ipip4_pack()
8529 mlxsw_reg_rtdp_ipip_ipv4_usip_set(payload, ipv4_usip); in mlxsw_reg_rtdp_ipip4_pack()
8533 mlxsw_reg_rtdp_ipip6_pack(char *payload, u16 irif, in mlxsw_reg_rtdp_ipip6_pack() argument
8538 mlxsw_reg_rtdp_ipip_pack(payload, irif, sip_check, type_check, in mlxsw_reg_rtdp_ipip6_pack()
8540 mlxsw_reg_rtdp_ipip_ipv6_usip_ptr_set(payload, ipv6_usip_ptr); in mlxsw_reg_rtdp_ipip6_pack()
8566 static inline void mlxsw_reg_rips_pack(char *payload, u32 index, in mlxsw_reg_rips_pack() argument
8569 MLXSW_REG_ZERO(rips, payload); in mlxsw_reg_rips_pack()
8570 mlxsw_reg_rips_index_set(payload, index); in mlxsw_reg_rips_pack()
8571 mlxsw_reg_rips_ipv6_memcpy_to(payload, (const char *)ipv6); in mlxsw_reg_rips_pack()
8618 static inline void mlxsw_reg_ratrad_pack(char *payload, u32 adjacency_index, in mlxsw_reg_ratrad_pack() argument
8621 MLXSW_REG_ZERO(ratrad, payload); in mlxsw_reg_ratrad_pack()
8622 mlxsw_reg_ratrad_op_set(payload, in mlxsw_reg_ratrad_pack()
8624 mlxsw_reg_ratrad_ecmp_size_set(payload, ecmp_size); in mlxsw_reg_ratrad_pack()
8625 mlxsw_reg_ratrad_adjacency_index_set(payload, adjacency_index); in mlxsw_reg_ratrad_pack()
8692 static inline void mlxsw_reg_rigr2_pack(char *payload, u32 rigr_index, in mlxsw_reg_rigr2_pack() argument
8695 MLXSW_REG_ZERO(rigr2, payload); in mlxsw_reg_rigr2_pack()
8696 mlxsw_reg_rigr2_rigr_index_set(payload, rigr_index); in mlxsw_reg_rigr2_pack()
8697 mlxsw_reg_rigr2_vnext_set(payload, vnext); in mlxsw_reg_rigr2_pack()
8698 mlxsw_reg_rigr2_next_rigr_index_set(payload, next_rigr_index); in mlxsw_reg_rigr2_pack()
8699 mlxsw_reg_rigr2_vrmid_set(payload, 0); in mlxsw_reg_rigr2_pack()
8700 mlxsw_reg_rigr2_rmid_index_set(payload, 0); in mlxsw_reg_rigr2_pack()
8703 static inline void mlxsw_reg_rigr2_erif_entry_pack(char *payload, int index, in mlxsw_reg_rigr2_erif_entry_pack() argument
8706 mlxsw_reg_rigr2_erif_entry_v_set(payload, index, v); in mlxsw_reg_rigr2_erif_entry_pack()
8707 mlxsw_reg_rigr2_erif_entry_erif_set(payload, index, erif); in mlxsw_reg_rigr2_erif_entry_pack()
8837 static inline void mlxsw_reg_recr2_pack(char *payload, u32 seed) in mlxsw_reg_recr2_pack() argument
8839 MLXSW_REG_ZERO(recr2, payload); in mlxsw_reg_recr2_pack()
8840 mlxsw_reg_recr2_pp_set(payload, false); in mlxsw_reg_recr2_pack()
8841 mlxsw_reg_recr2_sh_set(payload, true); in mlxsw_reg_recr2_pack()
8842 mlxsw_reg_recr2_seed_set(payload, seed); in mlxsw_reg_recr2_pack()
8968 mlxsw_reg_rmft2_common_pack(char *payload, bool v, u16 offset, in mlxsw_reg_rmft2_common_pack() argument
8973 MLXSW_REG_ZERO(rmft2, payload); in mlxsw_reg_rmft2_common_pack()
8974 mlxsw_reg_rmft2_v_set(payload, v); in mlxsw_reg_rmft2_common_pack()
8975 mlxsw_reg_rmft2_op_set(payload, MLXSW_REG_RMFT2_OP_READ_WRITE); in mlxsw_reg_rmft2_common_pack()
8976 mlxsw_reg_rmft2_offset_set(payload, offset); in mlxsw_reg_rmft2_common_pack()
8977 mlxsw_reg_rmft2_virtual_router_set(payload, virtual_router); in mlxsw_reg_rmft2_common_pack()
8978 mlxsw_reg_rmft2_irif_mask_set(payload, irif_mask); in mlxsw_reg_rmft2_common_pack()
8979 mlxsw_reg_rmft2_irif_set(payload, irif); in mlxsw_reg_rmft2_common_pack()
8981 mlxsw_reg_rmft2_flexible_action_set_memcpy_to(payload, in mlxsw_reg_rmft2_common_pack()
8986 mlxsw_reg_rmft2_ipv4_pack(char *payload, bool v, u16 offset, u16 virtual_router, in mlxsw_reg_rmft2_ipv4_pack() argument
8991 mlxsw_reg_rmft2_common_pack(payload, v, offset, virtual_router, in mlxsw_reg_rmft2_ipv4_pack()
8993 mlxsw_reg_rmft2_type_set(payload, MLXSW_REG_RMFT2_TYPE_IPV4); in mlxsw_reg_rmft2_ipv4_pack()
8994 mlxsw_reg_rmft2_dip4_set(payload, dip4); in mlxsw_reg_rmft2_ipv4_pack()
8995 mlxsw_reg_rmft2_dip4_mask_set(payload, dip4_mask); in mlxsw_reg_rmft2_ipv4_pack()
8996 mlxsw_reg_rmft2_sip4_set(payload, sip4); in mlxsw_reg_rmft2_ipv4_pack()
8997 mlxsw_reg_rmft2_sip4_mask_set(payload, sip4_mask); in mlxsw_reg_rmft2_ipv4_pack()
9001 mlxsw_reg_rmft2_ipv6_pack(char *payload, bool v, u16 offset, u16 virtual_router, in mlxsw_reg_rmft2_ipv6_pack() argument
9007 mlxsw_reg_rmft2_common_pack(payload, v, offset, virtual_router, in mlxsw_reg_rmft2_ipv6_pack()
9009 mlxsw_reg_rmft2_type_set(payload, MLXSW_REG_RMFT2_TYPE_IPV6); in mlxsw_reg_rmft2_ipv6_pack()
9010 mlxsw_reg_rmft2_dip6_memcpy_to(payload, (void *)&dip6); in mlxsw_reg_rmft2_ipv6_pack()
9011 mlxsw_reg_rmft2_dip6_mask_memcpy_to(payload, (void *)&dip6_mask); in mlxsw_reg_rmft2_ipv6_pack()
9012 mlxsw_reg_rmft2_sip6_memcpy_to(payload, (void *)&sip6); in mlxsw_reg_rmft2_ipv6_pack()
9013 mlxsw_reg_rmft2_sip6_mask_memcpy_to(payload, (void *)&sip6_mask); in mlxsw_reg_rmft2_ipv6_pack()
9067 static inline void mlxsw_reg_reiv_pack(char *payload, u8 port_page, u16 erif) in mlxsw_reg_reiv_pack() argument
9069 MLXSW_REG_ZERO(reiv, payload); in mlxsw_reg_reiv_pack()
9070 mlxsw_reg_reiv_port_page_set(payload, port_page); in mlxsw_reg_reiv_pack()
9071 mlxsw_reg_reiv_erif_set(payload, erif); in mlxsw_reg_reiv_pack()
9117 mlxsw_reg_mfcr_pack(char *payload, in mlxsw_reg_mfcr_pack() argument
9120 MLXSW_REG_ZERO(mfcr, payload); in mlxsw_reg_mfcr_pack()
9121 mlxsw_reg_mfcr_pwm_frequency_set(payload, pwm_frequency); in mlxsw_reg_mfcr_pack()
9125 mlxsw_reg_mfcr_unpack(char *payload, in mlxsw_reg_mfcr_unpack() argument
9129 *p_pwm_frequency = mlxsw_reg_mfcr_pwm_frequency_get(payload); in mlxsw_reg_mfcr_unpack()
9130 *p_tacho_active = mlxsw_reg_mfcr_tacho_active_get(payload); in mlxsw_reg_mfcr_unpack()
9131 *p_pwm_active = mlxsw_reg_mfcr_pwm_active_get(payload); in mlxsw_reg_mfcr_unpack()
9156 static inline void mlxsw_reg_mfsc_pack(char *payload, u8 pwm, in mlxsw_reg_mfsc_pack() argument
9159 MLXSW_REG_ZERO(mfsc, payload); in mlxsw_reg_mfsc_pack()
9160 mlxsw_reg_mfsc_pwm_set(payload, pwm); in mlxsw_reg_mfsc_pack()
9161 mlxsw_reg_mfsc_pwm_duty_cycle_set(payload, pwm_duty_cycle); in mlxsw_reg_mfsc_pack()
9186 static inline void mlxsw_reg_mfsm_pack(char *payload, u8 tacho) in mlxsw_reg_mfsm_pack() argument
9188 MLXSW_REG_ZERO(mfsm, payload); in mlxsw_reg_mfsm_pack()
9189 mlxsw_reg_mfsm_tacho_set(payload, tacho); in mlxsw_reg_mfsm_pack()
9221 static inline void mlxsw_reg_mfsl_pack(char *payload, u8 tacho, in mlxsw_reg_mfsl_pack() argument
9224 MLXSW_REG_ZERO(mfsl, payload); in mlxsw_reg_mfsl_pack()
9225 mlxsw_reg_mfsl_tacho_set(payload, tacho); in mlxsw_reg_mfsl_pack()
9226 mlxsw_reg_mfsl_tach_min_set(payload, tach_min); in mlxsw_reg_mfsl_pack()
9227 mlxsw_reg_mfsl_tach_max_set(payload, tach_max); in mlxsw_reg_mfsl_pack()
9230 static inline void mlxsw_reg_mfsl_unpack(char *payload, u8 tacho, in mlxsw_reg_mfsl_unpack() argument
9234 *p_tach_min = mlxsw_reg_mfsl_tach_min_get(payload); in mlxsw_reg_mfsl_unpack()
9237 *p_tach_max = mlxsw_reg_mfsl_tach_max_get(payload); in mlxsw_reg_mfsl_unpack()
9258 static inline void mlxsw_reg_fore_unpack(char *payload, u8 tacho, in mlxsw_reg_fore_unpack() argument
9264 limit = mlxsw_reg_fore_fan_under_limit_get(payload); in mlxsw_reg_fore_unpack()
9392 static inline void mlxsw_reg_mtmp_pack(char *payload, u8 slot_index, in mlxsw_reg_mtmp_pack() argument
9396 MLXSW_REG_ZERO(mtmp, payload); in mlxsw_reg_mtmp_pack()
9397 mlxsw_reg_mtmp_slot_index_set(payload, slot_index); in mlxsw_reg_mtmp_pack()
9398 mlxsw_reg_mtmp_sensor_index_set(payload, sensor_index); in mlxsw_reg_mtmp_pack()
9399 mlxsw_reg_mtmp_mte_set(payload, max_temp_enable); in mlxsw_reg_mtmp_pack()
9400 mlxsw_reg_mtmp_mtr_set(payload, max_temp_reset); in mlxsw_reg_mtmp_pack()
9401 mlxsw_reg_mtmp_temperature_threshold_hi_set(payload, in mlxsw_reg_mtmp_pack()
9405 static inline void mlxsw_reg_mtmp_unpack(char *payload, int *p_temp, in mlxsw_reg_mtmp_unpack() argument
9413 temp = mlxsw_reg_mtmp_temperature_get(payload); in mlxsw_reg_mtmp_unpack()
9417 temp = mlxsw_reg_mtmp_max_temperature_get(payload); in mlxsw_reg_mtmp_unpack()
9421 temp = mlxsw_reg_mtmp_temperature_threshold_hi_get(payload); in mlxsw_reg_mtmp_unpack()
9425 temp = mlxsw_reg_mtmp_max_operational_temperature_get(payload); in mlxsw_reg_mtmp_unpack()
9429 mlxsw_reg_mtmp_sensor_name_memcpy_from(payload, sensor_name); in mlxsw_reg_mtmp_unpack()
9501 static inline void mlxsw_reg_mtbr_pack(char *payload, u8 slot_index, in mlxsw_reg_mtbr_pack() argument
9504 MLXSW_REG_ZERO(mtbr, payload); in mlxsw_reg_mtbr_pack()
9505 mlxsw_reg_mtbr_slot_index_set(payload, slot_index); in mlxsw_reg_mtbr_pack()
9506 mlxsw_reg_mtbr_base_sensor_index_set(payload, base_sensor_index); in mlxsw_reg_mtbr_pack()
9507 mlxsw_reg_mtbr_num_rec_set(payload, num_rec); in mlxsw_reg_mtbr_pack()
9521 static inline void mlxsw_reg_mtbr_temp_unpack(char *payload, int rec_ind, in mlxsw_reg_mtbr_temp_unpack() argument
9525 *p_temp = mlxsw_reg_mtbr_rec_temp_get(payload, rec_ind); in mlxsw_reg_mtbr_temp_unpack()
9527 *p_max_temp = mlxsw_reg_mtbr_rec_max_temp_get(payload, rec_ind); in mlxsw_reg_mtbr_temp_unpack()
9659 static inline void mlxsw_reg_mcia_pack(char *payload, u8 slot_index, u8 module, in mlxsw_reg_mcia_pack() argument
9664 MLXSW_REG_ZERO(mcia, payload); in mlxsw_reg_mcia_pack()
9665 mlxsw_reg_mcia_slot_set(payload, slot_index); in mlxsw_reg_mcia_pack()
9666 mlxsw_reg_mcia_module_set(payload, module); in mlxsw_reg_mcia_pack()
9667 mlxsw_reg_mcia_l_set(payload, lock); in mlxsw_reg_mcia_pack()
9668 mlxsw_reg_mcia_page_number_set(payload, page_number); in mlxsw_reg_mcia_pack()
9669 mlxsw_reg_mcia_device_address_set(payload, device_addr); in mlxsw_reg_mcia_pack()
9670 mlxsw_reg_mcia_size_set(payload, size); in mlxsw_reg_mcia_pack()
9671 mlxsw_reg_mcia_i2c_device_address_set(payload, i2c_device_addr); in mlxsw_reg_mcia_pack()
9843 static inline void mlxsw_reg_mpat_pack(char *payload, u8 pa_id, in mlxsw_reg_mpat_pack() argument
9847 MLXSW_REG_ZERO(mpat, payload); in mlxsw_reg_mpat_pack()
9848 mlxsw_reg_mpat_pa_id_set(payload, pa_id); in mlxsw_reg_mpat_pack()
9849 mlxsw_reg_mpat_system_port_set(payload, system_port); in mlxsw_reg_mpat_pack()
9850 mlxsw_reg_mpat_e_set(payload, e); in mlxsw_reg_mpat_pack()
9851 mlxsw_reg_mpat_qos_set(payload, 1); in mlxsw_reg_mpat_pack()
9852 mlxsw_reg_mpat_be_set(payload, 1); in mlxsw_reg_mpat_pack()
9853 mlxsw_reg_mpat_span_type_set(payload, span_type); in mlxsw_reg_mpat_pack()
9856 static inline void mlxsw_reg_mpat_eth_rspan_pack(char *payload, u16 vid) in mlxsw_reg_mpat_eth_rspan_pack() argument
9858 mlxsw_reg_mpat_eth_rspan_vid_set(payload, vid); in mlxsw_reg_mpat_eth_rspan_pack()
9862 mlxsw_reg_mpat_eth_rspan_l2_pack(char *payload, in mlxsw_reg_mpat_eth_rspan_l2_pack() argument
9867 mlxsw_reg_mpat_eth_rspan_version_set(payload, version); in mlxsw_reg_mpat_eth_rspan_l2_pack()
9868 mlxsw_reg_mpat_eth_rspan_mac_memcpy_to(payload, mac); in mlxsw_reg_mpat_eth_rspan_l2_pack()
9869 mlxsw_reg_mpat_eth_rspan_tp_set(payload, tp); in mlxsw_reg_mpat_eth_rspan_l2_pack()
9873 mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack(char *payload, u8 ttl, in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack() argument
9877 mlxsw_reg_mpat_eth_rspan_ttl_set(payload, ttl); in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
9878 mlxsw_reg_mpat_eth_rspan_smac_memcpy_to(payload, smac); in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
9879 mlxsw_reg_mpat_eth_rspan_protocol_set(payload, in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
9881 mlxsw_reg_mpat_eth_rspan_sip4_set(payload, sip); in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
9882 mlxsw_reg_mpat_eth_rspan_dip4_set(payload, dip); in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
9886 mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack(char *payload, u8 ttl, in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack() argument
9890 mlxsw_reg_mpat_eth_rspan_ttl_set(payload, ttl); in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
9891 mlxsw_reg_mpat_eth_rspan_smac_memcpy_to(payload, smac); in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
9892 mlxsw_reg_mpat_eth_rspan_protocol_set(payload, in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
9894 mlxsw_reg_mpat_eth_rspan_sip6_memcpy_to(payload, (void *)&sip); in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
9895 mlxsw_reg_mpat_eth_rspan_dip6_memcpy_to(payload, (void *)&dip); in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
9949 static inline void mlxsw_reg_mpar_pack(char *payload, u16 local_port, in mlxsw_reg_mpar_pack() argument
9954 MLXSW_REG_ZERO(mpar, payload); in mlxsw_reg_mpar_pack()
9955 mlxsw_reg_mpar_local_port_set(payload, local_port); in mlxsw_reg_mpar_pack()
9956 mlxsw_reg_mpar_enable_set(payload, enable); in mlxsw_reg_mpar_pack()
9957 mlxsw_reg_mpar_i_e_set(payload, i_e); in mlxsw_reg_mpar_pack()
9958 mlxsw_reg_mpar_pa_id_set(payload, pa_id); in mlxsw_reg_mpar_pack()
9959 mlxsw_reg_mpar_probability_rate_set(payload, probability_rate); in mlxsw_reg_mpar_pack()
10000 static inline void mlxsw_reg_mgir_pack(char *payload) in mlxsw_reg_mgir_pack() argument
10002 MLXSW_REG_ZERO(mgir, payload); in mlxsw_reg_mgir_pack()
10006 mlxsw_reg_mgir_unpack(char *payload, u32 *hw_rev, char *fw_info_psid, in mlxsw_reg_mgir_unpack() argument
10009 *hw_rev = mlxsw_reg_mgir_hw_info_device_hw_revision_get(payload); in mlxsw_reg_mgir_unpack()
10010 mlxsw_reg_mgir_fw_info_psid_memcpy_from(payload, fw_info_psid); in mlxsw_reg_mgir_unpack()
10011 *fw_major = mlxsw_reg_mgir_fw_info_extended_major_get(payload); in mlxsw_reg_mgir_unpack()
10012 *fw_minor = mlxsw_reg_mgir_fw_info_extended_minor_get(payload); in mlxsw_reg_mgir_unpack()
10013 *fw_sub_minor = mlxsw_reg_mgir_fw_info_extended_sub_minor_get(payload); in mlxsw_reg_mgir_unpack()
10034 static inline void mlxsw_reg_mrsr_pack(char *payload) in mlxsw_reg_mrsr_pack() argument
10036 MLXSW_REG_ZERO(mrsr, payload); in mlxsw_reg_mrsr_pack()
10037 mlxsw_reg_mrsr_command_set(payload, 1); in mlxsw_reg_mrsr_pack()
10072 static inline void mlxsw_reg_mlcr_pack(char *payload, u16 local_port, in mlxsw_reg_mlcr_pack() argument
10075 MLXSW_REG_ZERO(mlcr, payload); in mlxsw_reg_mlcr_pack()
10076 mlxsw_reg_mlcr_local_port_set(payload, local_port); in mlxsw_reg_mlcr_pack()
10077 mlxsw_reg_mlcr_beacon_duration_set(payload, active ? in mlxsw_reg_mlcr_pack()
10114 static inline void mlxsw_reg_mcion_pack(char *payload, u8 slot_index, u8 module) in mlxsw_reg_mcion_pack() argument
10116 MLXSW_REG_ZERO(mcion, payload); in mlxsw_reg_mcion_pack()
10117 mlxsw_reg_mcion_slot_index_set(payload, slot_index); in mlxsw_reg_mcion_pack()
10118 mlxsw_reg_mcion_module_set(payload, module); in mlxsw_reg_mcion_pack()
10168 mlxsw_reg_mtpps_vpin_pack(char *payload, u64 time_stamp) in mlxsw_reg_mtpps_vpin_pack() argument
10170 MLXSW_REG_ZERO(mtpps, payload); in mlxsw_reg_mtpps_vpin_pack()
10171 mlxsw_reg_mtpps_pin_set(payload, MLXSW_REG_MTPPS_PIN_SP_VIRTUAL_PIN); in mlxsw_reg_mtpps_vpin_pack()
10172 mlxsw_reg_mtpps_pin_mode_set(payload, in mlxsw_reg_mtpps_vpin_pack()
10174 mlxsw_reg_mtpps_enable_set(payload, true); in mlxsw_reg_mtpps_vpin_pack()
10175 mlxsw_reg_mtpps_time_stamp_set(payload, time_stamp); in mlxsw_reg_mtpps_vpin_pack()
10238 mlxsw_reg_mtutc_pack(char *payload, enum mlxsw_reg_mtutc_operation oper, in mlxsw_reg_mtutc_pack() argument
10241 MLXSW_REG_ZERO(mtutc, payload); in mlxsw_reg_mtutc_pack()
10242 mlxsw_reg_mtutc_operation_set(payload, oper); in mlxsw_reg_mtutc_pack()
10243 mlxsw_reg_mtutc_freq_adjustment_set(payload, freq_adj); in mlxsw_reg_mtutc_pack()
10244 mlxsw_reg_mtutc_utc_sec_set(payload, utc_sec); in mlxsw_reg_mtutc_pack()
10245 mlxsw_reg_mtutc_utc_nsec_set(payload, utc_nsec); in mlxsw_reg_mtutc_pack()
10246 mlxsw_reg_mtutc_time_adjustment_set(payload, time_adj); in mlxsw_reg_mtutc_pack()
10309 static inline void mlxsw_reg_mcqi_pack(char *payload, u16 component_index) in mlxsw_reg_mcqi_pack() argument
10311 MLXSW_REG_ZERO(mcqi, payload); in mlxsw_reg_mcqi_pack()
10312 mlxsw_reg_mcqi_component_index_set(payload, component_index); in mlxsw_reg_mcqi_pack()
10313 mlxsw_reg_mcqi_info_type_set(payload, in mlxsw_reg_mcqi_pack()
10315 mlxsw_reg_mcqi_offset_set(payload, 0); in mlxsw_reg_mcqi_pack()
10316 mlxsw_reg_mcqi_data_size_set(payload, MLXSW_REG_MCQI_CAP_LEN); in mlxsw_reg_mcqi_pack()
10319 static inline void mlxsw_reg_mcqi_unpack(char *payload, in mlxsw_reg_mcqi_unpack() argument
10325 mlxsw_reg_mcqi_cap_max_component_size_get(payload); in mlxsw_reg_mcqi_unpack()
10327 mlxsw_reg_mcqi_cap_log_mcda_word_size_get(payload); in mlxsw_reg_mcqi_unpack()
10329 mlxsw_reg_mcqi_cap_mcda_max_write_size_get(payload); in mlxsw_reg_mcqi_unpack()
10391 static inline void mlxsw_reg_mcc_pack(char *payload, in mlxsw_reg_mcc_pack() argument
10396 MLXSW_REG_ZERO(mcc, payload); in mlxsw_reg_mcc_pack()
10397 mlxsw_reg_mcc_instruction_set(payload, instr); in mlxsw_reg_mcc_pack()
10398 mlxsw_reg_mcc_component_index_set(payload, component_index); in mlxsw_reg_mcc_pack()
10399 mlxsw_reg_mcc_update_handle_set(payload, update_handle); in mlxsw_reg_mcc_pack()
10400 mlxsw_reg_mcc_component_size_set(payload, component_size); in mlxsw_reg_mcc_pack()
10403 static inline void mlxsw_reg_mcc_unpack(char *payload, u32 *p_update_handle, in mlxsw_reg_mcc_unpack() argument
10407 *p_update_handle = mlxsw_reg_mcc_update_handle_get(payload); in mlxsw_reg_mcc_unpack()
10409 *p_error_code = mlxsw_reg_mcc_error_code_get(payload); in mlxsw_reg_mcc_unpack()
10411 *p_control_state = mlxsw_reg_mcc_control_state_get(payload); in mlxsw_reg_mcc_unpack()
10451 static inline void mlxsw_reg_mcda_pack(char *payload, u32 update_handle, in mlxsw_reg_mcda_pack() argument
10456 MLXSW_REG_ZERO(mcda, payload); in mlxsw_reg_mcda_pack()
10457 mlxsw_reg_mcda_update_handle_set(payload, update_handle); in mlxsw_reg_mcda_pack()
10458 mlxsw_reg_mcda_offset_set(payload, offset); in mlxsw_reg_mcda_pack()
10459 mlxsw_reg_mcda_size_set(payload, size); in mlxsw_reg_mcda_pack()
10462 mlxsw_reg_mcda_data_set(payload, i, *(u32 *) &data[i * 4]); in mlxsw_reg_mcda_pack()
10496 static inline void mlxsw_reg_mpsc_pack(char *payload, u16 local_port, bool e, in mlxsw_reg_mpsc_pack() argument
10499 MLXSW_REG_ZERO(mpsc, payload); in mlxsw_reg_mpsc_pack()
10500 mlxsw_reg_mpsc_local_port_set(payload, local_port); in mlxsw_reg_mpsc_pack()
10501 mlxsw_reg_mpsc_e_set(payload, e); in mlxsw_reg_mpsc_pack()
10502 mlxsw_reg_mpsc_rate_set(payload, rate); in mlxsw_reg_mpsc_pack()
10550 static inline void mlxsw_reg_mgpc_pack(char *payload, u32 counter_index, in mlxsw_reg_mgpc_pack() argument
10554 MLXSW_REG_ZERO(mgpc, payload); in mlxsw_reg_mgpc_pack()
10555 mlxsw_reg_mgpc_counter_index_set(payload, counter_index); in mlxsw_reg_mgpc_pack()
10556 mlxsw_reg_mgpc_counter_set_type_set(payload, set_type); in mlxsw_reg_mgpc_pack()
10557 mlxsw_reg_mgpc_opcode_set(payload, opcode); in mlxsw_reg_mgpc_pack()
10594 static inline void mlxsw_reg_mprs_pack(char *payload, u16 parsing_depth, in mlxsw_reg_mprs_pack() argument
10597 MLXSW_REG_ZERO(mprs, payload); in mlxsw_reg_mprs_pack()
10598 mlxsw_reg_mprs_parsing_depth_set(payload, parsing_depth); in mlxsw_reg_mprs_pack()
10599 mlxsw_reg_mprs_parsing_en_set(payload, true); in mlxsw_reg_mprs_pack()
10600 mlxsw_reg_mprs_vxlan_udp_dport_set(payload, vxlan_udp_dport); in mlxsw_reg_mprs_pack()
10680 static inline void mlxsw_reg_mpagr_pack(char *payload, in mlxsw_reg_mpagr_pack() argument
10684 MLXSW_REG_ZERO(mpagr, payload); in mlxsw_reg_mpagr_pack()
10685 mlxsw_reg_mpagr_trigger_set(payload, trigger); in mlxsw_reg_mpagr_pack()
10686 mlxsw_reg_mpagr_pa_id_set(payload, pa_id); in mlxsw_reg_mpagr_pack()
10687 mlxsw_reg_mpagr_probability_rate_set(payload, probability_rate); in mlxsw_reg_mpagr_pack()
10731 static inline void mlxsw_reg_momte_pack(char *payload, u16 local_port, in mlxsw_reg_momte_pack() argument
10734 MLXSW_REG_ZERO(momte, payload); in mlxsw_reg_momte_pack()
10735 mlxsw_reg_momte_local_port_set(payload, local_port); in mlxsw_reg_momte_pack()
10736 mlxsw_reg_momte_type_set(payload, type); in mlxsw_reg_momte_pack()
10769 static inline void mlxsw_reg_mtpppc_pack(char *payload, u16 ing, u16 egr) in mlxsw_reg_mtpppc_pack() argument
10771 MLXSW_REG_ZERO(mtpppc, payload); in mlxsw_reg_mtpppc_pack()
10772 mlxsw_reg_mtpppc_ing_timestamp_message_type_set(payload, ing); in mlxsw_reg_mtpppc_pack()
10773 mlxsw_reg_mtpppc_egr_timestamp_message_type_set(payload, egr); in mlxsw_reg_mtpppc_pack()
10868 static inline void mlxsw_reg_mtpptr_unpack(const char *payload, in mlxsw_reg_mtpptr_unpack() argument
10877 *p_message_type = mlxsw_reg_mtpptr_rec_message_type_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
10878 *p_domain_number = mlxsw_reg_mtpptr_rec_domain_number_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
10879 *p_sequence_id = mlxsw_reg_mtpptr_rec_sequence_id_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
10880 timestamp_high = mlxsw_reg_mtpptr_rec_timestamp_high_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
10881 timestamp_low = mlxsw_reg_mtpptr_rec_timestamp_low_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
10914 static inline void mlxsw_reg_mtptpt_pack(char *payload, in mlxsw_reg_mtptpt_pack() argument
10918 MLXSW_REG_ZERO(mtptpt, payload); in mlxsw_reg_mtptpt_pack()
10919 mlxsw_reg_mtptpt_trap_id_set(payload, trap_id); in mlxsw_reg_mtptpt_pack()
10920 mlxsw_reg_mtptpt_message_type_set(payload, message_type); in mlxsw_reg_mtptpt_pack()
10972 static inline void mlxsw_reg_mtpcpc_pack(char *payload, bool pport, in mlxsw_reg_mtpcpc_pack() argument
10976 MLXSW_REG_ZERO(mtpcpc, payload); in mlxsw_reg_mtpcpc_pack()
10977 mlxsw_reg_mtpcpc_pport_set(payload, pport); in mlxsw_reg_mtpcpc_pack()
10978 mlxsw_reg_mtpcpc_local_port_set(payload, pport ? local_port : 0); in mlxsw_reg_mtpcpc_pack()
10979 mlxsw_reg_mtpcpc_ptp_trap_en_set(payload, ptp_trap_en); in mlxsw_reg_mtpcpc_pack()
10980 mlxsw_reg_mtpcpc_ing_correction_message_type_set(payload, ing); in mlxsw_reg_mtpcpc_pack()
10981 mlxsw_reg_mtpcpc_egr_correction_message_type_set(payload, egr); in mlxsw_reg_mtpcpc_pack()
11060 static inline void mlxsw_reg_mgpir_pack(char *payload, u8 slot_index) in mlxsw_reg_mgpir_pack() argument
11062 MLXSW_REG_ZERO(mgpir, payload); in mlxsw_reg_mgpir_pack()
11063 mlxsw_reg_mgpir_slot_index_set(payload, slot_index); in mlxsw_reg_mgpir_pack()
11067 mlxsw_reg_mgpir_unpack(char *payload, u8 *num_of_devices, in mlxsw_reg_mgpir_unpack() argument
11073 *num_of_devices = mlxsw_reg_mgpir_num_of_devices_get(payload); in mlxsw_reg_mgpir_unpack()
11075 *device_type = mlxsw_reg_mgpir_device_type_get(payload); in mlxsw_reg_mgpir_unpack()
11078 mlxsw_reg_mgpir_devices_per_flash_get(payload); in mlxsw_reg_mgpir_unpack()
11080 *num_of_modules = mlxsw_reg_mgpir_num_of_modules_get(payload); in mlxsw_reg_mgpir_unpack()
11082 *num_of_slots = mlxsw_reg_mgpir_num_of_slots_get(payload); in mlxsw_reg_mgpir_unpack()
11174 static inline void mlxsw_reg_mbct_pack(char *payload, u8 slot_index, in mlxsw_reg_mbct_pack() argument
11177 MLXSW_REG_ZERO(mbct, payload); in mlxsw_reg_mbct_pack()
11178 mlxsw_reg_mbct_slot_index_set(payload, slot_index); in mlxsw_reg_mbct_pack()
11179 mlxsw_reg_mbct_op_set(payload, op); in mlxsw_reg_mbct_pack()
11180 mlxsw_reg_mbct_oee_set(payload, oee); in mlxsw_reg_mbct_pack()
11183 static inline void mlxsw_reg_mbct_dt_pack(char *payload, in mlxsw_reg_mbct_dt_pack() argument
11189 mlxsw_reg_mbct_data_size_set(payload, data_size); in mlxsw_reg_mbct_dt_pack()
11190 mlxsw_reg_mbct_last_set(payload, last); in mlxsw_reg_mbct_dt_pack()
11191 mlxsw_reg_mbct_data_memcpy_to(payload, data); in mlxsw_reg_mbct_dt_pack()
11195 mlxsw_reg_mbct_unpack(const char *payload, u8 *p_slot_index, in mlxsw_reg_mbct_unpack() argument
11200 *p_slot_index = mlxsw_reg_mbct_slot_index_get(payload); in mlxsw_reg_mbct_unpack()
11201 *p_status = mlxsw_reg_mbct_status_get(payload); in mlxsw_reg_mbct_unpack()
11203 *p_fsm_state = mlxsw_reg_mbct_fsm_state_get(payload); in mlxsw_reg_mbct_unpack()
11268 static inline char *mlxsw_reg_mddt_inner_payload(char *payload) in mlxsw_reg_mddt_inner_payload() argument
11270 return payload + MLXSW_REG_MDDT_PAYLOAD_OFFSET + in mlxsw_reg_mddt_inner_payload()
11274 static inline void mlxsw_reg_mddt_pack(char *payload, u8 slot_index, in mlxsw_reg_mddt_pack() argument
11285 MLXSW_REG_ZERO(mddt, payload); in mlxsw_reg_mddt_pack()
11286 mlxsw_reg_mddt_slot_index_set(payload, slot_index); in mlxsw_reg_mddt_pack()
11287 mlxsw_reg_mddt_device_index_set(payload, device_index); in mlxsw_reg_mddt_pack()
11288 mlxsw_reg_mddt_method_set(payload, method); in mlxsw_reg_mddt_pack()
11289 mlxsw_reg_mddt_register_id_set(payload, reg->id); in mlxsw_reg_mddt_pack()
11290 mlxsw_reg_mddt_read_size_set(payload, len / 4); in mlxsw_reg_mddt_pack()
11291 mlxsw_reg_mddt_write_size_set(payload, len / 4); in mlxsw_reg_mddt_pack()
11292 *inner_payload = mlxsw_reg_mddt_inner_payload(payload); in mlxsw_reg_mddt_pack()
11408 __mlxsw_reg_mddq_pack(char *payload, u8 slot_index, in __mlxsw_reg_mddq_pack() argument
11411 MLXSW_REG_ZERO(mddq, payload); in __mlxsw_reg_mddq_pack()
11412 mlxsw_reg_mddq_slot_index_set(payload, slot_index); in __mlxsw_reg_mddq_pack()
11413 mlxsw_reg_mddq_query_type_set(payload, query_type); in __mlxsw_reg_mddq_pack()
11417 mlxsw_reg_mddq_slot_info_pack(char *payload, u8 slot_index, bool sie) in mlxsw_reg_mddq_slot_info_pack() argument
11419 __mlxsw_reg_mddq_pack(payload, slot_index, in mlxsw_reg_mddq_slot_info_pack()
11421 mlxsw_reg_mddq_sie_set(payload, sie); in mlxsw_reg_mddq_slot_info_pack()
11425 mlxsw_reg_mddq_slot_info_unpack(const char *payload, u8 *p_slot_index, in mlxsw_reg_mddq_slot_info_unpack() argument
11432 *p_slot_index = mlxsw_reg_mddq_slot_index_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11433 *p_provisioned = mlxsw_reg_mddq_slot_info_provisioned_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11434 *p_sr_valid = mlxsw_reg_mddq_slot_info_sr_valid_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11435 *p_lc_ready = mlxsw_reg_mddq_slot_info_lc_ready_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11436 *p_active = mlxsw_reg_mddq_slot_info_active_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11437 *p_hw_revision = mlxsw_reg_mddq_slot_info_hw_revision_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11438 *p_ini_file_version = mlxsw_reg_mddq_slot_info_ini_file_version_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11439 *p_card_type = mlxsw_reg_mddq_slot_info_card_type_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11474 mlxsw_reg_mddq_device_info_pack(char *payload, u8 slot_index, in mlxsw_reg_mddq_device_info_pack() argument
11477 __mlxsw_reg_mddq_pack(payload, slot_index, in mlxsw_reg_mddq_device_info_pack()
11479 mlxsw_reg_mddq_request_msg_seq_set(payload, request_msg_seq); in mlxsw_reg_mddq_device_info_pack()
11483 mlxsw_reg_mddq_device_info_unpack(const char *payload, u8 *p_response_msg_seq, in mlxsw_reg_mddq_device_info_unpack() argument
11488 *p_response_msg_seq = mlxsw_reg_mddq_response_msg_seq_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11489 *p_data_valid = mlxsw_reg_mddq_data_valid_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11490 *p_flash_owner = mlxsw_reg_mddq_device_info_flash_owner_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11491 *p_device_index = mlxsw_reg_mddq_device_info_device_index_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11492 *p_fw_major = mlxsw_reg_mddq_device_info_fw_major_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11493 *p_fw_minor = mlxsw_reg_mddq_device_info_fw_minor_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11494 *p_fw_sub_minor = mlxsw_reg_mddq_device_info_fw_sub_minor_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11507 mlxsw_reg_mddq_slot_name_pack(char *payload, u8 slot_index) in mlxsw_reg_mddq_slot_name_pack() argument
11509 __mlxsw_reg_mddq_pack(payload, slot_index, in mlxsw_reg_mddq_slot_name_pack()
11514 mlxsw_reg_mddq_slot_name_unpack(const char *payload, char *slot_ascii_name) in mlxsw_reg_mddq_slot_name_unpack() argument
11516 mlxsw_reg_mddq_slot_ascii_name_memcpy_from(payload, slot_ascii_name); in mlxsw_reg_mddq_slot_name_unpack()
11546 static inline void mlxsw_reg_mddc_pack(char *payload, u8 slot_index, bool rst, in mlxsw_reg_mddc_pack() argument
11549 MLXSW_REG_ZERO(mddc, payload); in mlxsw_reg_mddc_pack()
11550 mlxsw_reg_mddc_slot_index_set(payload, slot_index); in mlxsw_reg_mddc_pack()
11551 mlxsw_reg_mddc_rst_set(payload, rst); in mlxsw_reg_mddc_pack()
11552 mlxsw_reg_mddc_device_enable_set(payload, device_enable); in mlxsw_reg_mddc_pack()
11906 static inline void mlxsw_reg_tngcr_pack(char *payload, in mlxsw_reg_tngcr_pack() argument
11910 MLXSW_REG_ZERO(tngcr, payload); in mlxsw_reg_tngcr_pack()
11911 mlxsw_reg_tngcr_type_set(payload, type); in mlxsw_reg_tngcr_pack()
11912 mlxsw_reg_tngcr_nve_valid_set(payload, valid); in mlxsw_reg_tngcr_pack()
11913 mlxsw_reg_tngcr_nve_ttl_uc_set(payload, ttl); in mlxsw_reg_tngcr_pack()
11914 mlxsw_reg_tngcr_nve_ttl_mc_set(payload, ttl); in mlxsw_reg_tngcr_pack()
11915 mlxsw_reg_tngcr_nve_flc_set(payload, MLXSW_REG_TNGCR_FL_NO_COPY); in mlxsw_reg_tngcr_pack()
11916 mlxsw_reg_tngcr_nve_flh_set(payload, 0); in mlxsw_reg_tngcr_pack()
11917 mlxsw_reg_tngcr_nve_udp_sport_type_set(payload, in mlxsw_reg_tngcr_pack()
11919 mlxsw_reg_tngcr_nve_udp_sport_prefix_set(payload, 0); in mlxsw_reg_tngcr_pack()
11920 mlxsw_reg_tngcr_nve_group_size_mc_set(payload, 1); in mlxsw_reg_tngcr_pack()
11921 mlxsw_reg_tngcr_nve_group_size_flood_set(payload, 1); in mlxsw_reg_tngcr_pack()
11991 static inline void mlxsw_reg_tnumt_pack(char *payload, in mlxsw_reg_tnumt_pack() argument
11998 MLXSW_REG_ZERO(tnumt, payload); in mlxsw_reg_tnumt_pack()
11999 mlxsw_reg_tnumt_record_type_set(payload, type); in mlxsw_reg_tnumt_pack()
12000 mlxsw_reg_tnumt_tunnel_port_set(payload, tport); in mlxsw_reg_tnumt_pack()
12001 mlxsw_reg_tnumt_underlay_mc_ptr_set(payload, underlay_mc_ptr); in mlxsw_reg_tnumt_pack()
12002 mlxsw_reg_tnumt_vnext_set(payload, vnext); in mlxsw_reg_tnumt_pack()
12003 mlxsw_reg_tnumt_next_underlay_mc_ptr_set(payload, next_underlay_mc_ptr); in mlxsw_reg_tnumt_pack()
12004 mlxsw_reg_tnumt_record_size_set(payload, record_size); in mlxsw_reg_tnumt_pack()
12026 static inline void mlxsw_reg_tnqcr_pack(char *payload) in mlxsw_reg_tnqcr_pack() argument
12028 MLXSW_REG_ZERO(tnqcr, payload); in mlxsw_reg_tnqcr_pack()
12029 mlxsw_reg_tnqcr_enc_set_dscp_set(payload, 0); in mlxsw_reg_tnqcr_pack()
12054 static inline void mlxsw_reg_tnqdr_pack(char *payload, u16 local_port) in mlxsw_reg_tnqdr_pack() argument
12056 MLXSW_REG_ZERO(tnqdr, payload); in mlxsw_reg_tnqdr_pack()
12057 mlxsw_reg_tnqdr_local_port_set(payload, local_port); in mlxsw_reg_tnqdr_pack()
12058 mlxsw_reg_tnqdr_dscp_set(payload, 0); in mlxsw_reg_tnqdr_pack()
12083 static inline void mlxsw_reg_tneem_pack(char *payload, u8 overlay_ecn, in mlxsw_reg_tneem_pack() argument
12086 MLXSW_REG_ZERO(tneem, payload); in mlxsw_reg_tneem_pack()
12087 mlxsw_reg_tneem_overlay_ecn_set(payload, overlay_ecn); in mlxsw_reg_tneem_pack()
12088 mlxsw_reg_tneem_underlay_ecn_set(payload, underlay_ecn); in mlxsw_reg_tneem_pack()
12135 static inline void mlxsw_reg_tndem_pack(char *payload, u8 underlay_ecn, in mlxsw_reg_tndem_pack() argument
12139 MLXSW_REG_ZERO(tndem, payload); in mlxsw_reg_tndem_pack()
12140 mlxsw_reg_tndem_underlay_ecn_set(payload, underlay_ecn); in mlxsw_reg_tndem_pack()
12141 mlxsw_reg_tndem_overlay_ecn_set(payload, overlay_ecn); in mlxsw_reg_tndem_pack()
12142 mlxsw_reg_tndem_eip_ecn_set(payload, ecn); in mlxsw_reg_tndem_pack()
12143 mlxsw_reg_tndem_trap_en_set(payload, trap_en); in mlxsw_reg_tndem_pack()
12144 mlxsw_reg_tndem_trap_id_set(payload, trap_id); in mlxsw_reg_tndem_pack()
12175 static inline void mlxsw_reg_tnpc_pack(char *payload, in mlxsw_reg_tnpc_pack() argument
12179 MLXSW_REG_ZERO(tnpc, payload); in mlxsw_reg_tnpc_pack()
12180 mlxsw_reg_tnpc_tunnel_port_set(payload, tport); in mlxsw_reg_tnpc_pack()
12181 mlxsw_reg_tnpc_learn_enable_v4_set(payload, learn_enable); in mlxsw_reg_tnpc_pack()
12182 mlxsw_reg_tnpc_learn_enable_v6_set(payload, learn_enable); in mlxsw_reg_tnpc_pack()
12208 static inline void mlxsw_reg_tigcr_pack(char *payload, bool ttlc, u8 ttl_uc) in mlxsw_reg_tigcr_pack() argument
12210 MLXSW_REG_ZERO(tigcr, payload); in mlxsw_reg_tigcr_pack()
12211 mlxsw_reg_tigcr_ttlc_set(payload, ttlc); in mlxsw_reg_tigcr_pack()
12212 mlxsw_reg_tigcr_ttl_uc_set(payload, ttl_uc); in mlxsw_reg_tigcr_pack()
12237 static inline void mlxsw_reg_tieem_pack(char *payload, u8 overlay_ecn, in mlxsw_reg_tieem_pack() argument
12240 MLXSW_REG_ZERO(tieem, payload); in mlxsw_reg_tieem_pack()
12241 mlxsw_reg_tieem_overlay_ecn_set(payload, overlay_ecn); in mlxsw_reg_tieem_pack()
12242 mlxsw_reg_tieem_underlay_ecn_set(payload, underlay_ecn); in mlxsw_reg_tieem_pack()
12289 static inline void mlxsw_reg_tidem_pack(char *payload, u8 underlay_ecn, in mlxsw_reg_tidem_pack() argument
12293 MLXSW_REG_ZERO(tidem, payload); in mlxsw_reg_tidem_pack()
12294 mlxsw_reg_tidem_underlay_ecn_set(payload, underlay_ecn); in mlxsw_reg_tidem_pack()
12295 mlxsw_reg_tidem_overlay_ecn_set(payload, overlay_ecn); in mlxsw_reg_tidem_pack()
12296 mlxsw_reg_tidem_eip_ecn_set(payload, eip_ecn); in mlxsw_reg_tidem_pack()
12297 mlxsw_reg_tidem_trap_en_set(payload, trap_en); in mlxsw_reg_tidem_pack()
12298 mlxsw_reg_tidem_trap_id_set(payload, trap_id); in mlxsw_reg_tidem_pack()
12358 static inline void mlxsw_reg_sbpr_pack(char *payload, u8 pool, in mlxsw_reg_sbpr_pack() argument
12363 MLXSW_REG_ZERO(sbpr, payload); in mlxsw_reg_sbpr_pack()
12364 mlxsw_reg_sbpr_pool_set(payload, pool); in mlxsw_reg_sbpr_pack()
12365 mlxsw_reg_sbpr_dir_set(payload, dir); in mlxsw_reg_sbpr_pack()
12366 mlxsw_reg_sbpr_mode_set(payload, mode); in mlxsw_reg_sbpr_pack()
12367 mlxsw_reg_sbpr_size_set(payload, size); in mlxsw_reg_sbpr_pack()
12368 mlxsw_reg_sbpr_infi_size_set(payload, infi_size); in mlxsw_reg_sbpr_pack()
12442 static inline void mlxsw_reg_sbcm_pack(char *payload, u16 local_port, u8 pg_buff, in mlxsw_reg_sbcm_pack() argument
12447 MLXSW_REG_ZERO(sbcm, payload); in mlxsw_reg_sbcm_pack()
12448 mlxsw_reg_sbcm_local_port_set(payload, local_port); in mlxsw_reg_sbcm_pack()
12449 mlxsw_reg_sbcm_pg_buff_set(payload, pg_buff); in mlxsw_reg_sbcm_pack()
12450 mlxsw_reg_sbcm_dir_set(payload, dir); in mlxsw_reg_sbcm_pack()
12451 mlxsw_reg_sbcm_min_buff_set(payload, min_buff); in mlxsw_reg_sbcm_pack()
12452 mlxsw_reg_sbcm_max_buff_set(payload, max_buff); in mlxsw_reg_sbcm_pack()
12453 mlxsw_reg_sbcm_infi_max_set(payload, infi_max); in mlxsw_reg_sbcm_pack()
12454 mlxsw_reg_sbcm_pool_set(payload, pool); in mlxsw_reg_sbcm_pack()
12528 static inline void mlxsw_reg_sbpm_pack(char *payload, u16 local_port, u8 pool, in mlxsw_reg_sbpm_pack() argument
12532 MLXSW_REG_ZERO(sbpm, payload); in mlxsw_reg_sbpm_pack()
12533 mlxsw_reg_sbpm_local_port_set(payload, local_port); in mlxsw_reg_sbpm_pack()
12534 mlxsw_reg_sbpm_pool_set(payload, pool); in mlxsw_reg_sbpm_pack()
12535 mlxsw_reg_sbpm_dir_set(payload, dir); in mlxsw_reg_sbpm_pack()
12536 mlxsw_reg_sbpm_clr_set(payload, clr); in mlxsw_reg_sbpm_pack()
12537 mlxsw_reg_sbpm_min_buff_set(payload, min_buff); in mlxsw_reg_sbpm_pack()
12538 mlxsw_reg_sbpm_max_buff_set(payload, max_buff); in mlxsw_reg_sbpm_pack()
12541 static inline void mlxsw_reg_sbpm_unpack(char *payload, u32 *p_buff_occupancy, in mlxsw_reg_sbpm_unpack() argument
12544 *p_buff_occupancy = mlxsw_reg_sbpm_buff_occupancy_get(payload); in mlxsw_reg_sbpm_unpack()
12545 *p_max_buff_occupancy = mlxsw_reg_sbpm_max_buff_occupancy_get(payload); in mlxsw_reg_sbpm_unpack()
12590 static inline void mlxsw_reg_sbmm_pack(char *payload, u8 prio, u32 min_buff, in mlxsw_reg_sbmm_pack() argument
12593 MLXSW_REG_ZERO(sbmm, payload); in mlxsw_reg_sbmm_pack()
12594 mlxsw_reg_sbmm_prio_set(payload, prio); in mlxsw_reg_sbmm_pack()
12595 mlxsw_reg_sbmm_min_buff_set(payload, min_buff); in mlxsw_reg_sbmm_pack()
12596 mlxsw_reg_sbmm_max_buff_set(payload, max_buff); in mlxsw_reg_sbmm_pack()
12597 mlxsw_reg_sbmm_pool_set(payload, pool); in mlxsw_reg_sbmm_pack()
12674 static inline void mlxsw_reg_sbsr_pack(char *payload, bool clr) in mlxsw_reg_sbsr_pack() argument
12676 MLXSW_REG_ZERO(sbsr, payload); in mlxsw_reg_sbsr_pack()
12677 mlxsw_reg_sbsr_clr_set(payload, clr); in mlxsw_reg_sbsr_pack()
12695 static inline void mlxsw_reg_sbsr_rec_unpack(char *payload, int rec_index, in mlxsw_reg_sbsr_rec_unpack() argument
12700 mlxsw_reg_sbsr_rec_buff_occupancy_get(payload, rec_index); in mlxsw_reg_sbsr_rec_unpack()
12702 mlxsw_reg_sbsr_rec_max_buff_occupancy_get(payload, rec_index); in mlxsw_reg_sbsr_rec_unpack()
12733 static inline void mlxsw_reg_sbib_pack(char *payload, u16 local_port, in mlxsw_reg_sbib_pack() argument
12736 MLXSW_REG_ZERO(sbib, payload); in mlxsw_reg_sbib_pack()
12737 mlxsw_reg_sbib_local_port_set(payload, local_port); in mlxsw_reg_sbib_pack()
12738 mlxsw_reg_sbib_buff_size_set(payload, buff_size); in mlxsw_reg_sbib_pack()