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, u16 lag_lookup_pgt_base) in mlxsw_reg_sgcr_pack() argument
51 MLXSW_REG_ZERO(sgcr, payload); in mlxsw_reg_sgcr_pack()
52 mlxsw_reg_sgcr_lag_lookup_pgt_base_set(payload, lag_lookup_pgt_base); in mlxsw_reg_sgcr_pack()
110 static inline void mlxsw_reg_sspr_pack(char *payload, u16 local_port) in mlxsw_reg_sspr_pack() argument
112 MLXSW_REG_ZERO(sspr, payload); in mlxsw_reg_sspr_pack()
113 mlxsw_reg_sspr_m_set(payload, 1); in mlxsw_reg_sspr_pack()
114 mlxsw_reg_sspr_local_port_set(payload, local_port); in mlxsw_reg_sspr_pack()
115 mlxsw_reg_sspr_system_port_set(payload, local_port); in mlxsw_reg_sspr_pack()
143 static inline void mlxsw_reg_sfdat_pack(char *payload, u32 age_time) in mlxsw_reg_sfdat_pack() argument
145 MLXSW_REG_ZERO(sfdat, payload); in mlxsw_reg_sfdat_pack()
146 mlxsw_reg_sfdat_swid_set(payload, 0); in mlxsw_reg_sfdat_pack()
147 mlxsw_reg_sfdat_age_time_set(payload, age_time); in mlxsw_reg_sfdat_pack()
224 static inline void mlxsw_reg_sfd_pack(char *payload, enum mlxsw_reg_sfd_op op, in mlxsw_reg_sfd_pack() argument
227 MLXSW_REG_ZERO(sfd, payload); in mlxsw_reg_sfd_pack()
228 mlxsw_reg_sfd_op_set(payload, op); in mlxsw_reg_sfd_pack()
229 mlxsw_reg_sfd_record_locator_set(payload, record_locator); in mlxsw_reg_sfd_pack()
357 static inline void mlxsw_reg_sfd_rec_pack(char *payload, int rec_index, in mlxsw_reg_sfd_rec_pack() argument
362 u8 num_rec = mlxsw_reg_sfd_num_rec_get(payload); in mlxsw_reg_sfd_rec_pack()
365 mlxsw_reg_sfd_num_rec_set(payload, rec_index + 1); in mlxsw_reg_sfd_rec_pack()
366 mlxsw_reg_sfd_rec_swid_set(payload, rec_index, 0); in mlxsw_reg_sfd_rec_pack()
367 mlxsw_reg_sfd_rec_type_set(payload, rec_index, rec_type); in mlxsw_reg_sfd_rec_pack()
368 mlxsw_reg_sfd_rec_mac_memcpy_to(payload, rec_index, mac); in mlxsw_reg_sfd_rec_pack()
369 mlxsw_reg_sfd_rec_action_set(payload, rec_index, action); in mlxsw_reg_sfd_rec_pack()
372 static inline void mlxsw_reg_sfd_uc_pack(char *payload, int rec_index, in mlxsw_reg_sfd_uc_pack() argument
378 mlxsw_reg_sfd_rec_pack(payload, rec_index, in mlxsw_reg_sfd_uc_pack()
380 mlxsw_reg_sfd_rec_policy_set(payload, rec_index, policy); in mlxsw_reg_sfd_uc_pack()
381 mlxsw_reg_sfd_uc_sub_port_set(payload, rec_index, 0); in mlxsw_reg_sfd_uc_pack()
382 mlxsw_reg_sfd_uc_fid_vid_set(payload, rec_index, fid_vid); in mlxsw_reg_sfd_uc_pack()
383 mlxsw_reg_sfd_uc_set_vid_set(payload, rec_index, vid ? true : false); in mlxsw_reg_sfd_uc_pack()
384 mlxsw_reg_sfd_uc_vid_set(payload, rec_index, vid); in mlxsw_reg_sfd_uc_pack()
385 mlxsw_reg_sfd_uc_system_port_set(payload, rec_index, local_port); in mlxsw_reg_sfd_uc_pack()
438 mlxsw_reg_sfd_uc_lag_pack(char *payload, int rec_index, in mlxsw_reg_sfd_uc_lag_pack() argument
444 mlxsw_reg_sfd_rec_pack(payload, rec_index, in mlxsw_reg_sfd_uc_lag_pack()
447 mlxsw_reg_sfd_rec_policy_set(payload, rec_index, policy); in mlxsw_reg_sfd_uc_lag_pack()
448 mlxsw_reg_sfd_uc_lag_sub_port_set(payload, rec_index, 0); in mlxsw_reg_sfd_uc_lag_pack()
449 mlxsw_reg_sfd_uc_lag_fid_vid_set(payload, rec_index, fid_vid); in mlxsw_reg_sfd_uc_lag_pack()
450 mlxsw_reg_sfd_uc_lag_set_vid_set(payload, rec_index, true); in mlxsw_reg_sfd_uc_lag_pack()
451 mlxsw_reg_sfd_uc_lag_lag_vid_set(payload, rec_index, lag_vid); in mlxsw_reg_sfd_uc_lag_pack()
452 mlxsw_reg_sfd_uc_lag_lag_id_set(payload, rec_index, lag_id); in mlxsw_reg_sfd_uc_lag_pack()
483 mlxsw_reg_sfd_mc_pack(char *payload, int rec_index, in mlxsw_reg_sfd_mc_pack() argument
487 mlxsw_reg_sfd_rec_pack(payload, rec_index, in mlxsw_reg_sfd_mc_pack()
489 mlxsw_reg_sfd_mc_pgi_set(payload, rec_index, 0x1FFF); in mlxsw_reg_sfd_mc_pack()
490 mlxsw_reg_sfd_mc_fid_vid_set(payload, rec_index, fid_vid); in mlxsw_reg_sfd_mc_pack()
491 mlxsw_reg_sfd_mc_mid_set(payload, rec_index, mid); in mlxsw_reg_sfd_mc_pack()
533 mlxsw_reg_sfd_uc_tunnel_pack(char *payload, int rec_index, in mlxsw_reg_sfd_uc_tunnel_pack() argument
539 mlxsw_reg_sfd_rec_pack(payload, rec_index, in mlxsw_reg_sfd_uc_tunnel_pack()
542 mlxsw_reg_sfd_rec_policy_set(payload, rec_index, policy); in mlxsw_reg_sfd_uc_tunnel_pack()
543 mlxsw_reg_sfd_uc_tunnel_fid_set(payload, rec_index, fid); in mlxsw_reg_sfd_uc_tunnel_pack()
544 mlxsw_reg_sfd_uc_tunnel_protocol_set(payload, rec_index, proto); in mlxsw_reg_sfd_uc_tunnel_pack()
548 mlxsw_reg_sfd_uc_tunnel_pack4(char *payload, int rec_index, in mlxsw_reg_sfd_uc_tunnel_pack4() argument
553 mlxsw_reg_sfd_uc_tunnel_uip_msb_set(payload, rec_index, uip >> 24); in mlxsw_reg_sfd_uc_tunnel_pack4()
554 mlxsw_reg_sfd_uc_tunnel_uip_lsb_set(payload, rec_index, uip); in mlxsw_reg_sfd_uc_tunnel_pack4()
555 mlxsw_reg_sfd_uc_tunnel_pack(payload, rec_index, policy, mac, fid, in mlxsw_reg_sfd_uc_tunnel_pack4()
561 mlxsw_reg_sfd_uc_tunnel_pack6(char *payload, int rec_index, const char *mac, in mlxsw_reg_sfd_uc_tunnel_pack6() argument
565 mlxsw_reg_sfd_uc_tunnel_uip_lsb_set(payload, rec_index, uip_ptr); in mlxsw_reg_sfd_uc_tunnel_pack6()
567 mlxsw_reg_sfd_uc_tunnel_pack(payload, rec_index, in mlxsw_reg_sfd_uc_tunnel_pack6()
616 static inline void mlxsw_reg_sfn_pack(char *payload) in mlxsw_reg_sfn_pack() argument
618 MLXSW_REG_ZERO(sfn, payload); in mlxsw_reg_sfn_pack()
619 mlxsw_reg_sfn_swid_set(payload, 0); in mlxsw_reg_sfn_pack()
620 mlxsw_reg_sfn_end_set(payload, 0); in mlxsw_reg_sfn_pack()
621 mlxsw_reg_sfn_num_rec_set(payload, MLXSW_REG_SFN_REC_MAX_COUNT); in mlxsw_reg_sfn_pack()
682 static inline void mlxsw_reg_sfn_mac_unpack(char *payload, int rec_index, in mlxsw_reg_sfn_mac_unpack() argument
686 mlxsw_reg_sfn_rec_mac_memcpy_from(payload, rec_index, mac); in mlxsw_reg_sfn_mac_unpack()
687 *p_vid = mlxsw_reg_sfn_mac_fid_get(payload, rec_index); in mlxsw_reg_sfn_mac_unpack()
688 *p_local_port = mlxsw_reg_sfn_mac_system_port_get(payload, rec_index); in mlxsw_reg_sfn_mac_unpack()
698 static inline void mlxsw_reg_sfn_mac_lag_unpack(char *payload, int rec_index, in mlxsw_reg_sfn_mac_lag_unpack() argument
702 mlxsw_reg_sfn_rec_mac_memcpy_from(payload, rec_index, mac); in mlxsw_reg_sfn_mac_lag_unpack()
703 *p_vid = mlxsw_reg_sfn_mac_fid_get(payload, rec_index); in mlxsw_reg_sfn_mac_lag_unpack()
704 *p_lag_id = mlxsw_reg_sfn_mac_lag_lag_id_get(payload, rec_index); in mlxsw_reg_sfn_mac_lag_unpack()
746 mlxsw_reg_sfn_uc_tunnel_unpack(char *payload, int rec_index, char *mac, in mlxsw_reg_sfn_uc_tunnel_unpack() argument
752 mlxsw_reg_sfn_rec_mac_memcpy_from(payload, rec_index, mac); in mlxsw_reg_sfn_uc_tunnel_unpack()
753 *p_fid = mlxsw_reg_sfn_mac_fid_get(payload, rec_index); in mlxsw_reg_sfn_uc_tunnel_unpack()
754 uip_msb = mlxsw_reg_sfn_uc_tunnel_uip_msb_get(payload, rec_index); in mlxsw_reg_sfn_uc_tunnel_unpack()
755 uip_lsb = mlxsw_reg_sfn_uc_tunnel_uip_lsb_get(payload, rec_index); in mlxsw_reg_sfn_uc_tunnel_unpack()
757 *p_proto = mlxsw_reg_sfn_uc_tunnel_protocol_get(payload, rec_index); in mlxsw_reg_sfn_uc_tunnel_unpack()
792 static inline void mlxsw_reg_spms_pack(char *payload, u16 local_port) in mlxsw_reg_spms_pack() argument
794 MLXSW_REG_ZERO(spms, payload); in mlxsw_reg_spms_pack()
795 mlxsw_reg_spms_local_port_set(payload, local_port); in mlxsw_reg_spms_pack()
798 static inline void mlxsw_reg_spms_vid_pack(char *payload, u16 vid, in mlxsw_reg_spms_vid_pack() argument
801 mlxsw_reg_spms_state_set(payload, vid, state); in mlxsw_reg_spms_vid_pack()
860 static inline void mlxsw_reg_spvid_pack(char *payload, u16 local_port, u16 pvid, in mlxsw_reg_spvid_pack() argument
863 MLXSW_REG_ZERO(spvid, payload); in mlxsw_reg_spvid_pack()
864 mlxsw_reg_spvid_local_port_set(payload, local_port); in mlxsw_reg_spvid_pack()
865 mlxsw_reg_spvid_pvid_set(payload, pvid); in mlxsw_reg_spvid_pack()
866 mlxsw_reg_spvid_et_vlan_set(payload, et_vlan); in mlxsw_reg_spvid_pack()
951 static inline void mlxsw_reg_spvm_pack(char *payload, u16 local_port, in mlxsw_reg_spvm_pack() argument
958 MLXSW_REG_ZERO(spvm, payload); in mlxsw_reg_spvm_pack()
959 mlxsw_reg_spvm_local_port_set(payload, local_port); in mlxsw_reg_spvm_pack()
960 mlxsw_reg_spvm_num_rec_set(payload, size); in mlxsw_reg_spvm_pack()
963 mlxsw_reg_spvm_rec_i_set(payload, i, is_member); in mlxsw_reg_spvm_pack()
964 mlxsw_reg_spvm_rec_e_set(payload, i, is_member); in mlxsw_reg_spvm_pack()
965 mlxsw_reg_spvm_rec_u_set(payload, i, untagged); in mlxsw_reg_spvm_pack()
966 mlxsw_reg_spvm_rec_vid_set(payload, i, vid_begin + i); in mlxsw_reg_spvm_pack()
1013 static inline void mlxsw_reg_spaft_pack(char *payload, u16 local_port, in mlxsw_reg_spaft_pack() argument
1016 MLXSW_REG_ZERO(spaft, payload); in mlxsw_reg_spaft_pack()
1017 mlxsw_reg_spaft_local_port_set(payload, local_port); in mlxsw_reg_spaft_pack()
1018 mlxsw_reg_spaft_allow_untagged_set(payload, allow_untagged); in mlxsw_reg_spaft_pack()
1019 mlxsw_reg_spaft_allow_prio_tagged_set(payload, allow_untagged); in mlxsw_reg_spaft_pack()
1020 mlxsw_reg_spaft_allow_tagged_set(payload, true); in mlxsw_reg_spaft_pack()
1110 mlxsw_reg_sfgc_pack(char *payload, enum mlxsw_reg_sfgc_type type, in mlxsw_reg_sfgc_pack() argument
1115 MLXSW_REG_ZERO(sfgc, payload); in mlxsw_reg_sfgc_pack()
1116 mlxsw_reg_sfgc_type_set(payload, type); in mlxsw_reg_sfgc_pack()
1117 mlxsw_reg_sfgc_bridge_type_set(payload, bridge_type); in mlxsw_reg_sfgc_pack()
1118 mlxsw_reg_sfgc_table_type_set(payload, table_type); in mlxsw_reg_sfgc_pack()
1119 mlxsw_reg_sfgc_flood_table_set(payload, flood_table); in mlxsw_reg_sfgc_pack()
1120 mlxsw_reg_sfgc_mid_base_set(payload, mid_base); in mlxsw_reg_sfgc_pack()
1174 static inline void mlxsw_reg_sfdf_pack(char *payload, in mlxsw_reg_sfdf_pack() argument
1177 MLXSW_REG_ZERO(sfdf, payload); in mlxsw_reg_sfdf_pack()
1178 mlxsw_reg_sfdf_flush_type_set(payload, type); in mlxsw_reg_sfdf_pack()
1179 mlxsw_reg_sfdf_flush_static_set(payload, true); in mlxsw_reg_sfdf_pack()
1245 static inline void mlxsw_reg_sldr_lag_create_pack(char *payload, u8 lag_id) in mlxsw_reg_sldr_lag_create_pack() argument
1247 MLXSW_REG_ZERO(sldr, payload); in mlxsw_reg_sldr_lag_create_pack()
1248 mlxsw_reg_sldr_op_set(payload, MLXSW_REG_SLDR_OP_LAG_CREATE); in mlxsw_reg_sldr_lag_create_pack()
1249 mlxsw_reg_sldr_lag_id_set(payload, lag_id); in mlxsw_reg_sldr_lag_create_pack()
1252 static inline void mlxsw_reg_sldr_lag_destroy_pack(char *payload, u8 lag_id) in mlxsw_reg_sldr_lag_destroy_pack() argument
1254 MLXSW_REG_ZERO(sldr, payload); in mlxsw_reg_sldr_lag_destroy_pack()
1255 mlxsw_reg_sldr_op_set(payload, MLXSW_REG_SLDR_OP_LAG_DESTROY); in mlxsw_reg_sldr_lag_destroy_pack()
1256 mlxsw_reg_sldr_lag_id_set(payload, lag_id); in mlxsw_reg_sldr_lag_destroy_pack()
1273 static inline void mlxsw_reg_sldr_lag_add_port_pack(char *payload, u8 lag_id, in mlxsw_reg_sldr_lag_add_port_pack() argument
1276 MLXSW_REG_ZERO(sldr, payload); in mlxsw_reg_sldr_lag_add_port_pack()
1277 mlxsw_reg_sldr_op_set(payload, MLXSW_REG_SLDR_OP_LAG_ADD_PORT_LIST); in mlxsw_reg_sldr_lag_add_port_pack()
1278 mlxsw_reg_sldr_lag_id_set(payload, lag_id); in mlxsw_reg_sldr_lag_add_port_pack()
1279 mlxsw_reg_sldr_num_ports_set(payload, 1); in mlxsw_reg_sldr_lag_add_port_pack()
1280 mlxsw_reg_sldr_system_port_set(payload, 0, local_port); in mlxsw_reg_sldr_lag_add_port_pack()
1283 static inline void mlxsw_reg_sldr_lag_remove_port_pack(char *payload, u8 lag_id, in mlxsw_reg_sldr_lag_remove_port_pack() argument
1286 MLXSW_REG_ZERO(sldr, payload); in mlxsw_reg_sldr_lag_remove_port_pack()
1287 mlxsw_reg_sldr_op_set(payload, MLXSW_REG_SLDR_OP_LAG_REMOVE_PORT_LIST); in mlxsw_reg_sldr_lag_remove_port_pack()
1288 mlxsw_reg_sldr_lag_id_set(payload, lag_id); in mlxsw_reg_sldr_lag_remove_port_pack()
1289 mlxsw_reg_sldr_num_ports_set(payload, 1); in mlxsw_reg_sldr_lag_remove_port_pack()
1290 mlxsw_reg_sldr_system_port_set(payload, 0, local_port); in mlxsw_reg_sldr_lag_remove_port_pack()
1404 static inline void mlxsw_reg_slcr_pack(char *payload, u16 lag_hash, u32 seed) in mlxsw_reg_slcr_pack() argument
1406 MLXSW_REG_ZERO(slcr, payload); in mlxsw_reg_slcr_pack()
1407 mlxsw_reg_slcr_pp_set(payload, MLXSW_REG_SLCR_PP_GLOBAL); in mlxsw_reg_slcr_pack()
1408 mlxsw_reg_slcr_type_set(payload, MLXSW_REG_SLCR_TYPE_CRC); in mlxsw_reg_slcr_pack()
1409 mlxsw_reg_slcr_lag_hash_set(payload, lag_hash); in mlxsw_reg_slcr_pack()
1410 mlxsw_reg_slcr_seed_set(payload, seed); in mlxsw_reg_slcr_pack()
1457 static inline void mlxsw_reg_slcor_pack(char *payload, in mlxsw_reg_slcor_pack() argument
1461 MLXSW_REG_ZERO(slcor, payload); in mlxsw_reg_slcor_pack()
1462 mlxsw_reg_slcor_col_set(payload, col); in mlxsw_reg_slcor_pack()
1463 mlxsw_reg_slcor_local_port_set(payload, local_port); in mlxsw_reg_slcor_pack()
1464 mlxsw_reg_slcor_lag_id_set(payload, lag_id); in mlxsw_reg_slcor_pack()
1467 static inline void mlxsw_reg_slcor_port_add_pack(char *payload, in mlxsw_reg_slcor_port_add_pack() argument
1471 mlxsw_reg_slcor_pack(payload, local_port, lag_id, in mlxsw_reg_slcor_port_add_pack()
1473 mlxsw_reg_slcor_port_index_set(payload, port_index); in mlxsw_reg_slcor_port_add_pack()
1476 static inline void mlxsw_reg_slcor_port_remove_pack(char *payload, in mlxsw_reg_slcor_port_remove_pack() argument
1479 mlxsw_reg_slcor_pack(payload, local_port, lag_id, in mlxsw_reg_slcor_port_remove_pack()
1483 static inline void mlxsw_reg_slcor_col_enable_pack(char *payload, in mlxsw_reg_slcor_col_enable_pack() argument
1486 mlxsw_reg_slcor_pack(payload, local_port, lag_id, in mlxsw_reg_slcor_col_enable_pack()
1490 static inline void mlxsw_reg_slcor_col_disable_pack(char *payload, in mlxsw_reg_slcor_col_disable_pack() argument
1493 mlxsw_reg_slcor_pack(payload, local_port, lag_id, in mlxsw_reg_slcor_col_disable_pack()
1538 static inline void mlxsw_reg_spmlr_pack(char *payload, u16 local_port, in mlxsw_reg_spmlr_pack() argument
1541 MLXSW_REG_ZERO(spmlr, payload); in mlxsw_reg_spmlr_pack()
1542 mlxsw_reg_spmlr_local_port_set(payload, local_port); in mlxsw_reg_spmlr_pack()
1543 mlxsw_reg_spmlr_sub_port_set(payload, 0); in mlxsw_reg_spmlr_pack()
1544 mlxsw_reg_spmlr_learn_mode_set(payload, mode); in mlxsw_reg_spmlr_pack()
1652 static inline void __mlxsw_reg_svfa_pack(char *payload, in __mlxsw_reg_svfa_pack() argument
1656 MLXSW_REG_ZERO(svfa, payload); in __mlxsw_reg_svfa_pack()
1657 mlxsw_reg_svfa_swid_set(payload, 0); in __mlxsw_reg_svfa_pack()
1658 mlxsw_reg_svfa_mapping_table_set(payload, mt); in __mlxsw_reg_svfa_pack()
1659 mlxsw_reg_svfa_v_set(payload, valid); in __mlxsw_reg_svfa_pack()
1660 mlxsw_reg_svfa_fid_set(payload, fid); in __mlxsw_reg_svfa_pack()
1661 mlxsw_reg_svfa_irif_v_set(payload, irif_v); in __mlxsw_reg_svfa_pack()
1662 mlxsw_reg_svfa_irif_set(payload, irif_v ? irif : 0); in __mlxsw_reg_svfa_pack()
1665 static inline void mlxsw_reg_svfa_port_vid_pack(char *payload, u16 local_port, in mlxsw_reg_svfa_port_vid_pack() argument
1671 __mlxsw_reg_svfa_pack(payload, mt, valid, fid, irif_v, irif); in mlxsw_reg_svfa_port_vid_pack()
1672 mlxsw_reg_svfa_local_port_set(payload, local_port); in mlxsw_reg_svfa_port_vid_pack()
1673 mlxsw_reg_svfa_vid_set(payload, vid); in mlxsw_reg_svfa_port_vid_pack()
1676 static inline void mlxsw_reg_svfa_vid_pack(char *payload, bool valid, u16 fid, in mlxsw_reg_svfa_vid_pack() argument
1681 __mlxsw_reg_svfa_pack(payload, mt, valid, fid, irif_v, irif); in mlxsw_reg_svfa_vid_pack()
1682 mlxsw_reg_svfa_vid_set(payload, vid); in mlxsw_reg_svfa_vid_pack()
1685 static inline void mlxsw_reg_svfa_vni_pack(char *payload, bool valid, u16 fid, in mlxsw_reg_svfa_vni_pack() argument
1690 __mlxsw_reg_svfa_pack(payload, mt, valid, fid, irif_v, irif); in mlxsw_reg_svfa_vni_pack()
1691 mlxsw_reg_svfa_vni_set(payload, vni); in mlxsw_reg_svfa_vni_pack()
1786 static inline void mlxsw_reg_spvtr_pack(char *payload, bool tport, in mlxsw_reg_spvtr_pack() argument
1790 MLXSW_REG_ZERO(spvtr, payload); in mlxsw_reg_spvtr_pack()
1791 mlxsw_reg_spvtr_tport_set(payload, tport); in mlxsw_reg_spvtr_pack()
1792 mlxsw_reg_spvtr_local_port_set(payload, local_port); in mlxsw_reg_spvtr_pack()
1793 mlxsw_reg_spvtr_ipvid_mode_set(payload, ipvid_mode); in mlxsw_reg_spvtr_pack()
1794 mlxsw_reg_spvtr_ipve_set(payload, true); in mlxsw_reg_spvtr_pack()
1822 static inline void mlxsw_reg_svpe_pack(char *payload, u16 local_port, in mlxsw_reg_svpe_pack() argument
1825 MLXSW_REG_ZERO(svpe, payload); in mlxsw_reg_svpe_pack()
1826 mlxsw_reg_svpe_local_port_set(payload, local_port); in mlxsw_reg_svpe_pack()
1827 mlxsw_reg_svpe_vp_en_set(payload, enable); in mlxsw_reg_svpe_pack()
1995 static inline void mlxsw_reg_sfmr_pack(char *payload, in mlxsw_reg_sfmr_pack() argument
1999 MLXSW_REG_ZERO(sfmr, payload); in mlxsw_reg_sfmr_pack()
2000 mlxsw_reg_sfmr_op_set(payload, op); in mlxsw_reg_sfmr_pack()
2001 mlxsw_reg_sfmr_fid_set(payload, fid); in mlxsw_reg_sfmr_pack()
2002 mlxsw_reg_sfmr_smpe_valid_set(payload, smpe_valid); in mlxsw_reg_sfmr_pack()
2003 mlxsw_reg_sfmr_smpe_set(payload, smpe); in mlxsw_reg_sfmr_pack()
2049 static inline void mlxsw_reg_spvmlr_pack(char *payload, u16 local_port, in mlxsw_reg_spvmlr_pack() argument
2058 MLXSW_REG_ZERO(spvmlr, payload); in mlxsw_reg_spvmlr_pack()
2059 mlxsw_reg_spvmlr_local_port_set(payload, local_port); in mlxsw_reg_spvmlr_pack()
2060 mlxsw_reg_spvmlr_num_rec_set(payload, num_rec); in mlxsw_reg_spvmlr_pack()
2063 mlxsw_reg_spvmlr_rec_learn_enable_set(payload, i, learn_enable); in mlxsw_reg_spvmlr_pack()
2064 mlxsw_reg_spvmlr_rec_vid_set(payload, i, vid_begin + i); in mlxsw_reg_spvmlr_pack()
2093 static inline void mlxsw_reg_spfsr_pack(char *payload, u16 local_port, in mlxsw_reg_spfsr_pack() argument
2096 MLXSW_REG_ZERO(spfsr, payload); in mlxsw_reg_spfsr_pack()
2097 mlxsw_reg_spfsr_local_port_set(payload, local_port); in mlxsw_reg_spfsr_pack()
2098 mlxsw_reg_spfsr_security_set(payload, security); in mlxsw_reg_spfsr_pack()
2185 static inline void mlxsw_reg_spvc_pack(char *payload, u16 local_port, bool et1, in mlxsw_reg_spvc_pack() argument
2188 MLXSW_REG_ZERO(spvc, payload); in mlxsw_reg_spvc_pack()
2189 mlxsw_reg_spvc_local_port_set(payload, local_port); in mlxsw_reg_spvc_pack()
2193 mlxsw_reg_spvc_inner_et1_set(payload, 1); in mlxsw_reg_spvc_pack()
2194 mlxsw_reg_spvc_inner_et0_set(payload, 1); in mlxsw_reg_spvc_pack()
2195 mlxsw_reg_spvc_et1_set(payload, et1); in mlxsw_reg_spvc_pack()
2196 mlxsw_reg_spvc_et0_set(payload, et0); in mlxsw_reg_spvc_pack()
2233 static inline void mlxsw_reg_sffp_pack(char *payload, u8 profile_id, in mlxsw_reg_sffp_pack() argument
2237 MLXSW_REG_ZERO(sffp, payload); in mlxsw_reg_sffp_pack()
2238 mlxsw_reg_sffp_profile_id_set(payload, profile_id); in mlxsw_reg_sffp_pack()
2239 mlxsw_reg_sffp_type_set(payload, type); in mlxsw_reg_sffp_pack()
2240 mlxsw_reg_sffp_flood_offset_set(payload, flood_offset); in mlxsw_reg_sffp_pack()
2270 static inline void mlxsw_reg_spevet_pack(char *payload, u16 local_port, in mlxsw_reg_spevet_pack() argument
2273 MLXSW_REG_ZERO(spevet, payload); in mlxsw_reg_spevet_pack()
2274 mlxsw_reg_spevet_local_port_set(payload, local_port); in mlxsw_reg_spevet_pack()
2275 mlxsw_reg_spevet_et_vlan_set(payload, et_vlan); in mlxsw_reg_spevet_pack()
2308 static inline void mlxsw_reg_smpe_pack(char *payload, u16 local_port, in mlxsw_reg_smpe_pack() argument
2311 MLXSW_REG_ZERO(smpe, payload); in mlxsw_reg_smpe_pack()
2312 mlxsw_reg_smpe_local_port_set(payload, local_port); in mlxsw_reg_smpe_pack()
2313 mlxsw_reg_smpe_smpe_index_set(payload, smpe_index); in mlxsw_reg_smpe_pack()
2314 mlxsw_reg_smpe_evid_set(payload, evid); in mlxsw_reg_smpe_pack()
2370 static inline void mlxsw_reg_smid2_pack(char *payload, u16 mid, u16 port, in mlxsw_reg_smid2_pack() argument
2373 MLXSW_REG_ZERO(smid2, payload); in mlxsw_reg_smid2_pack()
2374 mlxsw_reg_smid2_swid_set(payload, 0); in mlxsw_reg_smid2_pack()
2375 mlxsw_reg_smid2_mid_set(payload, mid); in mlxsw_reg_smid2_pack()
2376 mlxsw_reg_smid2_port_set(payload, port, set); in mlxsw_reg_smid2_pack()
2377 mlxsw_reg_smid2_port_mask_set(payload, port, 1); in mlxsw_reg_smid2_pack()
2378 mlxsw_reg_smid2_smpe_valid_set(payload, smpe_valid); in mlxsw_reg_smid2_pack()
2379 mlxsw_reg_smid2_smpe_set(payload, smpe_valid ? smpe : 0); in mlxsw_reg_smid2_pack()
2432 static inline void mlxsw_reg_cwtp_pack(char *payload, u16 local_port, in mlxsw_reg_cwtp_pack() argument
2437 MLXSW_REG_ZERO(cwtp, payload); in mlxsw_reg_cwtp_pack()
2438 mlxsw_reg_cwtp_local_port_set(payload, local_port); in mlxsw_reg_cwtp_pack()
2439 mlxsw_reg_cwtp_traffic_class_set(payload, traffic_class); in mlxsw_reg_cwtp_pack()
2442 mlxsw_reg_cwtp_profile_min_set(payload, i, in mlxsw_reg_cwtp_pack()
2444 mlxsw_reg_cwtp_profile_max_set(payload, i, in mlxsw_reg_cwtp_pack()
2452 mlxsw_reg_cwtp_profile_pack(char *payload, u8 profile, u32 min, u32 max, in mlxsw_reg_cwtp_profile_pack() argument
2457 mlxsw_reg_cwtp_profile_min_set(payload, index, min); in mlxsw_reg_cwtp_profile_pack()
2458 mlxsw_reg_cwtp_profile_max_set(payload, index, max); in mlxsw_reg_cwtp_profile_pack()
2459 mlxsw_reg_cwtp_profile_percent_set(payload, index, probability); in mlxsw_reg_cwtp_profile_pack()
2550 static inline void mlxsw_reg_cwtpm_pack(char *payload, u16 local_port, in mlxsw_reg_cwtpm_pack() argument
2554 MLXSW_REG_ZERO(cwtpm, payload); in mlxsw_reg_cwtpm_pack()
2555 mlxsw_reg_cwtpm_local_port_set(payload, local_port); in mlxsw_reg_cwtpm_pack()
2556 mlxsw_reg_cwtpm_traffic_class_set(payload, traffic_class); in mlxsw_reg_cwtpm_pack()
2557 mlxsw_reg_cwtpm_ew_set(payload, wred); in mlxsw_reg_cwtpm_pack()
2558 mlxsw_reg_cwtpm_ee_set(payload, ecn); in mlxsw_reg_cwtpm_pack()
2559 mlxsw_reg_cwtpm_tcp_g_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2560 mlxsw_reg_cwtpm_tcp_y_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2561 mlxsw_reg_cwtpm_tcp_r_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2562 mlxsw_reg_cwtpm_ntcp_g_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2563 mlxsw_reg_cwtpm_ntcp_y_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2564 mlxsw_reg_cwtpm_ntcp_r_set(payload, profile); in mlxsw_reg_cwtpm_pack()
2583 static inline void mlxsw_reg_pgcr_pack(char *payload, u32 pointer_base) in mlxsw_reg_pgcr_pack() argument
2585 MLXSW_REG_ZERO(pgcr, payload); in mlxsw_reg_pgcr_pack()
2586 mlxsw_reg_pgcr_default_action_pointer_base_set(payload, pointer_base); in mlxsw_reg_pgcr_pack()
2639 static inline void mlxsw_reg_ppbt_pack(char *payload, enum mlxsw_reg_pxbt_e e, in mlxsw_reg_ppbt_pack() argument
2643 MLXSW_REG_ZERO(ppbt, payload); in mlxsw_reg_ppbt_pack()
2644 mlxsw_reg_ppbt_e_set(payload, e); in mlxsw_reg_ppbt_pack()
2645 mlxsw_reg_ppbt_op_set(payload, op); in mlxsw_reg_ppbt_pack()
2646 mlxsw_reg_ppbt_local_port_set(payload, local_port); in mlxsw_reg_ppbt_pack()
2647 mlxsw_reg_ppbt_g_set(payload, true); in mlxsw_reg_ppbt_pack()
2648 mlxsw_reg_ppbt_acl_info_set(payload, acl_info); in mlxsw_reg_ppbt_pack()
2684 static inline void mlxsw_reg_pacl_pack(char *payload, u16 acl_id, in mlxsw_reg_pacl_pack() argument
2687 MLXSW_REG_ZERO(pacl, payload); in mlxsw_reg_pacl_pack()
2688 mlxsw_reg_pacl_acl_id_set(payload, acl_id); in mlxsw_reg_pacl_pack()
2689 mlxsw_reg_pacl_v_set(payload, valid); in mlxsw_reg_pacl_pack()
2690 mlxsw_reg_pacl_tcam_region_info_memcpy_to(payload, tcam_region_info); in mlxsw_reg_pacl_pack()
2738 static inline void mlxsw_reg_pagt_pack(char *payload, u16 acl_group_id) in mlxsw_reg_pagt_pack() argument
2740 MLXSW_REG_ZERO(pagt, payload); in mlxsw_reg_pagt_pack()
2741 mlxsw_reg_pagt_acl_group_id_set(payload, acl_group_id); in mlxsw_reg_pagt_pack()
2744 static inline void mlxsw_reg_pagt_acl_id_pack(char *payload, int index, in mlxsw_reg_pagt_acl_id_pack() argument
2747 u8 size = mlxsw_reg_pagt_size_get(payload); in mlxsw_reg_pagt_acl_id_pack()
2750 mlxsw_reg_pagt_size_set(payload, index + 1); in mlxsw_reg_pagt_acl_id_pack()
2751 mlxsw_reg_pagt_multi_set(payload, index, multi); in mlxsw_reg_pagt_acl_id_pack()
2752 mlxsw_reg_pagt_acl_id_set(payload, index, acl_id); in mlxsw_reg_pagt_acl_id_pack()
2840 static inline void mlxsw_reg_ptar_pack(char *payload, enum mlxsw_reg_ptar_op op, in mlxsw_reg_ptar_pack() argument
2845 MLXSW_REG_ZERO(ptar, payload); in mlxsw_reg_ptar_pack()
2846 mlxsw_reg_ptar_op_set(payload, op); in mlxsw_reg_ptar_pack()
2847 mlxsw_reg_ptar_action_set_type_set(payload, 2); /* "flexible" */ in mlxsw_reg_ptar_pack()
2848 mlxsw_reg_ptar_key_type_set(payload, key_type); in mlxsw_reg_ptar_pack()
2849 mlxsw_reg_ptar_region_size_set(payload, region_size); in mlxsw_reg_ptar_pack()
2850 mlxsw_reg_ptar_region_id_set(payload, region_id); in mlxsw_reg_ptar_pack()
2851 mlxsw_reg_ptar_tcam_region_info_memcpy_to(payload, tcam_region_info); in mlxsw_reg_ptar_pack()
2854 static inline void mlxsw_reg_ptar_key_id_pack(char *payload, int index, in mlxsw_reg_ptar_key_id_pack() argument
2857 mlxsw_reg_ptar_flexible_key_id_set(payload, index, key_id); in mlxsw_reg_ptar_key_id_pack()
2860 static inline void mlxsw_reg_ptar_unpack(char *payload, char *tcam_region_info) in mlxsw_reg_ptar_unpack() argument
2862 mlxsw_reg_ptar_tcam_region_info_memcpy_from(payload, tcam_region_info); in mlxsw_reg_ptar_unpack()
2931 static inline void mlxsw_reg_pprr_pack(char *payload, u8 register_index) in mlxsw_reg_pprr_pack() argument
2933 MLXSW_REG_ZERO(pprr, payload); in mlxsw_reg_pprr_pack()
2934 mlxsw_reg_pprr_register_index_set(payload, register_index); in mlxsw_reg_pprr_pack()
2959 static inline void mlxsw_reg_ppbs_pack(char *payload, u32 pbs_ptr, in mlxsw_reg_ppbs_pack() argument
2962 MLXSW_REG_ZERO(ppbs, payload); in mlxsw_reg_ppbs_pack()
2963 mlxsw_reg_ppbs_pbs_ptr_set(payload, pbs_ptr); in mlxsw_reg_ppbs_pack()
2964 mlxsw_reg_ppbs_system_port_set(payload, system_port); in mlxsw_reg_ppbs_pack()
3026 static inline void mlxsw_reg_prcr_pack(char *payload, enum mlxsw_reg_prcr_op op, in mlxsw_reg_prcr_pack() argument
3032 MLXSW_REG_ZERO(prcr, payload); in mlxsw_reg_prcr_pack()
3033 mlxsw_reg_prcr_op_set(payload, op); in mlxsw_reg_prcr_pack()
3034 mlxsw_reg_prcr_offset_set(payload, src_offset); in mlxsw_reg_prcr_pack()
3035 mlxsw_reg_prcr_size_set(payload, size); in mlxsw_reg_prcr_pack()
3036 mlxsw_reg_prcr_tcam_region_info_memcpy_to(payload, in mlxsw_reg_prcr_pack()
3038 mlxsw_reg_prcr_dest_offset_set(payload, dest_offset); in mlxsw_reg_prcr_pack()
3039 mlxsw_reg_prcr_dest_tcam_region_info_memcpy_to(payload, in mlxsw_reg_prcr_pack()
3085 static inline void mlxsw_reg_pefa_pack(char *payload, u32 index, bool ca, in mlxsw_reg_pefa_pack() argument
3088 MLXSW_REG_ZERO(pefa, payload); in mlxsw_reg_pefa_pack()
3089 mlxsw_reg_pefa_index_set(payload, index); in mlxsw_reg_pefa_pack()
3090 mlxsw_reg_pefa_ca_set(payload, ca); in mlxsw_reg_pefa_pack()
3092 mlxsw_reg_pefa_flex_action_set_memcpy_to(payload, in mlxsw_reg_pefa_pack()
3096 static inline void mlxsw_reg_pefa_unpack(char *payload, bool *p_a) in mlxsw_reg_pefa_unpack() argument
3098 *p_a = mlxsw_reg_pefa_a_get(payload); in mlxsw_reg_pefa_unpack()
3130 mlxsw_reg_pemrbt_pack(char *payload, enum mlxsw_reg_pemrbt_protocol protocol, in mlxsw_reg_pemrbt_pack() argument
3133 MLXSW_REG_ZERO(pemrbt, payload); in mlxsw_reg_pemrbt_pack()
3134 mlxsw_reg_pemrbt_protocol_set(payload, protocol); in mlxsw_reg_pemrbt_pack()
3135 mlxsw_reg_pemrbt_group_id_set(payload, group_id); in mlxsw_reg_pemrbt_pack()
3232 static inline void mlxsw_reg_ptce2_pack(char *payload, bool valid, in mlxsw_reg_ptce2_pack() argument
3237 MLXSW_REG_ZERO(ptce2, payload); in mlxsw_reg_ptce2_pack()
3238 mlxsw_reg_ptce2_v_set(payload, valid); in mlxsw_reg_ptce2_pack()
3239 mlxsw_reg_ptce2_op_set(payload, op); in mlxsw_reg_ptce2_pack()
3240 mlxsw_reg_ptce2_offset_set(payload, offset); in mlxsw_reg_ptce2_pack()
3241 mlxsw_reg_ptce2_priority_set(payload, priority); in mlxsw_reg_ptce2_pack()
3242 mlxsw_reg_ptce2_tcam_region_info_memcpy_to(payload, tcam_region_info); in mlxsw_reg_ptce2_pack()
3329 static inline void mlxsw_reg_perpt_erp_vector_pack(char *payload, in mlxsw_reg_perpt_erp_vector_pack() argument
3336 mlxsw_reg_perpt_erp_vector_set(payload, bit, true); in mlxsw_reg_perpt_erp_vector_pack()
3340 mlxsw_reg_perpt_pack(char *payload, u8 erpt_bank, u8 erpt_index, in mlxsw_reg_perpt_pack() argument
3345 MLXSW_REG_ZERO(perpt, payload); in mlxsw_reg_perpt_pack()
3346 mlxsw_reg_perpt_erpt_bank_set(payload, erpt_bank); in mlxsw_reg_perpt_pack()
3347 mlxsw_reg_perpt_erpt_index_set(payload, erpt_index); in mlxsw_reg_perpt_pack()
3348 mlxsw_reg_perpt_key_size_set(payload, key_size); in mlxsw_reg_perpt_pack()
3349 mlxsw_reg_perpt_bf_bypass_set(payload, false); in mlxsw_reg_perpt_pack()
3350 mlxsw_reg_perpt_erp_id_set(payload, erp_id); in mlxsw_reg_perpt_pack()
3351 mlxsw_reg_perpt_erpt_base_bank_set(payload, erpt_base_bank); in mlxsw_reg_perpt_pack()
3352 mlxsw_reg_perpt_erpt_base_index_set(payload, erpt_base_index); in mlxsw_reg_perpt_pack()
3353 mlxsw_reg_perpt_erp_index_in_vector_set(payload, erp_index); in mlxsw_reg_perpt_pack()
3354 mlxsw_reg_perpt_mask_memcpy_to(payload, mask); in mlxsw_reg_perpt_pack()
3390 static inline void mlxsw_reg_perar_pack(char *payload, u16 region_id, in mlxsw_reg_perar_pack() argument
3393 MLXSW_REG_ZERO(perar, payload); in mlxsw_reg_perar_pack()
3394 mlxsw_reg_perar_region_id_set(payload, region_id); in mlxsw_reg_perar_pack()
3395 mlxsw_reg_perar_hw_region_set(payload, hw_region); in mlxsw_reg_perar_pack()
3536 static inline void mlxsw_reg_ptce3_pack(char *payload, bool valid, in mlxsw_reg_ptce3_pack() argument
3545 MLXSW_REG_ZERO(ptce3, payload); in mlxsw_reg_ptce3_pack()
3546 mlxsw_reg_ptce3_v_set(payload, valid); in mlxsw_reg_ptce3_pack()
3547 mlxsw_reg_ptce3_op_set(payload, op); in mlxsw_reg_ptce3_pack()
3548 mlxsw_reg_ptce3_priority_set(payload, priority); in mlxsw_reg_ptce3_pack()
3549 mlxsw_reg_ptce3_tcam_region_info_memcpy_to(payload, tcam_region_info); in mlxsw_reg_ptce3_pack()
3550 mlxsw_reg_ptce3_flex2_key_blocks_memcpy_to(payload, key); in mlxsw_reg_ptce3_pack()
3551 mlxsw_reg_ptce3_erp_id_set(payload, erp_id); in mlxsw_reg_ptce3_pack()
3552 mlxsw_reg_ptce3_delta_start_set(payload, delta_start); in mlxsw_reg_ptce3_pack()
3553 mlxsw_reg_ptce3_delta_mask_set(payload, delta_mask); in mlxsw_reg_ptce3_pack()
3554 mlxsw_reg_ptce3_delta_value_set(payload, delta_value); in mlxsw_reg_ptce3_pack()
3555 mlxsw_reg_ptce3_large_exists_set(payload, large_exists); in mlxsw_reg_ptce3_pack()
3556 mlxsw_reg_ptce3_large_entry_key_id_set(payload, lkey_id); in mlxsw_reg_ptce3_pack()
3557 mlxsw_reg_ptce3_action_pointer_set(payload, action_pointer); in mlxsw_reg_ptce3_pack()
3606 static inline void mlxsw_reg_percr_pack(char *payload, u16 region_id) in mlxsw_reg_percr_pack() argument
3608 MLXSW_REG_ZERO(percr, payload); in mlxsw_reg_percr_pack()
3609 mlxsw_reg_percr_region_id_set(payload, region_id); in mlxsw_reg_percr_pack()
3610 mlxsw_reg_percr_atcam_ignore_prune_set(payload, false); in mlxsw_reg_percr_pack()
3611 mlxsw_reg_percr_ctcam_ignore_prune_set(payload, false); in mlxsw_reg_percr_pack()
3612 mlxsw_reg_percr_bf_bypass_set(payload, false); in mlxsw_reg_percr_pack()
3677 static inline void mlxsw_reg_pererp_erp_vector_pack(char *payload, in mlxsw_reg_pererp_erp_vector_pack() argument
3684 mlxsw_reg_pererp_erpt_vector_set(payload, bit, true); in mlxsw_reg_pererp_erp_vector_pack()
3687 static inline void mlxsw_reg_pererp_pack(char *payload, u16 region_id, in mlxsw_reg_pererp_pack() argument
3692 MLXSW_REG_ZERO(pererp, payload); in mlxsw_reg_pererp_pack()
3693 mlxsw_reg_pererp_region_id_set(payload, region_id); in mlxsw_reg_pererp_pack()
3694 mlxsw_reg_pererp_ctcam_le_set(payload, ctcam_le); in mlxsw_reg_pererp_pack()
3695 mlxsw_reg_pererp_erpt_pointer_valid_set(payload, erpt_pointer_valid); in mlxsw_reg_pererp_pack()
3696 mlxsw_reg_pererp_erpt_bank_pointer_set(payload, erpt_bank_pointer); in mlxsw_reg_pererp_pack()
3697 mlxsw_reg_pererp_erpt_pointer_set(payload, erpt_pointer); in mlxsw_reg_pererp_pack()
3698 mlxsw_reg_pererp_master_rp_id_set(payload, master_rp_id); in mlxsw_reg_pererp_pack()
3750 static inline void mlxsw_reg_peabfe_pack(char *payload) in mlxsw_reg_peabfe_pack() argument
3752 MLXSW_REG_ZERO(peabfe, payload); in mlxsw_reg_peabfe_pack()
3755 static inline void mlxsw_reg_peabfe_rec_pack(char *payload, int rec_index, in mlxsw_reg_peabfe_rec_pack() argument
3758 u8 num_rec = mlxsw_reg_peabfe_size_get(payload); in mlxsw_reg_peabfe_rec_pack()
3761 mlxsw_reg_peabfe_size_set(payload, rec_index + 1); in mlxsw_reg_peabfe_rec_pack()
3762 mlxsw_reg_peabfe_bf_entry_state_set(payload, rec_index, state); in mlxsw_reg_peabfe_rec_pack()
3763 mlxsw_reg_peabfe_bf_entry_bank_set(payload, rec_index, bank); in mlxsw_reg_peabfe_rec_pack()
3764 mlxsw_reg_peabfe_bf_entry_index_set(payload, rec_index, bf_index); in mlxsw_reg_peabfe_rec_pack()
3810 static inline void mlxsw_reg_iedr_pack(char *payload) in mlxsw_reg_iedr_pack() argument
3812 MLXSW_REG_ZERO(iedr, payload); in mlxsw_reg_iedr_pack()
3815 static inline void mlxsw_reg_iedr_rec_pack(char *payload, int rec_index, in mlxsw_reg_iedr_rec_pack() argument
3819 u8 num_rec = mlxsw_reg_iedr_num_rec_get(payload); in mlxsw_reg_iedr_rec_pack()
3822 mlxsw_reg_iedr_num_rec_set(payload, rec_index + 1); in mlxsw_reg_iedr_rec_pack()
3823 mlxsw_reg_iedr_rec_type_set(payload, rec_index, rec_type); in mlxsw_reg_iedr_rec_pack()
3824 mlxsw_reg_iedr_rec_size_set(payload, rec_index, rec_size); in mlxsw_reg_iedr_rec_pack()
3825 mlxsw_reg_iedr_rec_index_start_set(payload, rec_index, rec_index_start); in mlxsw_reg_iedr_rec_pack()
3857 static inline void mlxsw_reg_qpts_pack(char *payload, u16 local_port, in mlxsw_reg_qpts_pack() argument
3860 MLXSW_REG_ZERO(qpts, payload); in mlxsw_reg_qpts_pack()
3862 mlxsw_reg_qpts_local_port_set(payload, local_port); in mlxsw_reg_qpts_pack()
3863 mlxsw_reg_qpts_trust_state_set(payload, ts); in mlxsw_reg_qpts_pack()
4016 static inline void mlxsw_reg_qpcr_pack(char *payload, u16 pid, in mlxsw_reg_qpcr_pack() argument
4020 MLXSW_REG_ZERO(qpcr, payload); in mlxsw_reg_qpcr_pack()
4021 mlxsw_reg_qpcr_pid_set(payload, pid); in mlxsw_reg_qpcr_pack()
4022 mlxsw_reg_qpcr_g_set(payload, MLXSW_REG_QPCR_G_GLOBAL); in mlxsw_reg_qpcr_pack()
4023 mlxsw_reg_qpcr_rate_type_set(payload, MLXSW_REG_QPCR_RATE_TYPE_SINGLE); in mlxsw_reg_qpcr_pack()
4024 mlxsw_reg_qpcr_violate_action_set(payload, in mlxsw_reg_qpcr_pack()
4026 mlxsw_reg_qpcr_cir_set(payload, cir); in mlxsw_reg_qpcr_pack()
4027 mlxsw_reg_qpcr_ir_units_set(payload, ir_units); in mlxsw_reg_qpcr_pack()
4028 mlxsw_reg_qpcr_bytes_set(payload, bytes); in mlxsw_reg_qpcr_pack()
4029 mlxsw_reg_qpcr_cbs_set(payload, cbs); in mlxsw_reg_qpcr_pack()
4073 static inline void mlxsw_reg_qtct_pack(char *payload, u16 local_port, in mlxsw_reg_qtct_pack() argument
4076 MLXSW_REG_ZERO(qtct, payload); in mlxsw_reg_qtct_pack()
4077 mlxsw_reg_qtct_local_port_set(payload, local_port); in mlxsw_reg_qtct_pack()
4078 mlxsw_reg_qtct_switch_prio_set(payload, switch_prio); in mlxsw_reg_qtct_pack()
4079 mlxsw_reg_qtct_tclass_set(payload, tclass); in mlxsw_reg_qtct_pack()
4241 static inline void mlxsw_reg_qeec_pack(char *payload, u16 local_port, in mlxsw_reg_qeec_pack() argument
4245 MLXSW_REG_ZERO(qeec, payload); in mlxsw_reg_qeec_pack()
4246 mlxsw_reg_qeec_local_port_set(payload, local_port); in mlxsw_reg_qeec_pack()
4247 mlxsw_reg_qeec_element_hierarchy_set(payload, hr); in mlxsw_reg_qeec_pack()
4248 mlxsw_reg_qeec_element_index_set(payload, index); in mlxsw_reg_qeec_pack()
4249 mlxsw_reg_qeec_next_element_index_set(payload, next_index); in mlxsw_reg_qeec_pack()
4252 static inline void mlxsw_reg_qeec_ptps_pack(char *payload, u16 local_port, in mlxsw_reg_qeec_ptps_pack() argument
4255 MLXSW_REG_ZERO(qeec, payload); in mlxsw_reg_qeec_ptps_pack()
4256 mlxsw_reg_qeec_local_port_set(payload, local_port); in mlxsw_reg_qeec_ptps_pack()
4257 mlxsw_reg_qeec_element_hierarchy_set(payload, MLXSW_REG_QEEC_HR_PORT); in mlxsw_reg_qeec_ptps_pack()
4258 mlxsw_reg_qeec_ptps_set(payload, ptps); in mlxsw_reg_qeec_ptps_pack()
4290 static inline void mlxsw_reg_qrwe_pack(char *payload, u16 local_port, in mlxsw_reg_qrwe_pack() argument
4293 MLXSW_REG_ZERO(qrwe, payload); in mlxsw_reg_qrwe_pack()
4294 mlxsw_reg_qrwe_local_port_set(payload, local_port); in mlxsw_reg_qrwe_pack()
4295 mlxsw_reg_qrwe_pcp_set(payload, rewrite_pcp); in mlxsw_reg_qrwe_pack()
4296 mlxsw_reg_qrwe_dscp_set(payload, rewrite_dscp); in mlxsw_reg_qrwe_pack()
4370 static inline void mlxsw_reg_qpdsm_pack(char *payload, u16 local_port) in mlxsw_reg_qpdsm_pack() argument
4372 MLXSW_REG_ZERO(qpdsm, payload); in mlxsw_reg_qpdsm_pack()
4373 mlxsw_reg_qpdsm_local_port_set(payload, local_port); in mlxsw_reg_qpdsm_pack()
4377 mlxsw_reg_qpdsm_prio_pack(char *payload, unsigned short prio, u8 dscp) in mlxsw_reg_qpdsm_prio_pack() argument
4379 mlxsw_reg_qpdsm_prio_entry_color0_e_set(payload, prio, 1); in mlxsw_reg_qpdsm_prio_pack()
4380 mlxsw_reg_qpdsm_prio_entry_color0_dscp_set(payload, prio, dscp); in mlxsw_reg_qpdsm_prio_pack()
4381 mlxsw_reg_qpdsm_prio_entry_color1_e_set(payload, prio, 1); in mlxsw_reg_qpdsm_prio_pack()
4382 mlxsw_reg_qpdsm_prio_entry_color1_dscp_set(payload, prio, dscp); in mlxsw_reg_qpdsm_prio_pack()
4383 mlxsw_reg_qpdsm_prio_entry_color2_e_set(payload, prio, 1); in mlxsw_reg_qpdsm_prio_pack()
4384 mlxsw_reg_qpdsm_prio_entry_color2_dscp_set(payload, prio, dscp); in mlxsw_reg_qpdsm_prio_pack()
4411 static inline void mlxsw_reg_qpdp_pack(char *payload, u16 local_port, in mlxsw_reg_qpdp_pack() argument
4414 MLXSW_REG_ZERO(qpdp, payload); in mlxsw_reg_qpdp_pack()
4415 mlxsw_reg_qpdp_local_port_set(payload, local_port); in mlxsw_reg_qpdp_pack()
4416 mlxsw_reg_qpdp_switch_prio_set(payload, switch_prio); in mlxsw_reg_qpdp_pack()
4457 static inline void mlxsw_reg_qpdpm_pack(char *payload, u16 local_port) in mlxsw_reg_qpdpm_pack() argument
4459 MLXSW_REG_ZERO(qpdpm, payload); in mlxsw_reg_qpdpm_pack()
4460 mlxsw_reg_qpdpm_local_port_set(payload, local_port); in mlxsw_reg_qpdpm_pack()
4464 mlxsw_reg_qpdpm_dscp_pack(char *payload, unsigned short dscp, u8 prio) in mlxsw_reg_qpdpm_dscp_pack() argument
4466 mlxsw_reg_qpdpm_dscp_entry_e_set(payload, dscp, 1); in mlxsw_reg_qpdpm_dscp_pack()
4467 mlxsw_reg_qpdpm_dscp_entry_prio_set(payload, dscp, prio); in mlxsw_reg_qpdpm_dscp_pack()
4499 mlxsw_reg_qtctm_pack(char *payload, u16 local_port, bool mc) in mlxsw_reg_qtctm_pack() argument
4501 MLXSW_REG_ZERO(qtctm, payload); in mlxsw_reg_qtctm_pack()
4502 mlxsw_reg_qtctm_local_port_set(payload, local_port); in mlxsw_reg_qtctm_pack()
4503 mlxsw_reg_qtctm_mc_set(payload, mc); in mlxsw_reg_qtctm_pack()
4595 mlxsw_reg_qpsc_pack(char *payload, enum mlxsw_reg_qpsc_port_speed port_speed, in mlxsw_reg_qpsc_pack() argument
4600 MLXSW_REG_ZERO(qpsc, payload); in mlxsw_reg_qpsc_pack()
4601 mlxsw_reg_qpsc_port_speed_set(payload, port_speed); in mlxsw_reg_qpsc_pack()
4602 mlxsw_reg_qpsc_shaper_time_exp_set(payload, shaper_time_exp); in mlxsw_reg_qpsc_pack()
4603 mlxsw_reg_qpsc_shaper_time_mantissa_set(payload, shaper_time_mantissa); in mlxsw_reg_qpsc_pack()
4604 mlxsw_reg_qpsc_shaper_inc_set(payload, shaper_inc); in mlxsw_reg_qpsc_pack()
4605 mlxsw_reg_qpsc_shaper_bs_set(payload, shaper_bs); in mlxsw_reg_qpsc_pack()
4606 mlxsw_reg_qpsc_ptsc_we_set(payload, true); in mlxsw_reg_qpsc_pack()
4607 mlxsw_reg_qpsc_port_to_shaper_credits_set(payload, port_to_shaper_credits); in mlxsw_reg_qpsc_pack()
4608 mlxsw_reg_qpsc_ing_timestamp_inc_set(payload, ing_timestamp_inc); in mlxsw_reg_qpsc_pack()
4609 mlxsw_reg_qpsc_egr_timestamp_inc_set(payload, egr_timestamp_inc); in mlxsw_reg_qpsc_pack()
4672 static inline void mlxsw_reg_pmlp_pack(char *payload, u16 local_port) in mlxsw_reg_pmlp_pack() argument
4674 MLXSW_REG_ZERO(pmlp, payload); in mlxsw_reg_pmlp_pack()
4675 mlxsw_reg_pmlp_local_port_set(payload, local_port); in mlxsw_reg_pmlp_pack()
4719 static inline void mlxsw_reg_pmtu_pack(char *payload, u16 local_port, in mlxsw_reg_pmtu_pack() argument
4722 MLXSW_REG_ZERO(pmtu, payload); in mlxsw_reg_pmtu_pack()
4723 mlxsw_reg_pmtu_local_port_set(payload, local_port); in mlxsw_reg_pmtu_pack()
4724 mlxsw_reg_pmtu_max_mtu_set(payload, 0); in mlxsw_reg_pmtu_pack()
4725 mlxsw_reg_pmtu_admin_mtu_set(payload, new_mtu); in mlxsw_reg_pmtu_pack()
4726 mlxsw_reg_pmtu_oper_mtu_set(payload, 0); in mlxsw_reg_pmtu_pack()
4876 static inline void mlxsw_reg_ptys_eth_pack(char *payload, u16 local_port, in mlxsw_reg_ptys_eth_pack() argument
4879 MLXSW_REG_ZERO(ptys, payload); in mlxsw_reg_ptys_eth_pack()
4880 mlxsw_reg_ptys_local_port_set(payload, local_port); in mlxsw_reg_ptys_eth_pack()
4881 mlxsw_reg_ptys_proto_mask_set(payload, MLXSW_REG_PTYS_PROTO_MASK_ETH); in mlxsw_reg_ptys_eth_pack()
4882 mlxsw_reg_ptys_eth_proto_admin_set(payload, proto_admin); in mlxsw_reg_ptys_eth_pack()
4883 mlxsw_reg_ptys_an_disable_admin_set(payload, !autoneg); in mlxsw_reg_ptys_eth_pack()
4886 static inline void mlxsw_reg_ptys_ext_eth_pack(char *payload, u16 local_port, in mlxsw_reg_ptys_ext_eth_pack() argument
4889 MLXSW_REG_ZERO(ptys, payload); in mlxsw_reg_ptys_ext_eth_pack()
4890 mlxsw_reg_ptys_local_port_set(payload, local_port); in mlxsw_reg_ptys_ext_eth_pack()
4891 mlxsw_reg_ptys_proto_mask_set(payload, MLXSW_REG_PTYS_PROTO_MASK_ETH); in mlxsw_reg_ptys_ext_eth_pack()
4892 mlxsw_reg_ptys_ext_eth_proto_admin_set(payload, proto_admin); in mlxsw_reg_ptys_ext_eth_pack()
4893 mlxsw_reg_ptys_an_disable_admin_set(payload, !autoneg); in mlxsw_reg_ptys_ext_eth_pack()
4896 static inline void mlxsw_reg_ptys_eth_unpack(char *payload, in mlxsw_reg_ptys_eth_unpack() argument
4903 mlxsw_reg_ptys_eth_proto_cap_get(payload); in mlxsw_reg_ptys_eth_unpack()
4906 mlxsw_reg_ptys_eth_proto_admin_get(payload); in mlxsw_reg_ptys_eth_unpack()
4909 mlxsw_reg_ptys_eth_proto_oper_get(payload); in mlxsw_reg_ptys_eth_unpack()
4912 static inline void mlxsw_reg_ptys_ext_eth_unpack(char *payload, in mlxsw_reg_ptys_ext_eth_unpack() argument
4919 mlxsw_reg_ptys_ext_eth_proto_cap_get(payload); in mlxsw_reg_ptys_ext_eth_unpack()
4922 mlxsw_reg_ptys_ext_eth_proto_admin_get(payload); in mlxsw_reg_ptys_ext_eth_unpack()
4925 mlxsw_reg_ptys_ext_eth_proto_oper_get(payload); in mlxsw_reg_ptys_ext_eth_unpack()
4958 static inline void mlxsw_reg_ppad_pack(char *payload, bool single_base_mac, in mlxsw_reg_ppad_pack() argument
4961 MLXSW_REG_ZERO(ppad, payload); in mlxsw_reg_ppad_pack()
4962 mlxsw_reg_ppad_single_base_mac_set(payload, !!single_base_mac); in mlxsw_reg_ppad_pack()
4963 mlxsw_reg_ppad_local_port_set(payload, local_port); in mlxsw_reg_ppad_pack()
5033 static inline void mlxsw_reg_paos_pack(char *payload, u16 local_port, in mlxsw_reg_paos_pack() argument
5036 MLXSW_REG_ZERO(paos, payload); in mlxsw_reg_paos_pack()
5037 mlxsw_reg_paos_swid_set(payload, 0); in mlxsw_reg_paos_pack()
5038 mlxsw_reg_paos_local_port_set(payload, local_port); in mlxsw_reg_paos_pack()
5039 mlxsw_reg_paos_admin_status_set(payload, status); in mlxsw_reg_paos_pack()
5040 mlxsw_reg_paos_oper_status_set(payload, 0); in mlxsw_reg_paos_pack()
5041 mlxsw_reg_paos_ase_set(payload, 1); in mlxsw_reg_paos_pack()
5042 mlxsw_reg_paos_ee_set(payload, 1); in mlxsw_reg_paos_pack()
5043 mlxsw_reg_paos_e_set(payload, 1); in mlxsw_reg_paos_pack()
5168 static inline void mlxsw_reg_pfcc_prio_pack(char *payload, u8 pfc_en) in mlxsw_reg_pfcc_prio_pack() argument
5170 mlxsw_reg_pfcc_prio_mask_tx_set(payload, MLXSW_REG_PFCC_ALL_PRIO); in mlxsw_reg_pfcc_prio_pack()
5171 mlxsw_reg_pfcc_prio_mask_rx_set(payload, MLXSW_REG_PFCC_ALL_PRIO); in mlxsw_reg_pfcc_prio_pack()
5172 mlxsw_reg_pfcc_pfctx_set(payload, pfc_en); in mlxsw_reg_pfcc_prio_pack()
5173 mlxsw_reg_pfcc_pfcrx_set(payload, pfc_en); in mlxsw_reg_pfcc_prio_pack()
5176 static inline void mlxsw_reg_pfcc_pack(char *payload, u16 local_port) in mlxsw_reg_pfcc_pack() argument
5178 MLXSW_REG_ZERO(pfcc, payload); in mlxsw_reg_pfcc_pack()
5179 mlxsw_reg_pfcc_local_port_set(payload, local_port); in mlxsw_reg_pfcc_pack()
5687 static inline void mlxsw_reg_ppcnt_pack(char *payload, u16 local_port, in mlxsw_reg_ppcnt_pack() argument
5691 MLXSW_REG_ZERO(ppcnt, payload); in mlxsw_reg_ppcnt_pack()
5692 mlxsw_reg_ppcnt_swid_set(payload, 0); in mlxsw_reg_ppcnt_pack()
5693 mlxsw_reg_ppcnt_local_port_set(payload, local_port); in mlxsw_reg_ppcnt_pack()
5694 mlxsw_reg_ppcnt_pnat_set(payload, 0); in mlxsw_reg_ppcnt_pack()
5695 mlxsw_reg_ppcnt_grp_set(payload, grp); in mlxsw_reg_ppcnt_pack()
5696 mlxsw_reg_ppcnt_clr_set(payload, 0); in mlxsw_reg_ppcnt_pack()
5697 mlxsw_reg_ppcnt_lp_gl_set(payload, 1); in mlxsw_reg_ppcnt_pack()
5698 mlxsw_reg_ppcnt_prio_tc_set(payload, prio_tc); in mlxsw_reg_ppcnt_pack()
5778 static inline void mlxsw_reg_pptb_pack(char *payload, u16 local_port) in mlxsw_reg_pptb_pack() argument
5780 MLXSW_REG_ZERO(pptb, payload); in mlxsw_reg_pptb_pack()
5781 mlxsw_reg_pptb_mm_set(payload, MLXSW_REG_PPTB_MM_UM); in mlxsw_reg_pptb_pack()
5782 mlxsw_reg_pptb_local_port_set(payload, local_port); in mlxsw_reg_pptb_pack()
5783 mlxsw_reg_pptb_pm_set(payload, MLXSW_REG_PPTB_ALL_PRIO); in mlxsw_reg_pptb_pack()
5784 mlxsw_reg_pptb_pm_msb_set(payload, MLXSW_REG_PPTB_ALL_PRIO); in mlxsw_reg_pptb_pack()
5787 static inline void mlxsw_reg_pptb_prio_to_buff_pack(char *payload, u8 prio, in mlxsw_reg_pptb_prio_to_buff_pack() argument
5790 mlxsw_reg_pptb_prio_to_buff_set(payload, prio, buff); in mlxsw_reg_pptb_prio_to_buff_pack()
5791 mlxsw_reg_pptb_prio_to_buff_msb_set(payload, prio, buff); in mlxsw_reg_pptb_prio_to_buff_pack()
5875 static inline void mlxsw_reg_pbmc_pack(char *payload, u16 local_port, in mlxsw_reg_pbmc_pack() argument
5878 MLXSW_REG_ZERO(pbmc, payload); in mlxsw_reg_pbmc_pack()
5879 mlxsw_reg_pbmc_local_port_set(payload, local_port); in mlxsw_reg_pbmc_pack()
5880 mlxsw_reg_pbmc_xoff_timer_value_set(payload, xoff_timer_value); in mlxsw_reg_pbmc_pack()
5881 mlxsw_reg_pbmc_xoff_refresh_set(payload, xoff_refresh); in mlxsw_reg_pbmc_pack()
5884 static inline void mlxsw_reg_pbmc_lossy_buffer_pack(char *payload, in mlxsw_reg_pbmc_lossy_buffer_pack() argument
5888 mlxsw_reg_pbmc_buf_lossy_set(payload, buf_index, 1); in mlxsw_reg_pbmc_lossy_buffer_pack()
5889 mlxsw_reg_pbmc_buf_epsb_set(payload, buf_index, 0); in mlxsw_reg_pbmc_lossy_buffer_pack()
5890 mlxsw_reg_pbmc_buf_size_set(payload, buf_index, size); in mlxsw_reg_pbmc_lossy_buffer_pack()
5893 static inline void mlxsw_reg_pbmc_lossless_buffer_pack(char *payload, in mlxsw_reg_pbmc_lossless_buffer_pack() argument
5897 mlxsw_reg_pbmc_buf_lossy_set(payload, buf_index, 0); in mlxsw_reg_pbmc_lossless_buffer_pack()
5898 mlxsw_reg_pbmc_buf_epsb_set(payload, buf_index, 0); in mlxsw_reg_pbmc_lossless_buffer_pack()
5899 mlxsw_reg_pbmc_buf_size_set(payload, buf_index, size); in mlxsw_reg_pbmc_lossless_buffer_pack()
5900 mlxsw_reg_pbmc_buf_xoff_threshold_set(payload, buf_index, threshold); in mlxsw_reg_pbmc_lossless_buffer_pack()
5901 mlxsw_reg_pbmc_buf_xon_threshold_set(payload, buf_index, threshold); in mlxsw_reg_pbmc_lossless_buffer_pack()
5933 static inline void mlxsw_reg_pspa_pack(char *payload, u8 swid, u16 local_port) in mlxsw_reg_pspa_pack() argument
5935 MLXSW_REG_ZERO(pspa, payload); in mlxsw_reg_pspa_pack()
5936 mlxsw_reg_pspa_swid_set(payload, swid); in mlxsw_reg_pspa_pack()
5937 mlxsw_reg_pspa_local_port_set(payload, local_port); in mlxsw_reg_pspa_pack()
5938 mlxsw_reg_pspa_sub_port_set(payload, 0); in mlxsw_reg_pspa_pack()
6016 static inline void mlxsw_reg_pmaos_pack(char *payload, u8 slot_index, u8 module) in mlxsw_reg_pmaos_pack() argument
6018 MLXSW_REG_ZERO(pmaos, payload); in mlxsw_reg_pmaos_pack()
6019 mlxsw_reg_pmaos_slot_index_set(payload, slot_index); in mlxsw_reg_pmaos_pack()
6020 mlxsw_reg_pmaos_module_set(payload, module); in mlxsw_reg_pmaos_pack()
6049 static inline void mlxsw_reg_pplr_pack(char *payload, u16 local_port, in mlxsw_reg_pplr_pack() argument
6052 MLXSW_REG_ZERO(pplr, payload); in mlxsw_reg_pplr_pack()
6053 mlxsw_reg_pplr_local_port_set(payload, local_port); in mlxsw_reg_pplr_pack()
6054 mlxsw_reg_pplr_lb_en_set(payload, in mlxsw_reg_pplr_pack()
6112 static inline void mlxsw_reg_pmtdb_pack(char *payload, u8 slot_index, u8 module, in mlxsw_reg_pmtdb_pack() argument
6115 MLXSW_REG_ZERO(pmtdb, payload); in mlxsw_reg_pmtdb_pack()
6116 mlxsw_reg_pmtdb_slot_index_set(payload, slot_index); in mlxsw_reg_pmtdb_pack()
6117 mlxsw_reg_pmtdb_module_set(payload, module); in mlxsw_reg_pmtdb_pack()
6118 mlxsw_reg_pmtdb_ports_width_set(payload, ports_width); in mlxsw_reg_pmtdb_pack()
6119 mlxsw_reg_pmtdb_num_ports_set(payload, num_ports); in mlxsw_reg_pmtdb_pack()
6174 static inline void mlxsw_reg_pmecr_pack(char *payload, u16 local_port, in mlxsw_reg_pmecr_pack() argument
6177 MLXSW_REG_ZERO(pmecr, payload); in mlxsw_reg_pmecr_pack()
6178 mlxsw_reg_pmecr_local_port_set(payload, local_port); in mlxsw_reg_pmecr_pack()
6179 mlxsw_reg_pmecr_e_set(payload, e); in mlxsw_reg_pmecr_pack()
6180 mlxsw_reg_pmecr_ee_set(payload, true); in mlxsw_reg_pmecr_pack()
6181 mlxsw_reg_pmecr_swi_set(payload, true); in mlxsw_reg_pmecr_pack()
6182 mlxsw_reg_pmecr_eswi_set(payload, true); in mlxsw_reg_pmecr_pack()
6271 static inline void mlxsw_reg_pddr_pack(char *payload, u16 local_port, in mlxsw_reg_pddr_pack() argument
6274 MLXSW_REG_ZERO(pddr, payload); in mlxsw_reg_pddr_pack()
6275 mlxsw_reg_pddr_local_port_set(payload, local_port); in mlxsw_reg_pddr_pack()
6276 mlxsw_reg_pddr_page_select_set(payload, page_select); in mlxsw_reg_pddr_pack()
6328 static inline void mlxsw_reg_pmmp_pack(char *payload, u8 slot_index, u8 module) in mlxsw_reg_pmmp_pack() argument
6330 MLXSW_REG_ZERO(pmmp, payload); in mlxsw_reg_pmmp_pack()
6331 mlxsw_reg_pmmp_slot_index_set(payload, slot_index); in mlxsw_reg_pmmp_pack()
6332 mlxsw_reg_pmmp_module_set(payload, module); in mlxsw_reg_pmmp_pack()
6368 static inline void mlxsw_reg_pllp_pack(char *payload, u16 local_port) in mlxsw_reg_pllp_pack() argument
6370 MLXSW_REG_ZERO(pllp, payload); in mlxsw_reg_pllp_pack()
6371 mlxsw_reg_pllp_local_port_set(payload, local_port); in mlxsw_reg_pllp_pack()
6374 static inline void mlxsw_reg_pllp_unpack(char *payload, u8 *label_port, in mlxsw_reg_pllp_unpack() argument
6377 *label_port = mlxsw_reg_pllp_label_port_get(payload); in mlxsw_reg_pllp_unpack()
6378 *split_num = mlxsw_reg_pllp_split_num_get(payload); in mlxsw_reg_pllp_unpack()
6379 *slot_index = mlxsw_reg_pllp_slot_index_get(payload); in mlxsw_reg_pllp_unpack()
6427 static inline void mlxsw_reg_pmtm_pack(char *payload, u8 slot_index, u8 module) in mlxsw_reg_pmtm_pack() argument
6429 MLXSW_REG_ZERO(pmtm, payload); in mlxsw_reg_pmtm_pack()
6430 mlxsw_reg_pmtm_slot_index_set(payload, slot_index); in mlxsw_reg_pmtm_pack()
6431 mlxsw_reg_pmtm_module_set(payload, module); in mlxsw_reg_pmtm_pack()
6577 static inline void mlxsw_reg_htgt_pack(char *payload, u8 group, u8 policer_id, in mlxsw_reg_htgt_pack() argument
6580 MLXSW_REG_ZERO(htgt, payload); in mlxsw_reg_htgt_pack()
6583 mlxsw_reg_htgt_pide_set(payload, in mlxsw_reg_htgt_pack()
6586 mlxsw_reg_htgt_pide_set(payload, in mlxsw_reg_htgt_pack()
6588 mlxsw_reg_htgt_pid_set(payload, policer_id); in mlxsw_reg_htgt_pack()
6591 mlxsw_reg_htgt_type_set(payload, MLXSW_REG_HTGT_PATH_TYPE_LOCAL); in mlxsw_reg_htgt_pack()
6592 mlxsw_reg_htgt_trap_group_set(payload, group); in mlxsw_reg_htgt_pack()
6593 mlxsw_reg_htgt_mirror_action_set(payload, MLXSW_REG_HTGT_TRAP_TO_CPU); in mlxsw_reg_htgt_pack()
6594 mlxsw_reg_htgt_mirroring_agent_set(payload, 0); in mlxsw_reg_htgt_pack()
6595 mlxsw_reg_htgt_priority_set(payload, priority); in mlxsw_reg_htgt_pack()
6596 mlxsw_reg_htgt_local_path_cpu_tclass_set(payload, tc); in mlxsw_reg_htgt_pack()
6597 mlxsw_reg_htgt_local_path_rdq_set(payload, group); in mlxsw_reg_htgt_pack()
6683 static inline void mlxsw_reg_hpkt_pack(char *payload, u8 action, u16 trap_id, in mlxsw_reg_hpkt_pack() argument
6687 MLXSW_REG_ZERO(hpkt, payload); in mlxsw_reg_hpkt_pack()
6688 mlxsw_reg_hpkt_ack_set(payload, MLXSW_REG_HPKT_ACK_NOT_REQUIRED); in mlxsw_reg_hpkt_pack()
6689 mlxsw_reg_hpkt_action_set(payload, action); in mlxsw_reg_hpkt_pack()
6690 mlxsw_reg_hpkt_trap_group_set(payload, trap_group); in mlxsw_reg_hpkt_pack()
6691 mlxsw_reg_hpkt_trap_id_set(payload, trap_id); in mlxsw_reg_hpkt_pack()
6692 mlxsw_reg_hpkt_ctrl_set(payload, is_ctrl ? in mlxsw_reg_hpkt_pack()
6762 static inline void mlxsw_reg_rgcr_pack(char *payload, bool ipv4_en, in mlxsw_reg_rgcr_pack() argument
6765 MLXSW_REG_ZERO(rgcr, payload); in mlxsw_reg_rgcr_pack()
6766 mlxsw_reg_rgcr_ipv4_en_set(payload, ipv4_en); in mlxsw_reg_rgcr_pack()
6767 mlxsw_reg_rgcr_ipv6_en_set(payload, ipv6_en); in mlxsw_reg_rgcr_pack()
7105 static inline void mlxsw_reg_ritr_counter_pack(char *payload, u32 index, in mlxsw_reg_ritr_counter_pack() argument
7116 mlxsw_reg_ritr_egress_counter_set_type_set(payload, set_type); in mlxsw_reg_ritr_counter_pack()
7117 mlxsw_reg_ritr_egress_counter_index_set(payload, index); in mlxsw_reg_ritr_counter_pack()
7119 mlxsw_reg_ritr_ingress_counter_set_type_set(payload, set_type); in mlxsw_reg_ritr_counter_pack()
7120 mlxsw_reg_ritr_ingress_counter_index_set(payload, index); in mlxsw_reg_ritr_counter_pack()
7124 static inline void mlxsw_reg_ritr_rif_pack(char *payload, u16 rif) in mlxsw_reg_ritr_rif_pack() argument
7126 MLXSW_REG_ZERO(ritr, payload); in mlxsw_reg_ritr_rif_pack()
7127 mlxsw_reg_ritr_rif_set(payload, rif); in mlxsw_reg_ritr_rif_pack()
7130 static inline void mlxsw_reg_ritr_sp_if_pack(char *payload, bool lag, in mlxsw_reg_ritr_sp_if_pack() argument
7133 mlxsw_reg_ritr_sp_if_lag_set(payload, lag); in mlxsw_reg_ritr_sp_if_pack()
7134 mlxsw_reg_ritr_sp_if_system_port_set(payload, system_port); in mlxsw_reg_ritr_sp_if_pack()
7135 mlxsw_reg_ritr_sp_if_efid_set(payload, efid); in mlxsw_reg_ritr_sp_if_pack()
7136 mlxsw_reg_ritr_sp_if_vid_set(payload, vid); in mlxsw_reg_ritr_sp_if_pack()
7139 static inline void mlxsw_reg_ritr_pack(char *payload, bool enable, in mlxsw_reg_ritr_pack() argument
7145 MLXSW_REG_ZERO(ritr, payload); in mlxsw_reg_ritr_pack()
7146 mlxsw_reg_ritr_enable_set(payload, enable); in mlxsw_reg_ritr_pack()
7147 mlxsw_reg_ritr_ipv4_set(payload, 1); in mlxsw_reg_ritr_pack()
7148 mlxsw_reg_ritr_ipv6_set(payload, 1); in mlxsw_reg_ritr_pack()
7149 mlxsw_reg_ritr_ipv4_mc_set(payload, 1); in mlxsw_reg_ritr_pack()
7150 mlxsw_reg_ritr_ipv6_mc_set(payload, 1); in mlxsw_reg_ritr_pack()
7151 mlxsw_reg_ritr_type_set(payload, type); in mlxsw_reg_ritr_pack()
7152 mlxsw_reg_ritr_op_set(payload, op); in mlxsw_reg_ritr_pack()
7153 mlxsw_reg_ritr_rif_set(payload, rif); in mlxsw_reg_ritr_pack()
7154 mlxsw_reg_ritr_ipv4_fe_set(payload, 1); in mlxsw_reg_ritr_pack()
7155 mlxsw_reg_ritr_ipv6_fe_set(payload, 1); in mlxsw_reg_ritr_pack()
7156 mlxsw_reg_ritr_ipv4_mc_fe_set(payload, 1); in mlxsw_reg_ritr_pack()
7157 mlxsw_reg_ritr_ipv6_mc_fe_set(payload, 1); in mlxsw_reg_ritr_pack()
7158 mlxsw_reg_ritr_lb_en_set(payload, 1); in mlxsw_reg_ritr_pack()
7159 mlxsw_reg_ritr_virtual_router_set(payload, vr_id); in mlxsw_reg_ritr_pack()
7160 mlxsw_reg_ritr_mtu_set(payload, mtu); in mlxsw_reg_ritr_pack()
7163 static inline void mlxsw_reg_ritr_mac_pack(char *payload, const char *mac) in mlxsw_reg_ritr_mac_pack() argument
7165 mlxsw_reg_ritr_if_mac_memcpy_to(payload, mac); in mlxsw_reg_ritr_mac_pack()
7169 mlxsw_reg_ritr_vlan_if_pack(char *payload, bool enable, u16 rif, u16 vr_id, in mlxsw_reg_ritr_vlan_if_pack() argument
7175 mlxsw_reg_ritr_pack(payload, enable, type, rif, vr_id, mtu); in mlxsw_reg_ritr_vlan_if_pack()
7176 mlxsw_reg_ritr_if_mac_memcpy_to(payload, mac); in mlxsw_reg_ritr_vlan_if_pack()
7177 mlxsw_reg_ritr_if_mac_profile_id_set(payload, mac_profile_id); in mlxsw_reg_ritr_vlan_if_pack()
7178 mlxsw_reg_ritr_vlan_if_vlan_id_set(payload, vlan_id); in mlxsw_reg_ritr_vlan_if_pack()
7179 mlxsw_reg_ritr_vlan_if_efid_set(payload, efid); in mlxsw_reg_ritr_vlan_if_pack()
7183 mlxsw_reg_ritr_loopback_ipip_common_pack(char *payload, in mlxsw_reg_ritr_loopback_ipip_common_pack() argument
7188 mlxsw_reg_ritr_loopback_ipip_type_set(payload, ipip_type); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7189 mlxsw_reg_ritr_loopback_ipip_options_set(payload, options); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7190 mlxsw_reg_ritr_loopback_ipip_uvr_set(payload, uvr_id); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7191 mlxsw_reg_ritr_loopback_ipip_underlay_rif_set(payload, underlay_rif); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7192 mlxsw_reg_ritr_loopback_ipip_gre_key_set(payload, gre_key); in mlxsw_reg_ritr_loopback_ipip_common_pack()
7196 mlxsw_reg_ritr_loopback_ipip4_pack(char *payload, in mlxsw_reg_ritr_loopback_ipip4_pack() argument
7201 mlxsw_reg_ritr_loopback_protocol_set(payload, in mlxsw_reg_ritr_loopback_ipip4_pack()
7203 mlxsw_reg_ritr_loopback_ipip_common_pack(payload, ipip_type, options, in mlxsw_reg_ritr_loopback_ipip4_pack()
7205 mlxsw_reg_ritr_loopback_ipip_usip4_set(payload, usip); in mlxsw_reg_ritr_loopback_ipip4_pack()
7209 mlxsw_reg_ritr_loopback_ipip6_pack(char *payload, in mlxsw_reg_ritr_loopback_ipip6_pack() argument
7218 mlxsw_reg_ritr_loopback_protocol_set(payload, protocol); in mlxsw_reg_ritr_loopback_ipip6_pack()
7219 mlxsw_reg_ritr_loopback_ipip_common_pack(payload, ipip_type, options, in mlxsw_reg_ritr_loopback_ipip6_pack()
7221 mlxsw_reg_ritr_loopback_ipip_usip6_memcpy_to(payload, in mlxsw_reg_ritr_loopback_ipip6_pack()
7265 static inline void mlxsw_reg_rtar_pack(char *payload, in mlxsw_reg_rtar_pack() argument
7270 MLXSW_REG_ZERO(rtar, payload); in mlxsw_reg_rtar_pack()
7271 mlxsw_reg_rtar_op_set(payload, op); in mlxsw_reg_rtar_pack()
7272 mlxsw_reg_rtar_key_type_set(payload, key_type); in mlxsw_reg_rtar_pack()
7273 mlxsw_reg_rtar_region_size_set(payload, region_size); in mlxsw_reg_rtar_pack()
7467 mlxsw_reg_ratr_pack(char *payload, in mlxsw_reg_ratr_pack() argument
7472 MLXSW_REG_ZERO(ratr, payload); in mlxsw_reg_ratr_pack()
7473 mlxsw_reg_ratr_op_set(payload, op); in mlxsw_reg_ratr_pack()
7474 mlxsw_reg_ratr_v_set(payload, valid); in mlxsw_reg_ratr_pack()
7475 mlxsw_reg_ratr_type_set(payload, type); in mlxsw_reg_ratr_pack()
7476 mlxsw_reg_ratr_adjacency_index_low_set(payload, adjacency_index); in mlxsw_reg_ratr_pack()
7477 mlxsw_reg_ratr_adjacency_index_high_set(payload, adjacency_index >> 16); in mlxsw_reg_ratr_pack()
7478 mlxsw_reg_ratr_egress_router_interface_set(payload, egress_rif); in mlxsw_reg_ratr_pack()
7481 static inline void mlxsw_reg_ratr_eth_entry_pack(char *payload, in mlxsw_reg_ratr_eth_entry_pack() argument
7484 mlxsw_reg_ratr_eth_destination_mac_memcpy_to(payload, dest_mac); in mlxsw_reg_ratr_eth_entry_pack()
7487 static inline void mlxsw_reg_ratr_ipip4_entry_pack(char *payload, u32 ipv4_udip) in mlxsw_reg_ratr_ipip4_entry_pack() argument
7489 mlxsw_reg_ratr_ipip_type_set(payload, MLXSW_REG_RATR_IPIP_TYPE_IPV4); in mlxsw_reg_ratr_ipip4_entry_pack()
7490 mlxsw_reg_ratr_ipip_ipv4_udip_set(payload, ipv4_udip); in mlxsw_reg_ratr_ipip4_entry_pack()
7493 static inline void mlxsw_reg_ratr_ipip6_entry_pack(char *payload, u32 ipv6_ptr) in mlxsw_reg_ratr_ipip6_entry_pack() argument
7495 mlxsw_reg_ratr_ipip_type_set(payload, MLXSW_REG_RATR_IPIP_TYPE_IPV6); in mlxsw_reg_ratr_ipip6_entry_pack()
7496 mlxsw_reg_ratr_ipip_ipv6_ptr_set(payload, ipv6_ptr); in mlxsw_reg_ratr_ipip6_entry_pack()
7499 static inline void mlxsw_reg_ratr_counter_pack(char *payload, u64 counter_index, in mlxsw_reg_ratr_counter_pack() argument
7509 mlxsw_reg_ratr_counter_index_set(payload, counter_index); in mlxsw_reg_ratr_counter_pack()
7510 mlxsw_reg_ratr_counter_set_type_set(payload, set_type); in mlxsw_reg_ratr_counter_pack()
7542 static inline void mlxsw_reg_rdpm_pack(char *payload, unsigned short index, in mlxsw_reg_rdpm_pack() argument
7545 mlxsw_reg_rdpm_dscp_entry_e_set(payload, index, 1); in mlxsw_reg_rdpm_pack()
7546 mlxsw_reg_rdpm_dscp_entry_prio_set(payload, index, prio); in mlxsw_reg_rdpm_pack()
7662 static inline void mlxsw_reg_ricnt_pack(char *payload, u32 index, in mlxsw_reg_ricnt_pack() argument
7665 MLXSW_REG_ZERO(ricnt, payload); in mlxsw_reg_ricnt_pack()
7666 mlxsw_reg_ricnt_op_set(payload, op); in mlxsw_reg_ricnt_pack()
7667 mlxsw_reg_ricnt_counter_index_set(payload, index); in mlxsw_reg_ricnt_pack()
7668 mlxsw_reg_ricnt_counter_set_type_set(payload, in mlxsw_reg_ricnt_pack()
7718 static inline void mlxsw_reg_rrcr_pack(char *payload, enum mlxsw_reg_rrcr_op op, in mlxsw_reg_rrcr_pack() argument
7723 MLXSW_REG_ZERO(rrcr, payload); in mlxsw_reg_rrcr_pack()
7724 mlxsw_reg_rrcr_op_set(payload, op); in mlxsw_reg_rrcr_pack()
7725 mlxsw_reg_rrcr_offset_set(payload, offset); in mlxsw_reg_rrcr_pack()
7726 mlxsw_reg_rrcr_size_set(payload, size); in mlxsw_reg_rrcr_pack()
7727 mlxsw_reg_rrcr_table_id_set(payload, table_id); in mlxsw_reg_rrcr_pack()
7728 mlxsw_reg_rrcr_dest_offset_set(payload, dest_offset); in mlxsw_reg_rrcr_pack()
7768 static inline void mlxsw_reg_ralta_pack(char *payload, bool alloc, in mlxsw_reg_ralta_pack() argument
7772 MLXSW_REG_ZERO(ralta, payload); in mlxsw_reg_ralta_pack()
7773 mlxsw_reg_ralta_op_set(payload, !alloc); in mlxsw_reg_ralta_pack()
7774 mlxsw_reg_ralta_protocol_set(payload, protocol); in mlxsw_reg_ralta_pack()
7775 mlxsw_reg_ralta_tree_id_set(payload, tree_id); in mlxsw_reg_ralta_pack()
7827 static inline void mlxsw_reg_ralst_pack(char *payload, u8 root_bin, u8 tree_id) in mlxsw_reg_ralst_pack() argument
7829 MLXSW_REG_ZERO(ralst, payload); in mlxsw_reg_ralst_pack()
7832 memset(payload + MLXSW_REG_RALST_BIN_OFFSET, in mlxsw_reg_ralst_pack()
7835 mlxsw_reg_ralst_root_bin_set(payload, root_bin); in mlxsw_reg_ralst_pack()
7836 mlxsw_reg_ralst_tree_id_set(payload, tree_id); in mlxsw_reg_ralst_pack()
7839 static inline void mlxsw_reg_ralst_bin_pack(char *payload, u8 bin_number, in mlxsw_reg_ralst_bin_pack() argument
7845 mlxsw_reg_ralst_left_child_bin_set(payload, bin_index, left_child_bin); in mlxsw_reg_ralst_bin_pack()
7846 mlxsw_reg_ralst_right_child_bin_set(payload, bin_index, in mlxsw_reg_ralst_bin_pack()
7880 static inline void mlxsw_reg_raltb_pack(char *payload, u16 virtual_router, in mlxsw_reg_raltb_pack() argument
7884 MLXSW_REG_ZERO(raltb, payload); in mlxsw_reg_raltb_pack()
7885 mlxsw_reg_raltb_virtual_router_set(payload, virtual_router); in mlxsw_reg_raltb_pack()
7886 mlxsw_reg_raltb_protocol_set(payload, protocol); in mlxsw_reg_raltb_pack()
7887 mlxsw_reg_raltb_tree_id_set(payload, tree_id); in mlxsw_reg_raltb_pack()
8094 static inline void mlxsw_reg_ralue_pack(char *payload, in mlxsw_reg_ralue_pack() argument
8099 MLXSW_REG_ZERO(ralue, payload); in mlxsw_reg_ralue_pack()
8100 mlxsw_reg_ralue_protocol_set(payload, protocol); in mlxsw_reg_ralue_pack()
8101 mlxsw_reg_ralue_op_set(payload, op); in mlxsw_reg_ralue_pack()
8102 mlxsw_reg_ralue_virtual_router_set(payload, virtual_router); in mlxsw_reg_ralue_pack()
8103 mlxsw_reg_ralue_prefix_len_set(payload, prefix_len); in mlxsw_reg_ralue_pack()
8104 mlxsw_reg_ralue_entry_type_set(payload, in mlxsw_reg_ralue_pack()
8106 mlxsw_reg_ralue_bmp_len_set(payload, prefix_len); in mlxsw_reg_ralue_pack()
8109 static inline void mlxsw_reg_ralue_pack4(char *payload, in mlxsw_reg_ralue_pack4() argument
8115 mlxsw_reg_ralue_pack(payload, protocol, op, virtual_router, prefix_len); in mlxsw_reg_ralue_pack4()
8116 mlxsw_reg_ralue_dip4_set(payload, dip); in mlxsw_reg_ralue_pack4()
8119 static inline void mlxsw_reg_ralue_pack6(char *payload, in mlxsw_reg_ralue_pack6() argument
8125 mlxsw_reg_ralue_pack(payload, protocol, op, virtual_router, prefix_len); in mlxsw_reg_ralue_pack6()
8126 mlxsw_reg_ralue_dip6_memcpy_to(payload, dip); in mlxsw_reg_ralue_pack6()
8130 mlxsw_reg_ralue_act_remote_pack(char *payload, in mlxsw_reg_ralue_act_remote_pack() argument
8134 mlxsw_reg_ralue_action_type_set(payload, in mlxsw_reg_ralue_act_remote_pack()
8136 mlxsw_reg_ralue_trap_action_set(payload, trap_action); in mlxsw_reg_ralue_act_remote_pack()
8137 mlxsw_reg_ralue_trap_id_set(payload, trap_id); in mlxsw_reg_ralue_act_remote_pack()
8138 mlxsw_reg_ralue_adjacency_index_set(payload, adjacency_index); in mlxsw_reg_ralue_act_remote_pack()
8139 mlxsw_reg_ralue_ecmp_size_set(payload, ecmp_size); in mlxsw_reg_ralue_act_remote_pack()
8143 mlxsw_reg_ralue_act_local_pack(char *payload, in mlxsw_reg_ralue_act_local_pack() argument
8147 mlxsw_reg_ralue_action_type_set(payload, in mlxsw_reg_ralue_act_local_pack()
8149 mlxsw_reg_ralue_trap_action_set(payload, trap_action); in mlxsw_reg_ralue_act_local_pack()
8150 mlxsw_reg_ralue_trap_id_set(payload, trap_id); in mlxsw_reg_ralue_act_local_pack()
8151 mlxsw_reg_ralue_local_erif_set(payload, local_erif); in mlxsw_reg_ralue_act_local_pack()
8155 mlxsw_reg_ralue_act_ip2me_pack(char *payload) in mlxsw_reg_ralue_act_ip2me_pack() argument
8157 mlxsw_reg_ralue_action_type_set(payload, in mlxsw_reg_ralue_act_ip2me_pack()
8162 mlxsw_reg_ralue_act_ip2me_tun_pack(char *payload, u32 tunnel_ptr) in mlxsw_reg_ralue_act_ip2me_tun_pack() argument
8164 mlxsw_reg_ralue_action_type_set(payload, in mlxsw_reg_ralue_act_ip2me_tun_pack()
8166 mlxsw_reg_ralue_ip2me_v_set(payload, 1); in mlxsw_reg_ralue_act_ip2me_tun_pack()
8167 mlxsw_reg_ralue_ip2me_tunnel_ptr_set(payload, tunnel_ptr); in mlxsw_reg_ralue_act_ip2me_tun_pack()
8288 static inline void mlxsw_reg_rauht_pack(char *payload, in mlxsw_reg_rauht_pack() argument
8292 MLXSW_REG_ZERO(rauht, payload); in mlxsw_reg_rauht_pack()
8293 mlxsw_reg_rauht_op_set(payload, op); in mlxsw_reg_rauht_pack()
8294 mlxsw_reg_rauht_rif_set(payload, rif); in mlxsw_reg_rauht_pack()
8295 mlxsw_reg_rauht_mac_memcpy_to(payload, mac); in mlxsw_reg_rauht_pack()
8298 static inline void mlxsw_reg_rauht_pack4(char *payload, in mlxsw_reg_rauht_pack4() argument
8302 mlxsw_reg_rauht_pack(payload, op, rif, mac); in mlxsw_reg_rauht_pack4()
8303 mlxsw_reg_rauht_dip4_set(payload, dip); in mlxsw_reg_rauht_pack4()
8306 static inline void mlxsw_reg_rauht_pack6(char *payload, in mlxsw_reg_rauht_pack6() argument
8310 mlxsw_reg_rauht_pack(payload, op, rif, mac); in mlxsw_reg_rauht_pack6()
8311 mlxsw_reg_rauht_type_set(payload, MLXSW_REG_RAUHT_TYPE_IPV6); in mlxsw_reg_rauht_pack6()
8312 mlxsw_reg_rauht_dip6_memcpy_to(payload, dip); in mlxsw_reg_rauht_pack6()
8315 static inline void mlxsw_reg_rauht_pack_counter(char *payload, in mlxsw_reg_rauht_pack_counter() argument
8318 mlxsw_reg_rauht_counter_index_set(payload, counter_index); in mlxsw_reg_rauht_pack_counter()
8319 mlxsw_reg_rauht_counter_set_type_set(payload, in mlxsw_reg_rauht_pack_counter()
8371 static inline void mlxsw_reg_raleu_pack(char *payload, in mlxsw_reg_raleu_pack() argument
8378 MLXSW_REG_ZERO(raleu, payload); in mlxsw_reg_raleu_pack()
8379 mlxsw_reg_raleu_protocol_set(payload, protocol); in mlxsw_reg_raleu_pack()
8380 mlxsw_reg_raleu_virtual_router_set(payload, virtual_router); in mlxsw_reg_raleu_pack()
8381 mlxsw_reg_raleu_adjacency_index_set(payload, adjacency_index); in mlxsw_reg_raleu_pack()
8382 mlxsw_reg_raleu_ecmp_size_set(payload, ecmp_size); in mlxsw_reg_raleu_pack()
8383 mlxsw_reg_raleu_new_adjacency_index_set(payload, new_adjacency_index); in mlxsw_reg_raleu_pack()
8384 mlxsw_reg_raleu_new_ecmp_size_set(payload, new_ecmp_size); in mlxsw_reg_raleu_pack()
8465 static inline void mlxsw_reg_rauhtd_pack(char *payload, in mlxsw_reg_rauhtd_pack() argument
8468 MLXSW_REG_ZERO(rauhtd, payload); in mlxsw_reg_rauhtd_pack()
8469 mlxsw_reg_rauhtd_filter_fields_set(payload, MLXSW_REG_RAUHTD_FILTER_A); in mlxsw_reg_rauhtd_pack()
8470 mlxsw_reg_rauhtd_op_set(payload, MLXSW_REG_RAUHTD_OP_DUMP_AND_CLEAR); in mlxsw_reg_rauhtd_pack()
8471 mlxsw_reg_rauhtd_num_rec_set(payload, MLXSW_REG_RAUHTD_REC_MAX_NUM); in mlxsw_reg_rauhtd_pack()
8472 mlxsw_reg_rauhtd_entry_a_set(payload, 1); in mlxsw_reg_rauhtd_pack()
8473 mlxsw_reg_rauhtd_type_set(payload, type); in mlxsw_reg_rauhtd_pack()
8545 static inline void mlxsw_reg_rauhtd_ent_ipv4_unpack(char *payload, in mlxsw_reg_rauhtd_ent_ipv4_unpack() argument
8549 *p_rif = mlxsw_reg_rauhtd_ipv4_ent_rif_get(payload, ent_index); in mlxsw_reg_rauhtd_ent_ipv4_unpack()
8550 *p_dip = mlxsw_reg_rauhtd_ipv4_ent_dip_get(payload, ent_index); in mlxsw_reg_rauhtd_ent_ipv4_unpack()
8553 static inline void mlxsw_reg_rauhtd_ent_ipv6_unpack(char *payload, in mlxsw_reg_rauhtd_ent_ipv6_unpack() argument
8557 *p_rif = mlxsw_reg_rauhtd_ipv6_ent_rif_get(payload, rec_index); in mlxsw_reg_rauhtd_ent_ipv6_unpack()
8558 mlxsw_reg_rauhtd_ipv6_ent_dip_memcpy_from(payload, rec_index, p_dip); in mlxsw_reg_rauhtd_ent_ipv6_unpack()
8672 static inline void mlxsw_reg_rtdp_pack(char *payload, in mlxsw_reg_rtdp_pack() argument
8676 MLXSW_REG_ZERO(rtdp, payload); in mlxsw_reg_rtdp_pack()
8677 mlxsw_reg_rtdp_type_set(payload, type); in mlxsw_reg_rtdp_pack()
8678 mlxsw_reg_rtdp_tunnel_index_set(payload, tunnel_index); in mlxsw_reg_rtdp_pack()
8682 mlxsw_reg_rtdp_ipip_pack(char *payload, u16 irif, in mlxsw_reg_rtdp_ipip_pack() argument
8687 mlxsw_reg_rtdp_ipip_irif_set(payload, irif); in mlxsw_reg_rtdp_ipip_pack()
8688 mlxsw_reg_rtdp_ipip_sip_check_set(payload, sip_check); in mlxsw_reg_rtdp_ipip_pack()
8689 mlxsw_reg_rtdp_ipip_type_check_set(payload, type_check); in mlxsw_reg_rtdp_ipip_pack()
8690 mlxsw_reg_rtdp_ipip_gre_key_check_set(payload, gre_key_check); in mlxsw_reg_rtdp_ipip_pack()
8691 mlxsw_reg_rtdp_ipip_expected_gre_key_set(payload, expected_gre_key); in mlxsw_reg_rtdp_ipip_pack()
8695 mlxsw_reg_rtdp_ipip4_pack(char *payload, u16 irif, in mlxsw_reg_rtdp_ipip4_pack() argument
8700 mlxsw_reg_rtdp_ipip_pack(payload, irif, sip_check, type_check, in mlxsw_reg_rtdp_ipip4_pack()
8702 mlxsw_reg_rtdp_ipip_ipv4_usip_set(payload, ipv4_usip); in mlxsw_reg_rtdp_ipip4_pack()
8706 mlxsw_reg_rtdp_ipip6_pack(char *payload, u16 irif, in mlxsw_reg_rtdp_ipip6_pack() argument
8711 mlxsw_reg_rtdp_ipip_pack(payload, irif, sip_check, type_check, in mlxsw_reg_rtdp_ipip6_pack()
8713 mlxsw_reg_rtdp_ipip_ipv6_usip_ptr_set(payload, ipv6_usip_ptr); in mlxsw_reg_rtdp_ipip6_pack()
8739 static inline void mlxsw_reg_rips_pack(char *payload, u32 index, in mlxsw_reg_rips_pack() argument
8742 MLXSW_REG_ZERO(rips, payload); in mlxsw_reg_rips_pack()
8743 mlxsw_reg_rips_index_set(payload, index); in mlxsw_reg_rips_pack()
8744 mlxsw_reg_rips_ipv6_memcpy_to(payload, (const char *)ipv6); in mlxsw_reg_rips_pack()
8791 static inline void mlxsw_reg_ratrad_pack(char *payload, u32 adjacency_index, in mlxsw_reg_ratrad_pack() argument
8794 MLXSW_REG_ZERO(ratrad, payload); in mlxsw_reg_ratrad_pack()
8795 mlxsw_reg_ratrad_op_set(payload, in mlxsw_reg_ratrad_pack()
8797 mlxsw_reg_ratrad_ecmp_size_set(payload, ecmp_size); in mlxsw_reg_ratrad_pack()
8798 mlxsw_reg_ratrad_adjacency_index_set(payload, adjacency_index); in mlxsw_reg_ratrad_pack()
8865 static inline void mlxsw_reg_rigr2_pack(char *payload, u32 rigr_index, in mlxsw_reg_rigr2_pack() argument
8868 MLXSW_REG_ZERO(rigr2, payload); in mlxsw_reg_rigr2_pack()
8869 mlxsw_reg_rigr2_rigr_index_set(payload, rigr_index); in mlxsw_reg_rigr2_pack()
8870 mlxsw_reg_rigr2_vnext_set(payload, vnext); in mlxsw_reg_rigr2_pack()
8871 mlxsw_reg_rigr2_next_rigr_index_set(payload, next_rigr_index); in mlxsw_reg_rigr2_pack()
8872 mlxsw_reg_rigr2_vrmid_set(payload, 0); in mlxsw_reg_rigr2_pack()
8873 mlxsw_reg_rigr2_rmid_index_set(payload, 0); in mlxsw_reg_rigr2_pack()
8876 static inline void mlxsw_reg_rigr2_erif_entry_pack(char *payload, int index, in mlxsw_reg_rigr2_erif_entry_pack() argument
8879 mlxsw_reg_rigr2_erif_entry_v_set(payload, index, v); in mlxsw_reg_rigr2_erif_entry_pack()
8880 mlxsw_reg_rigr2_erif_entry_erif_set(payload, index, erif); in mlxsw_reg_rigr2_erif_entry_pack()
9010 static inline void mlxsw_reg_recr2_pack(char *payload, u32 seed) in mlxsw_reg_recr2_pack() argument
9012 MLXSW_REG_ZERO(recr2, payload); in mlxsw_reg_recr2_pack()
9013 mlxsw_reg_recr2_pp_set(payload, false); in mlxsw_reg_recr2_pack()
9014 mlxsw_reg_recr2_sh_set(payload, true); in mlxsw_reg_recr2_pack()
9015 mlxsw_reg_recr2_seed_set(payload, seed); in mlxsw_reg_recr2_pack()
9141 mlxsw_reg_rmft2_common_pack(char *payload, bool v, u16 offset, in mlxsw_reg_rmft2_common_pack() argument
9146 MLXSW_REG_ZERO(rmft2, payload); in mlxsw_reg_rmft2_common_pack()
9147 mlxsw_reg_rmft2_v_set(payload, v); in mlxsw_reg_rmft2_common_pack()
9148 mlxsw_reg_rmft2_op_set(payload, MLXSW_REG_RMFT2_OP_READ_WRITE); in mlxsw_reg_rmft2_common_pack()
9149 mlxsw_reg_rmft2_offset_set(payload, offset); in mlxsw_reg_rmft2_common_pack()
9150 mlxsw_reg_rmft2_virtual_router_set(payload, virtual_router); in mlxsw_reg_rmft2_common_pack()
9151 mlxsw_reg_rmft2_irif_mask_set(payload, irif_mask); in mlxsw_reg_rmft2_common_pack()
9152 mlxsw_reg_rmft2_irif_set(payload, irif); in mlxsw_reg_rmft2_common_pack()
9154 mlxsw_reg_rmft2_flexible_action_set_memcpy_to(payload, in mlxsw_reg_rmft2_common_pack()
9159 mlxsw_reg_rmft2_ipv4_pack(char *payload, bool v, u16 offset, u16 virtual_router, in mlxsw_reg_rmft2_ipv4_pack() argument
9164 mlxsw_reg_rmft2_common_pack(payload, v, offset, virtual_router, in mlxsw_reg_rmft2_ipv4_pack()
9166 mlxsw_reg_rmft2_type_set(payload, MLXSW_REG_RMFT2_TYPE_IPV4); in mlxsw_reg_rmft2_ipv4_pack()
9167 mlxsw_reg_rmft2_dip4_set(payload, dip4); in mlxsw_reg_rmft2_ipv4_pack()
9168 mlxsw_reg_rmft2_dip4_mask_set(payload, dip4_mask); in mlxsw_reg_rmft2_ipv4_pack()
9169 mlxsw_reg_rmft2_sip4_set(payload, sip4); in mlxsw_reg_rmft2_ipv4_pack()
9170 mlxsw_reg_rmft2_sip4_mask_set(payload, sip4_mask); in mlxsw_reg_rmft2_ipv4_pack()
9174 mlxsw_reg_rmft2_ipv6_pack(char *payload, bool v, u16 offset, u16 virtual_router, in mlxsw_reg_rmft2_ipv6_pack() argument
9180 mlxsw_reg_rmft2_common_pack(payload, v, offset, virtual_router, in mlxsw_reg_rmft2_ipv6_pack()
9182 mlxsw_reg_rmft2_type_set(payload, MLXSW_REG_RMFT2_TYPE_IPV6); in mlxsw_reg_rmft2_ipv6_pack()
9183 mlxsw_reg_rmft2_dip6_memcpy_to(payload, (void *)&dip6); in mlxsw_reg_rmft2_ipv6_pack()
9184 mlxsw_reg_rmft2_dip6_mask_memcpy_to(payload, (void *)&dip6_mask); in mlxsw_reg_rmft2_ipv6_pack()
9185 mlxsw_reg_rmft2_sip6_memcpy_to(payload, (void *)&sip6); in mlxsw_reg_rmft2_ipv6_pack()
9186 mlxsw_reg_rmft2_sip6_mask_memcpy_to(payload, (void *)&sip6_mask); in mlxsw_reg_rmft2_ipv6_pack()
9240 static inline void mlxsw_reg_reiv_pack(char *payload, u8 port_page, u16 erif) in mlxsw_reg_reiv_pack() argument
9242 MLXSW_REG_ZERO(reiv, payload); in mlxsw_reg_reiv_pack()
9243 mlxsw_reg_reiv_port_page_set(payload, port_page); in mlxsw_reg_reiv_pack()
9244 mlxsw_reg_reiv_erif_set(payload, erif); in mlxsw_reg_reiv_pack()
9290 mlxsw_reg_mfcr_pack(char *payload, in mlxsw_reg_mfcr_pack() argument
9293 MLXSW_REG_ZERO(mfcr, payload); in mlxsw_reg_mfcr_pack()
9294 mlxsw_reg_mfcr_pwm_frequency_set(payload, pwm_frequency); in mlxsw_reg_mfcr_pack()
9298 mlxsw_reg_mfcr_unpack(char *payload, in mlxsw_reg_mfcr_unpack() argument
9302 *p_pwm_frequency = mlxsw_reg_mfcr_pwm_frequency_get(payload); in mlxsw_reg_mfcr_unpack()
9303 *p_tacho_active = mlxsw_reg_mfcr_tacho_active_get(payload); in mlxsw_reg_mfcr_unpack()
9304 *p_pwm_active = mlxsw_reg_mfcr_pwm_active_get(payload); in mlxsw_reg_mfcr_unpack()
9329 static inline void mlxsw_reg_mfsc_pack(char *payload, u8 pwm, in mlxsw_reg_mfsc_pack() argument
9332 MLXSW_REG_ZERO(mfsc, payload); in mlxsw_reg_mfsc_pack()
9333 mlxsw_reg_mfsc_pwm_set(payload, pwm); in mlxsw_reg_mfsc_pack()
9334 mlxsw_reg_mfsc_pwm_duty_cycle_set(payload, pwm_duty_cycle); in mlxsw_reg_mfsc_pack()
9359 static inline void mlxsw_reg_mfsm_pack(char *payload, u8 tacho) in mlxsw_reg_mfsm_pack() argument
9361 MLXSW_REG_ZERO(mfsm, payload); in mlxsw_reg_mfsm_pack()
9362 mlxsw_reg_mfsm_tacho_set(payload, tacho); in mlxsw_reg_mfsm_pack()
9394 static inline void mlxsw_reg_mfsl_pack(char *payload, u8 tacho, in mlxsw_reg_mfsl_pack() argument
9397 MLXSW_REG_ZERO(mfsl, payload); in mlxsw_reg_mfsl_pack()
9398 mlxsw_reg_mfsl_tacho_set(payload, tacho); in mlxsw_reg_mfsl_pack()
9399 mlxsw_reg_mfsl_tach_min_set(payload, tach_min); in mlxsw_reg_mfsl_pack()
9400 mlxsw_reg_mfsl_tach_max_set(payload, tach_max); in mlxsw_reg_mfsl_pack()
9403 static inline void mlxsw_reg_mfsl_unpack(char *payload, u8 tacho, in mlxsw_reg_mfsl_unpack() argument
9407 *p_tach_min = mlxsw_reg_mfsl_tach_min_get(payload); in mlxsw_reg_mfsl_unpack()
9410 *p_tach_max = mlxsw_reg_mfsl_tach_max_get(payload); in mlxsw_reg_mfsl_unpack()
9431 static inline void mlxsw_reg_fore_unpack(char *payload, u8 tacho, in mlxsw_reg_fore_unpack() argument
9437 limit = mlxsw_reg_fore_fan_under_limit_get(payload); in mlxsw_reg_fore_unpack()
9565 static inline void mlxsw_reg_mtmp_pack(char *payload, u8 slot_index, in mlxsw_reg_mtmp_pack() argument
9569 MLXSW_REG_ZERO(mtmp, payload); in mlxsw_reg_mtmp_pack()
9570 mlxsw_reg_mtmp_slot_index_set(payload, slot_index); in mlxsw_reg_mtmp_pack()
9571 mlxsw_reg_mtmp_sensor_index_set(payload, sensor_index); in mlxsw_reg_mtmp_pack()
9572 mlxsw_reg_mtmp_mte_set(payload, max_temp_enable); in mlxsw_reg_mtmp_pack()
9573 mlxsw_reg_mtmp_mtr_set(payload, max_temp_reset); in mlxsw_reg_mtmp_pack()
9574 mlxsw_reg_mtmp_temperature_threshold_hi_set(payload, in mlxsw_reg_mtmp_pack()
9578 static inline void mlxsw_reg_mtmp_unpack(char *payload, int *p_temp, in mlxsw_reg_mtmp_unpack() argument
9586 temp = mlxsw_reg_mtmp_temperature_get(payload); in mlxsw_reg_mtmp_unpack()
9590 temp = mlxsw_reg_mtmp_max_temperature_get(payload); in mlxsw_reg_mtmp_unpack()
9594 temp = mlxsw_reg_mtmp_temperature_threshold_hi_get(payload); in mlxsw_reg_mtmp_unpack()
9598 temp = mlxsw_reg_mtmp_max_operational_temperature_get(payload); in mlxsw_reg_mtmp_unpack()
9602 mlxsw_reg_mtmp_sensor_name_memcpy_from(payload, sensor_name); in mlxsw_reg_mtmp_unpack()
9674 static inline void mlxsw_reg_mtbr_pack(char *payload, u8 slot_index, in mlxsw_reg_mtbr_pack() argument
9677 MLXSW_REG_ZERO(mtbr, payload); in mlxsw_reg_mtbr_pack()
9678 mlxsw_reg_mtbr_slot_index_set(payload, slot_index); in mlxsw_reg_mtbr_pack()
9679 mlxsw_reg_mtbr_base_sensor_index_set(payload, base_sensor_index); in mlxsw_reg_mtbr_pack()
9680 mlxsw_reg_mtbr_num_rec_set(payload, 1); in mlxsw_reg_mtbr_pack()
9694 static inline void mlxsw_reg_mtbr_temp_unpack(char *payload, int rec_ind, in mlxsw_reg_mtbr_temp_unpack() argument
9698 *p_temp = mlxsw_reg_mtbr_rec_temp_get(payload, rec_ind); in mlxsw_reg_mtbr_temp_unpack()
9700 *p_max_temp = mlxsw_reg_mtbr_rec_max_temp_get(payload, rec_ind); in mlxsw_reg_mtbr_temp_unpack()
9823 static inline void mlxsw_reg_mcia_pack(char *payload, u8 slot_index, u8 module, in mlxsw_reg_mcia_pack() argument
9827 MLXSW_REG_ZERO(mcia, payload); in mlxsw_reg_mcia_pack()
9828 mlxsw_reg_mcia_slot_set(payload, slot_index); in mlxsw_reg_mcia_pack()
9829 mlxsw_reg_mcia_module_set(payload, module); in mlxsw_reg_mcia_pack()
9830 mlxsw_reg_mcia_page_number_set(payload, page_number); in mlxsw_reg_mcia_pack()
9831 mlxsw_reg_mcia_device_address_set(payload, device_addr); in mlxsw_reg_mcia_pack()
9832 mlxsw_reg_mcia_size_set(payload, size); in mlxsw_reg_mcia_pack()
9833 mlxsw_reg_mcia_i2c_device_address_set(payload, i2c_device_addr); in mlxsw_reg_mcia_pack()
10005 static inline void mlxsw_reg_mpat_pack(char *payload, u8 pa_id, in mlxsw_reg_mpat_pack() argument
10009 MLXSW_REG_ZERO(mpat, payload); in mlxsw_reg_mpat_pack()
10010 mlxsw_reg_mpat_pa_id_set(payload, pa_id); in mlxsw_reg_mpat_pack()
10011 mlxsw_reg_mpat_system_port_set(payload, system_port); in mlxsw_reg_mpat_pack()
10012 mlxsw_reg_mpat_e_set(payload, e); in mlxsw_reg_mpat_pack()
10013 mlxsw_reg_mpat_qos_set(payload, 1); in mlxsw_reg_mpat_pack()
10014 mlxsw_reg_mpat_be_set(payload, 1); in mlxsw_reg_mpat_pack()
10015 mlxsw_reg_mpat_span_type_set(payload, span_type); in mlxsw_reg_mpat_pack()
10018 static inline void mlxsw_reg_mpat_eth_rspan_pack(char *payload, u16 vid) in mlxsw_reg_mpat_eth_rspan_pack() argument
10020 mlxsw_reg_mpat_eth_rspan_vid_set(payload, vid); in mlxsw_reg_mpat_eth_rspan_pack()
10024 mlxsw_reg_mpat_eth_rspan_l2_pack(char *payload, in mlxsw_reg_mpat_eth_rspan_l2_pack() argument
10029 mlxsw_reg_mpat_eth_rspan_version_set(payload, version); in mlxsw_reg_mpat_eth_rspan_l2_pack()
10030 mlxsw_reg_mpat_eth_rspan_mac_memcpy_to(payload, mac); in mlxsw_reg_mpat_eth_rspan_l2_pack()
10031 mlxsw_reg_mpat_eth_rspan_tp_set(payload, tp); in mlxsw_reg_mpat_eth_rspan_l2_pack()
10035 mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack(char *payload, u8 ttl, in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack() argument
10039 mlxsw_reg_mpat_eth_rspan_ttl_set(payload, ttl); in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
10040 mlxsw_reg_mpat_eth_rspan_smac_memcpy_to(payload, smac); in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
10041 mlxsw_reg_mpat_eth_rspan_protocol_set(payload, in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
10043 mlxsw_reg_mpat_eth_rspan_sip4_set(payload, sip); in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
10044 mlxsw_reg_mpat_eth_rspan_dip4_set(payload, dip); in mlxsw_reg_mpat_eth_rspan_l3_ipv4_pack()
10048 mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack(char *payload, u8 ttl, in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack() argument
10052 mlxsw_reg_mpat_eth_rspan_ttl_set(payload, ttl); in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
10053 mlxsw_reg_mpat_eth_rspan_smac_memcpy_to(payload, smac); in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
10054 mlxsw_reg_mpat_eth_rspan_protocol_set(payload, in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
10056 mlxsw_reg_mpat_eth_rspan_sip6_memcpy_to(payload, (void *)&sip); in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
10057 mlxsw_reg_mpat_eth_rspan_dip6_memcpy_to(payload, (void *)&dip); in mlxsw_reg_mpat_eth_rspan_l3_ipv6_pack()
10111 static inline void mlxsw_reg_mpar_pack(char *payload, u16 local_port, in mlxsw_reg_mpar_pack() argument
10116 MLXSW_REG_ZERO(mpar, payload); in mlxsw_reg_mpar_pack()
10117 mlxsw_reg_mpar_local_port_set(payload, local_port); in mlxsw_reg_mpar_pack()
10118 mlxsw_reg_mpar_enable_set(payload, enable); in mlxsw_reg_mpar_pack()
10119 mlxsw_reg_mpar_i_e_set(payload, i_e); in mlxsw_reg_mpar_pack()
10120 mlxsw_reg_mpar_pa_id_set(payload, pa_id); in mlxsw_reg_mpar_pack()
10121 mlxsw_reg_mpar_probability_rate_set(payload, probability_rate); in mlxsw_reg_mpar_pack()
10174 static inline void mlxsw_reg_mgir_pack(char *payload) in mlxsw_reg_mgir_pack() argument
10176 MLXSW_REG_ZERO(mgir, payload); in mlxsw_reg_mgir_pack()
10180 mlxsw_reg_mgir_unpack(char *payload, u32 *hw_rev, char *fw_info_psid, in mlxsw_reg_mgir_unpack() argument
10183 *hw_rev = mlxsw_reg_mgir_hw_info_device_hw_revision_get(payload); in mlxsw_reg_mgir_unpack()
10184 mlxsw_reg_mgir_fw_info_psid_memcpy_from(payload, fw_info_psid); in mlxsw_reg_mgir_unpack()
10185 *fw_major = mlxsw_reg_mgir_fw_info_extended_major_get(payload); in mlxsw_reg_mgir_unpack()
10186 *fw_minor = mlxsw_reg_mgir_fw_info_extended_minor_get(payload); in mlxsw_reg_mgir_unpack()
10187 *fw_sub_minor = mlxsw_reg_mgir_fw_info_extended_sub_minor_get(payload); in mlxsw_reg_mgir_unpack()
10217 static inline void mlxsw_reg_mrsr_pack(char *payload, in mlxsw_reg_mrsr_pack() argument
10220 MLXSW_REG_ZERO(mrsr, payload); in mlxsw_reg_mrsr_pack()
10221 mlxsw_reg_mrsr_command_set(payload, command); in mlxsw_reg_mrsr_pack()
10256 static inline void mlxsw_reg_mlcr_pack(char *payload, u16 local_port, in mlxsw_reg_mlcr_pack() argument
10259 MLXSW_REG_ZERO(mlcr, payload); in mlxsw_reg_mlcr_pack()
10260 mlxsw_reg_mlcr_local_port_set(payload, local_port); in mlxsw_reg_mlcr_pack()
10261 mlxsw_reg_mlcr_beacon_duration_set(payload, active ? in mlxsw_reg_mlcr_pack()
10298 static inline void mlxsw_reg_mcion_pack(char *payload, u8 slot_index, u8 module) in mlxsw_reg_mcion_pack() argument
10300 MLXSW_REG_ZERO(mcion, payload); in mlxsw_reg_mcion_pack()
10301 mlxsw_reg_mcion_slot_index_set(payload, slot_index); in mlxsw_reg_mcion_pack()
10302 mlxsw_reg_mcion_module_set(payload, module); in mlxsw_reg_mcion_pack()
10352 mlxsw_reg_mtpps_vpin_pack(char *payload, u64 time_stamp) in mlxsw_reg_mtpps_vpin_pack() argument
10354 MLXSW_REG_ZERO(mtpps, payload); in mlxsw_reg_mtpps_vpin_pack()
10355 mlxsw_reg_mtpps_pin_set(payload, MLXSW_REG_MTPPS_PIN_SP_VIRTUAL_PIN); in mlxsw_reg_mtpps_vpin_pack()
10356 mlxsw_reg_mtpps_pin_mode_set(payload, in mlxsw_reg_mtpps_vpin_pack()
10358 mlxsw_reg_mtpps_enable_set(payload, true); in mlxsw_reg_mtpps_vpin_pack()
10359 mlxsw_reg_mtpps_time_stamp_set(payload, time_stamp); in mlxsw_reg_mtpps_vpin_pack()
10422 mlxsw_reg_mtutc_pack(char *payload, enum mlxsw_reg_mtutc_operation oper, in mlxsw_reg_mtutc_pack() argument
10425 MLXSW_REG_ZERO(mtutc, payload); in mlxsw_reg_mtutc_pack()
10426 mlxsw_reg_mtutc_operation_set(payload, oper); in mlxsw_reg_mtutc_pack()
10427 mlxsw_reg_mtutc_freq_adjustment_set(payload, freq_adj); in mlxsw_reg_mtutc_pack()
10428 mlxsw_reg_mtutc_utc_sec_set(payload, utc_sec); in mlxsw_reg_mtutc_pack()
10429 mlxsw_reg_mtutc_utc_nsec_set(payload, utc_nsec); in mlxsw_reg_mtutc_pack()
10430 mlxsw_reg_mtutc_time_adjustment_set(payload, time_adj); in mlxsw_reg_mtutc_pack()
10493 static inline void mlxsw_reg_mcqi_pack(char *payload, u16 component_index) in mlxsw_reg_mcqi_pack() argument
10495 MLXSW_REG_ZERO(mcqi, payload); in mlxsw_reg_mcqi_pack()
10496 mlxsw_reg_mcqi_component_index_set(payload, component_index); in mlxsw_reg_mcqi_pack()
10497 mlxsw_reg_mcqi_info_type_set(payload, in mlxsw_reg_mcqi_pack()
10499 mlxsw_reg_mcqi_offset_set(payload, 0); in mlxsw_reg_mcqi_pack()
10500 mlxsw_reg_mcqi_data_size_set(payload, MLXSW_REG_MCQI_CAP_LEN); in mlxsw_reg_mcqi_pack()
10503 static inline void mlxsw_reg_mcqi_unpack(char *payload, in mlxsw_reg_mcqi_unpack() argument
10509 mlxsw_reg_mcqi_cap_max_component_size_get(payload); in mlxsw_reg_mcqi_unpack()
10511 mlxsw_reg_mcqi_cap_log_mcda_word_size_get(payload); in mlxsw_reg_mcqi_unpack()
10513 mlxsw_reg_mcqi_cap_mcda_max_write_size_get(payload); in mlxsw_reg_mcqi_unpack()
10575 static inline void mlxsw_reg_mcc_pack(char *payload, in mlxsw_reg_mcc_pack() argument
10580 MLXSW_REG_ZERO(mcc, payload); in mlxsw_reg_mcc_pack()
10581 mlxsw_reg_mcc_instruction_set(payload, instr); in mlxsw_reg_mcc_pack()
10582 mlxsw_reg_mcc_component_index_set(payload, component_index); in mlxsw_reg_mcc_pack()
10583 mlxsw_reg_mcc_update_handle_set(payload, update_handle); in mlxsw_reg_mcc_pack()
10584 mlxsw_reg_mcc_component_size_set(payload, component_size); in mlxsw_reg_mcc_pack()
10587 static inline void mlxsw_reg_mcc_unpack(char *payload, u32 *p_update_handle, in mlxsw_reg_mcc_unpack() argument
10591 *p_update_handle = mlxsw_reg_mcc_update_handle_get(payload); in mlxsw_reg_mcc_unpack()
10593 *p_error_code = mlxsw_reg_mcc_error_code_get(payload); in mlxsw_reg_mcc_unpack()
10595 *p_control_state = mlxsw_reg_mcc_control_state_get(payload); in mlxsw_reg_mcc_unpack()
10635 static inline void mlxsw_reg_mcda_pack(char *payload, u32 update_handle, in mlxsw_reg_mcda_pack() argument
10640 MLXSW_REG_ZERO(mcda, payload); in mlxsw_reg_mcda_pack()
10641 mlxsw_reg_mcda_update_handle_set(payload, update_handle); in mlxsw_reg_mcda_pack()
10642 mlxsw_reg_mcda_offset_set(payload, offset); in mlxsw_reg_mcda_pack()
10643 mlxsw_reg_mcda_size_set(payload, size); in mlxsw_reg_mcda_pack()
10646 mlxsw_reg_mcda_data_set(payload, i, *(u32 *) &data[i * 4]); in mlxsw_reg_mcda_pack()
10702 mlxsw_reg_mcam_pack(char *payload, enum mlxsw_reg_mcam_feature_group feat_group) in mlxsw_reg_mcam_pack() argument
10704 MLXSW_REG_ZERO(mcam, payload); in mlxsw_reg_mcam_pack()
10705 mlxsw_reg_mcam_feature_group_set(payload, feat_group); in mlxsw_reg_mcam_pack()
10709 mlxsw_reg_mcam_unpack(char *payload, in mlxsw_reg_mcam_unpack() argument
10723 *p_mng_feature_cap_val = getters[dword](payload, offset); in mlxsw_reg_mcam_unpack()
10757 static inline void mlxsw_reg_mpsc_pack(char *payload, u16 local_port, bool e, in mlxsw_reg_mpsc_pack() argument
10760 MLXSW_REG_ZERO(mpsc, payload); in mlxsw_reg_mpsc_pack()
10761 mlxsw_reg_mpsc_local_port_set(payload, local_port); in mlxsw_reg_mpsc_pack()
10762 mlxsw_reg_mpsc_e_set(payload, e); in mlxsw_reg_mpsc_pack()
10763 mlxsw_reg_mpsc_rate_set(payload, rate); in mlxsw_reg_mpsc_pack()
10811 static inline void mlxsw_reg_mgpc_pack(char *payload, u32 counter_index, in mlxsw_reg_mgpc_pack() argument
10815 MLXSW_REG_ZERO(mgpc, payload); in mlxsw_reg_mgpc_pack()
10816 mlxsw_reg_mgpc_counter_index_set(payload, counter_index); in mlxsw_reg_mgpc_pack()
10817 mlxsw_reg_mgpc_counter_set_type_set(payload, set_type); in mlxsw_reg_mgpc_pack()
10818 mlxsw_reg_mgpc_opcode_set(payload, opcode); in mlxsw_reg_mgpc_pack()
10855 static inline void mlxsw_reg_mprs_pack(char *payload, u16 parsing_depth, in mlxsw_reg_mprs_pack() argument
10858 MLXSW_REG_ZERO(mprs, payload); in mlxsw_reg_mprs_pack()
10859 mlxsw_reg_mprs_parsing_depth_set(payload, parsing_depth); in mlxsw_reg_mprs_pack()
10860 mlxsw_reg_mprs_parsing_en_set(payload, true); in mlxsw_reg_mprs_pack()
10861 mlxsw_reg_mprs_vxlan_udp_dport_set(payload, vxlan_udp_dport); in mlxsw_reg_mprs_pack()
10941 static inline void mlxsw_reg_mpagr_pack(char *payload, in mlxsw_reg_mpagr_pack() argument
10945 MLXSW_REG_ZERO(mpagr, payload); in mlxsw_reg_mpagr_pack()
10946 mlxsw_reg_mpagr_trigger_set(payload, trigger); in mlxsw_reg_mpagr_pack()
10947 mlxsw_reg_mpagr_pa_id_set(payload, pa_id); in mlxsw_reg_mpagr_pack()
10948 mlxsw_reg_mpagr_probability_rate_set(payload, probability_rate); in mlxsw_reg_mpagr_pack()
10992 static inline void mlxsw_reg_momte_pack(char *payload, u16 local_port, in mlxsw_reg_momte_pack() argument
10995 MLXSW_REG_ZERO(momte, payload); in mlxsw_reg_momte_pack()
10996 mlxsw_reg_momte_local_port_set(payload, local_port); in mlxsw_reg_momte_pack()
10997 mlxsw_reg_momte_type_set(payload, type); in mlxsw_reg_momte_pack()
11030 static inline void mlxsw_reg_mtpppc_pack(char *payload, u16 ing, u16 egr) in mlxsw_reg_mtpppc_pack() argument
11032 MLXSW_REG_ZERO(mtpppc, payload); in mlxsw_reg_mtpppc_pack()
11033 mlxsw_reg_mtpppc_ing_timestamp_message_type_set(payload, ing); in mlxsw_reg_mtpppc_pack()
11034 mlxsw_reg_mtpppc_egr_timestamp_message_type_set(payload, egr); in mlxsw_reg_mtpppc_pack()
11129 static inline void mlxsw_reg_mtpptr_unpack(const char *payload, in mlxsw_reg_mtpptr_unpack() argument
11138 *p_message_type = mlxsw_reg_mtpptr_rec_message_type_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
11139 *p_domain_number = mlxsw_reg_mtpptr_rec_domain_number_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
11140 *p_sequence_id = mlxsw_reg_mtpptr_rec_sequence_id_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
11141 timestamp_high = mlxsw_reg_mtpptr_rec_timestamp_high_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
11142 timestamp_low = mlxsw_reg_mtpptr_rec_timestamp_low_get(payload, rec); in mlxsw_reg_mtpptr_unpack()
11175 static inline void mlxsw_reg_mtptpt_pack(char *payload, in mlxsw_reg_mtptpt_pack() argument
11179 MLXSW_REG_ZERO(mtptpt, payload); in mlxsw_reg_mtptpt_pack()
11180 mlxsw_reg_mtptpt_trap_id_set(payload, trap_id); in mlxsw_reg_mtptpt_pack()
11181 mlxsw_reg_mtptpt_message_type_set(payload, message_type); in mlxsw_reg_mtptpt_pack()
11233 static inline void mlxsw_reg_mtpcpc_pack(char *payload, bool pport, in mlxsw_reg_mtpcpc_pack() argument
11237 MLXSW_REG_ZERO(mtpcpc, payload); in mlxsw_reg_mtpcpc_pack()
11238 mlxsw_reg_mtpcpc_pport_set(payload, pport); in mlxsw_reg_mtpcpc_pack()
11239 mlxsw_reg_mtpcpc_local_port_set(payload, pport ? local_port : 0); in mlxsw_reg_mtpcpc_pack()
11240 mlxsw_reg_mtpcpc_ptp_trap_en_set(payload, ptp_trap_en); in mlxsw_reg_mtpcpc_pack()
11241 mlxsw_reg_mtpcpc_ing_correction_message_type_set(payload, ing); in mlxsw_reg_mtpcpc_pack()
11242 mlxsw_reg_mtpcpc_egr_correction_message_type_set(payload, egr); in mlxsw_reg_mtpcpc_pack()
11321 static inline void mlxsw_reg_mgpir_pack(char *payload, u8 slot_index) in mlxsw_reg_mgpir_pack() argument
11323 MLXSW_REG_ZERO(mgpir, payload); in mlxsw_reg_mgpir_pack()
11324 mlxsw_reg_mgpir_slot_index_set(payload, slot_index); in mlxsw_reg_mgpir_pack()
11328 mlxsw_reg_mgpir_unpack(char *payload, u8 *num_of_devices, in mlxsw_reg_mgpir_unpack() argument
11334 *num_of_devices = mlxsw_reg_mgpir_num_of_devices_get(payload); in mlxsw_reg_mgpir_unpack()
11336 *device_type = mlxsw_reg_mgpir_device_type_get(payload); in mlxsw_reg_mgpir_unpack()
11339 mlxsw_reg_mgpir_devices_per_flash_get(payload); in mlxsw_reg_mgpir_unpack()
11341 *num_of_modules = mlxsw_reg_mgpir_num_of_modules_get(payload); in mlxsw_reg_mgpir_unpack()
11343 *num_of_slots = mlxsw_reg_mgpir_num_of_slots_get(payload); in mlxsw_reg_mgpir_unpack()
11435 static inline void mlxsw_reg_mbct_pack(char *payload, u8 slot_index, in mlxsw_reg_mbct_pack() argument
11438 MLXSW_REG_ZERO(mbct, payload); in mlxsw_reg_mbct_pack()
11439 mlxsw_reg_mbct_slot_index_set(payload, slot_index); in mlxsw_reg_mbct_pack()
11440 mlxsw_reg_mbct_op_set(payload, op); in mlxsw_reg_mbct_pack()
11441 mlxsw_reg_mbct_oee_set(payload, oee); in mlxsw_reg_mbct_pack()
11444 static inline void mlxsw_reg_mbct_dt_pack(char *payload, in mlxsw_reg_mbct_dt_pack() argument
11450 mlxsw_reg_mbct_data_size_set(payload, data_size); in mlxsw_reg_mbct_dt_pack()
11451 mlxsw_reg_mbct_last_set(payload, last); in mlxsw_reg_mbct_dt_pack()
11452 mlxsw_reg_mbct_data_memcpy_to(payload, data); in mlxsw_reg_mbct_dt_pack()
11456 mlxsw_reg_mbct_unpack(const char *payload, u8 *p_slot_index, in mlxsw_reg_mbct_unpack() argument
11461 *p_slot_index = mlxsw_reg_mbct_slot_index_get(payload); in mlxsw_reg_mbct_unpack()
11462 *p_status = mlxsw_reg_mbct_status_get(payload); in mlxsw_reg_mbct_unpack()
11464 *p_fsm_state = mlxsw_reg_mbct_fsm_state_get(payload); in mlxsw_reg_mbct_unpack()
11529 static inline char *mlxsw_reg_mddt_inner_payload(char *payload) in mlxsw_reg_mddt_inner_payload() argument
11531 return payload + MLXSW_REG_MDDT_PAYLOAD_OFFSET + in mlxsw_reg_mddt_inner_payload()
11535 static inline void mlxsw_reg_mddt_pack(char *payload, u8 slot_index, in mlxsw_reg_mddt_pack() argument
11546 MLXSW_REG_ZERO(mddt, payload); in mlxsw_reg_mddt_pack()
11547 mlxsw_reg_mddt_slot_index_set(payload, slot_index); in mlxsw_reg_mddt_pack()
11548 mlxsw_reg_mddt_device_index_set(payload, device_index); in mlxsw_reg_mddt_pack()
11549 mlxsw_reg_mddt_method_set(payload, method); in mlxsw_reg_mddt_pack()
11550 mlxsw_reg_mddt_register_id_set(payload, reg->id); in mlxsw_reg_mddt_pack()
11551 mlxsw_reg_mddt_read_size_set(payload, len / 4); in mlxsw_reg_mddt_pack()
11552 mlxsw_reg_mddt_write_size_set(payload, len / 4); in mlxsw_reg_mddt_pack()
11553 *inner_payload = mlxsw_reg_mddt_inner_payload(payload); in mlxsw_reg_mddt_pack()
11669 __mlxsw_reg_mddq_pack(char *payload, u8 slot_index, in __mlxsw_reg_mddq_pack() argument
11672 MLXSW_REG_ZERO(mddq, payload); in __mlxsw_reg_mddq_pack()
11673 mlxsw_reg_mddq_slot_index_set(payload, slot_index); in __mlxsw_reg_mddq_pack()
11674 mlxsw_reg_mddq_query_type_set(payload, query_type); in __mlxsw_reg_mddq_pack()
11678 mlxsw_reg_mddq_slot_info_pack(char *payload, u8 slot_index, bool sie) in mlxsw_reg_mddq_slot_info_pack() argument
11680 __mlxsw_reg_mddq_pack(payload, slot_index, in mlxsw_reg_mddq_slot_info_pack()
11682 mlxsw_reg_mddq_sie_set(payload, sie); in mlxsw_reg_mddq_slot_info_pack()
11686 mlxsw_reg_mddq_slot_info_unpack(const char *payload, u8 *p_slot_index, in mlxsw_reg_mddq_slot_info_unpack() argument
11693 *p_slot_index = mlxsw_reg_mddq_slot_index_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11694 *p_provisioned = mlxsw_reg_mddq_slot_info_provisioned_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11695 *p_sr_valid = mlxsw_reg_mddq_slot_info_sr_valid_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11696 *p_lc_ready = mlxsw_reg_mddq_slot_info_lc_ready_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11697 *p_active = mlxsw_reg_mddq_slot_info_active_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11698 *p_hw_revision = mlxsw_reg_mddq_slot_info_hw_revision_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11699 *p_ini_file_version = mlxsw_reg_mddq_slot_info_ini_file_version_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11700 *p_card_type = mlxsw_reg_mddq_slot_info_card_type_get(payload); in mlxsw_reg_mddq_slot_info_unpack()
11735 mlxsw_reg_mddq_device_info_pack(char *payload, u8 slot_index, in mlxsw_reg_mddq_device_info_pack() argument
11738 __mlxsw_reg_mddq_pack(payload, slot_index, in mlxsw_reg_mddq_device_info_pack()
11740 mlxsw_reg_mddq_request_msg_seq_set(payload, request_msg_seq); in mlxsw_reg_mddq_device_info_pack()
11744 mlxsw_reg_mddq_device_info_unpack(const char *payload, u8 *p_response_msg_seq, in mlxsw_reg_mddq_device_info_unpack() argument
11749 *p_response_msg_seq = mlxsw_reg_mddq_response_msg_seq_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11750 *p_data_valid = mlxsw_reg_mddq_data_valid_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11751 *p_flash_owner = mlxsw_reg_mddq_device_info_flash_owner_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11752 *p_device_index = mlxsw_reg_mddq_device_info_device_index_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11753 *p_fw_major = mlxsw_reg_mddq_device_info_fw_major_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11754 *p_fw_minor = mlxsw_reg_mddq_device_info_fw_minor_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11755 *p_fw_sub_minor = mlxsw_reg_mddq_device_info_fw_sub_minor_get(payload); in mlxsw_reg_mddq_device_info_unpack()
11768 mlxsw_reg_mddq_slot_name_pack(char *payload, u8 slot_index) in mlxsw_reg_mddq_slot_name_pack() argument
11770 __mlxsw_reg_mddq_pack(payload, slot_index, in mlxsw_reg_mddq_slot_name_pack()
11775 mlxsw_reg_mddq_slot_name_unpack(const char *payload, char *slot_ascii_name) in mlxsw_reg_mddq_slot_name_unpack() argument
11777 mlxsw_reg_mddq_slot_ascii_name_memcpy_from(payload, slot_ascii_name); in mlxsw_reg_mddq_slot_name_unpack()
11807 static inline void mlxsw_reg_mddc_pack(char *payload, u8 slot_index, bool rst, in mlxsw_reg_mddc_pack() argument
11810 MLXSW_REG_ZERO(mddc, payload); in mlxsw_reg_mddc_pack()
11811 mlxsw_reg_mddc_slot_index_set(payload, slot_index); in mlxsw_reg_mddc_pack()
11812 mlxsw_reg_mddc_rst_set(payload, rst); in mlxsw_reg_mddc_pack()
11813 mlxsw_reg_mddc_device_enable_set(payload, device_enable); in mlxsw_reg_mddc_pack()
12167 static inline void mlxsw_reg_tngcr_pack(char *payload, in mlxsw_reg_tngcr_pack() argument
12171 MLXSW_REG_ZERO(tngcr, payload); in mlxsw_reg_tngcr_pack()
12172 mlxsw_reg_tngcr_type_set(payload, type); in mlxsw_reg_tngcr_pack()
12173 mlxsw_reg_tngcr_nve_valid_set(payload, valid); in mlxsw_reg_tngcr_pack()
12174 mlxsw_reg_tngcr_nve_ttl_uc_set(payload, ttl); in mlxsw_reg_tngcr_pack()
12175 mlxsw_reg_tngcr_nve_ttl_mc_set(payload, ttl); in mlxsw_reg_tngcr_pack()
12176 mlxsw_reg_tngcr_nve_flc_set(payload, MLXSW_REG_TNGCR_FL_NO_COPY); in mlxsw_reg_tngcr_pack()
12177 mlxsw_reg_tngcr_nve_flh_set(payload, 0); in mlxsw_reg_tngcr_pack()
12178 mlxsw_reg_tngcr_nve_udp_sport_type_set(payload, in mlxsw_reg_tngcr_pack()
12180 mlxsw_reg_tngcr_nve_udp_sport_prefix_set(payload, 0); in mlxsw_reg_tngcr_pack()
12181 mlxsw_reg_tngcr_nve_group_size_mc_set(payload, 1); in mlxsw_reg_tngcr_pack()
12182 mlxsw_reg_tngcr_nve_group_size_flood_set(payload, 1); in mlxsw_reg_tngcr_pack()
12252 static inline void mlxsw_reg_tnumt_pack(char *payload, in mlxsw_reg_tnumt_pack() argument
12259 MLXSW_REG_ZERO(tnumt, payload); in mlxsw_reg_tnumt_pack()
12260 mlxsw_reg_tnumt_record_type_set(payload, type); in mlxsw_reg_tnumt_pack()
12261 mlxsw_reg_tnumt_tunnel_port_set(payload, tport); in mlxsw_reg_tnumt_pack()
12262 mlxsw_reg_tnumt_underlay_mc_ptr_set(payload, underlay_mc_ptr); in mlxsw_reg_tnumt_pack()
12263 mlxsw_reg_tnumt_vnext_set(payload, vnext); in mlxsw_reg_tnumt_pack()
12264 mlxsw_reg_tnumt_next_underlay_mc_ptr_set(payload, next_underlay_mc_ptr); in mlxsw_reg_tnumt_pack()
12265 mlxsw_reg_tnumt_record_size_set(payload, record_size); in mlxsw_reg_tnumt_pack()
12287 static inline void mlxsw_reg_tnqcr_pack(char *payload) in mlxsw_reg_tnqcr_pack() argument
12289 MLXSW_REG_ZERO(tnqcr, payload); in mlxsw_reg_tnqcr_pack()
12290 mlxsw_reg_tnqcr_enc_set_dscp_set(payload, 0); in mlxsw_reg_tnqcr_pack()
12315 static inline void mlxsw_reg_tnqdr_pack(char *payload, u16 local_port) in mlxsw_reg_tnqdr_pack() argument
12317 MLXSW_REG_ZERO(tnqdr, payload); in mlxsw_reg_tnqdr_pack()
12318 mlxsw_reg_tnqdr_local_port_set(payload, local_port); in mlxsw_reg_tnqdr_pack()
12319 mlxsw_reg_tnqdr_dscp_set(payload, 0); in mlxsw_reg_tnqdr_pack()
12344 static inline void mlxsw_reg_tneem_pack(char *payload, u8 overlay_ecn, in mlxsw_reg_tneem_pack() argument
12347 MLXSW_REG_ZERO(tneem, payload); in mlxsw_reg_tneem_pack()
12348 mlxsw_reg_tneem_overlay_ecn_set(payload, overlay_ecn); in mlxsw_reg_tneem_pack()
12349 mlxsw_reg_tneem_underlay_ecn_set(payload, underlay_ecn); in mlxsw_reg_tneem_pack()
12396 static inline void mlxsw_reg_tndem_pack(char *payload, u8 underlay_ecn, in mlxsw_reg_tndem_pack() argument
12400 MLXSW_REG_ZERO(tndem, payload); in mlxsw_reg_tndem_pack()
12401 mlxsw_reg_tndem_underlay_ecn_set(payload, underlay_ecn); in mlxsw_reg_tndem_pack()
12402 mlxsw_reg_tndem_overlay_ecn_set(payload, overlay_ecn); in mlxsw_reg_tndem_pack()
12403 mlxsw_reg_tndem_eip_ecn_set(payload, ecn); in mlxsw_reg_tndem_pack()
12404 mlxsw_reg_tndem_trap_en_set(payload, trap_en); in mlxsw_reg_tndem_pack()
12405 mlxsw_reg_tndem_trap_id_set(payload, trap_id); in mlxsw_reg_tndem_pack()
12436 static inline void mlxsw_reg_tnpc_pack(char *payload, in mlxsw_reg_tnpc_pack() argument
12440 MLXSW_REG_ZERO(tnpc, payload); in mlxsw_reg_tnpc_pack()
12441 mlxsw_reg_tnpc_tunnel_port_set(payload, tport); in mlxsw_reg_tnpc_pack()
12442 mlxsw_reg_tnpc_learn_enable_v4_set(payload, learn_enable); in mlxsw_reg_tnpc_pack()
12443 mlxsw_reg_tnpc_learn_enable_v6_set(payload, learn_enable); in mlxsw_reg_tnpc_pack()
12469 static inline void mlxsw_reg_tigcr_pack(char *payload, bool ttlc, u8 ttl_uc) in mlxsw_reg_tigcr_pack() argument
12471 MLXSW_REG_ZERO(tigcr, payload); in mlxsw_reg_tigcr_pack()
12472 mlxsw_reg_tigcr_ttlc_set(payload, ttlc); in mlxsw_reg_tigcr_pack()
12473 mlxsw_reg_tigcr_ttl_uc_set(payload, ttl_uc); in mlxsw_reg_tigcr_pack()
12498 static inline void mlxsw_reg_tieem_pack(char *payload, u8 overlay_ecn, in mlxsw_reg_tieem_pack() argument
12501 MLXSW_REG_ZERO(tieem, payload); in mlxsw_reg_tieem_pack()
12502 mlxsw_reg_tieem_overlay_ecn_set(payload, overlay_ecn); in mlxsw_reg_tieem_pack()
12503 mlxsw_reg_tieem_underlay_ecn_set(payload, underlay_ecn); in mlxsw_reg_tieem_pack()
12550 static inline void mlxsw_reg_tidem_pack(char *payload, u8 underlay_ecn, in mlxsw_reg_tidem_pack() argument
12554 MLXSW_REG_ZERO(tidem, payload); in mlxsw_reg_tidem_pack()
12555 mlxsw_reg_tidem_underlay_ecn_set(payload, underlay_ecn); in mlxsw_reg_tidem_pack()
12556 mlxsw_reg_tidem_overlay_ecn_set(payload, overlay_ecn); in mlxsw_reg_tidem_pack()
12557 mlxsw_reg_tidem_eip_ecn_set(payload, eip_ecn); in mlxsw_reg_tidem_pack()
12558 mlxsw_reg_tidem_trap_en_set(payload, trap_en); in mlxsw_reg_tidem_pack()
12559 mlxsw_reg_tidem_trap_id_set(payload, trap_id); in mlxsw_reg_tidem_pack()
12619 static inline void mlxsw_reg_sbpr_pack(char *payload, u8 pool, in mlxsw_reg_sbpr_pack() argument
12624 MLXSW_REG_ZERO(sbpr, payload); in mlxsw_reg_sbpr_pack()
12625 mlxsw_reg_sbpr_pool_set(payload, pool); in mlxsw_reg_sbpr_pack()
12626 mlxsw_reg_sbpr_dir_set(payload, dir); in mlxsw_reg_sbpr_pack()
12627 mlxsw_reg_sbpr_mode_set(payload, mode); in mlxsw_reg_sbpr_pack()
12628 mlxsw_reg_sbpr_size_set(payload, size); in mlxsw_reg_sbpr_pack()
12629 mlxsw_reg_sbpr_infi_size_set(payload, infi_size); in mlxsw_reg_sbpr_pack()
12703 static inline void mlxsw_reg_sbcm_pack(char *payload, u16 local_port, u8 pg_buff, in mlxsw_reg_sbcm_pack() argument
12708 MLXSW_REG_ZERO(sbcm, payload); in mlxsw_reg_sbcm_pack()
12709 mlxsw_reg_sbcm_local_port_set(payload, local_port); in mlxsw_reg_sbcm_pack()
12710 mlxsw_reg_sbcm_pg_buff_set(payload, pg_buff); in mlxsw_reg_sbcm_pack()
12711 mlxsw_reg_sbcm_dir_set(payload, dir); in mlxsw_reg_sbcm_pack()
12712 mlxsw_reg_sbcm_min_buff_set(payload, min_buff); in mlxsw_reg_sbcm_pack()
12713 mlxsw_reg_sbcm_max_buff_set(payload, max_buff); in mlxsw_reg_sbcm_pack()
12714 mlxsw_reg_sbcm_infi_max_set(payload, infi_max); in mlxsw_reg_sbcm_pack()
12715 mlxsw_reg_sbcm_pool_set(payload, pool); in mlxsw_reg_sbcm_pack()
12789 static inline void mlxsw_reg_sbpm_pack(char *payload, u16 local_port, u8 pool, in mlxsw_reg_sbpm_pack() argument
12793 MLXSW_REG_ZERO(sbpm, payload); in mlxsw_reg_sbpm_pack()
12794 mlxsw_reg_sbpm_local_port_set(payload, local_port); in mlxsw_reg_sbpm_pack()
12795 mlxsw_reg_sbpm_pool_set(payload, pool); in mlxsw_reg_sbpm_pack()
12796 mlxsw_reg_sbpm_dir_set(payload, dir); in mlxsw_reg_sbpm_pack()
12797 mlxsw_reg_sbpm_clr_set(payload, clr); in mlxsw_reg_sbpm_pack()
12798 mlxsw_reg_sbpm_min_buff_set(payload, min_buff); in mlxsw_reg_sbpm_pack()
12799 mlxsw_reg_sbpm_max_buff_set(payload, max_buff); in mlxsw_reg_sbpm_pack()
12802 static inline void mlxsw_reg_sbpm_unpack(char *payload, u32 *p_buff_occupancy, in mlxsw_reg_sbpm_unpack() argument
12805 *p_buff_occupancy = mlxsw_reg_sbpm_buff_occupancy_get(payload); in mlxsw_reg_sbpm_unpack()
12806 *p_max_buff_occupancy = mlxsw_reg_sbpm_max_buff_occupancy_get(payload); in mlxsw_reg_sbpm_unpack()
12851 static inline void mlxsw_reg_sbmm_pack(char *payload, u8 prio, u32 min_buff, in mlxsw_reg_sbmm_pack() argument
12854 MLXSW_REG_ZERO(sbmm, payload); in mlxsw_reg_sbmm_pack()
12855 mlxsw_reg_sbmm_prio_set(payload, prio); in mlxsw_reg_sbmm_pack()
12856 mlxsw_reg_sbmm_min_buff_set(payload, min_buff); in mlxsw_reg_sbmm_pack()
12857 mlxsw_reg_sbmm_max_buff_set(payload, max_buff); in mlxsw_reg_sbmm_pack()
12858 mlxsw_reg_sbmm_pool_set(payload, pool); in mlxsw_reg_sbmm_pack()
12935 static inline void mlxsw_reg_sbsr_pack(char *payload, bool clr) in mlxsw_reg_sbsr_pack() argument
12937 MLXSW_REG_ZERO(sbsr, payload); in mlxsw_reg_sbsr_pack()
12938 mlxsw_reg_sbsr_clr_set(payload, clr); in mlxsw_reg_sbsr_pack()
12956 static inline void mlxsw_reg_sbsr_rec_unpack(char *payload, int rec_index, in mlxsw_reg_sbsr_rec_unpack() argument
12961 mlxsw_reg_sbsr_rec_buff_occupancy_get(payload, rec_index); in mlxsw_reg_sbsr_rec_unpack()
12963 mlxsw_reg_sbsr_rec_max_buff_occupancy_get(payload, rec_index); in mlxsw_reg_sbsr_rec_unpack()
12994 static inline void mlxsw_reg_sbib_pack(char *payload, u16 local_port, in mlxsw_reg_sbib_pack() argument
12997 MLXSW_REG_ZERO(sbib, payload); in mlxsw_reg_sbib_pack()
12998 mlxsw_reg_sbib_local_port_set(payload, local_port); in mlxsw_reg_sbib_pack()
12999 mlxsw_reg_sbib_buff_size_set(payload, buff_size); in mlxsw_reg_sbib_pack()