| 1029 | } |
| 1030 | |
| 1031 | static int |
| 1032 | pdcp_pre_post_func_set(struct rte_pdcp_entity *entity, const struct rte_pdcp_entity_conf *conf) |
| 1033 | { |
| 1034 | struct entity_priv *en_priv = entity_priv_get(entity); |
| 1035 | |
| 1036 | entity->pre_process = NULL; |
| 1037 | entity->post_process = NULL; |
| 1038 | |
| 1039 | if ((conf->pdcp_xfrm.domain == RTE_SECURITY_PDCP_MODE_CONTROL) && |
| 1040 | (conf->pdcp_xfrm.sn_size == RTE_SECURITY_PDCP_SN_SIZE_12) && |
| 1041 | (conf->pdcp_xfrm.pkt_dir == RTE_SECURITY_PDCP_UPLINK)) { |
| 1042 | entity->pre_process = pdcp_pre_process_cplane_sn_12_ul; |
| 1043 | entity->post_process = pdcp_post_process_ul; |
| 1044 | } |
| 1045 | |
| 1046 | if ((conf->pdcp_xfrm.domain == RTE_SECURITY_PDCP_MODE_CONTROL) && |
| 1047 | (conf->pdcp_xfrm.sn_size == RTE_SECURITY_PDCP_SN_SIZE_12) && |
| 1048 | (conf->pdcp_xfrm.pkt_dir == RTE_SECURITY_PDCP_DOWNLINK)) { |
| 1049 | entity->pre_process = pdcp_pre_process_cplane_sn_12_dl; |
| 1050 | entity->post_process = pdcp_post_process_cplane_sn_12_dl; |
| 1051 | } |
| 1052 | |
| 1053 | if ((conf->pdcp_xfrm.domain == RTE_SECURITY_PDCP_MODE_DATA) && |
| 1054 | (conf->pdcp_xfrm.sn_size == RTE_SECURITY_PDCP_SN_SIZE_12) && |
| 1055 | (conf->pdcp_xfrm.pkt_dir == RTE_SECURITY_PDCP_UPLINK)) { |
| 1056 | entity->pre_process = pdcp_pre_process_uplane_sn_12_ul; |
| 1057 | entity->post_process = pdcp_post_process_ul; |
| 1058 | } |
| 1059 | |
| 1060 | if ((conf->pdcp_xfrm.domain == RTE_SECURITY_PDCP_MODE_DATA) && |
| 1061 | (conf->pdcp_xfrm.sn_size == RTE_SECURITY_PDCP_SN_SIZE_18) && |
| 1062 | (conf->pdcp_xfrm.pkt_dir == RTE_SECURITY_PDCP_UPLINK)) { |
| 1063 | entity->pre_process = pdcp_pre_process_uplane_sn_18_ul; |
| 1064 | entity->post_process = pdcp_post_process_ul; |
| 1065 | } |
| 1066 | |
| 1067 | if ((conf->pdcp_xfrm.domain == RTE_SECURITY_PDCP_MODE_DATA) && |
| 1068 | (conf->pdcp_xfrm.sn_size == RTE_SECURITY_PDCP_SN_SIZE_12) && |
| 1069 | (conf->pdcp_xfrm.pkt_dir == RTE_SECURITY_PDCP_DOWNLINK) && |
| 1070 | (en_priv->flags.is_authenticated)) { |
| 1071 | entity->pre_process = pdcp_pre_process_uplane_sn_12_dl_ip; |
| 1072 | entity->post_process = pdcp_post_process_uplane_dl_ip; |
| 1073 | } |
| 1074 | |
| 1075 | if ((conf->pdcp_xfrm.domain == RTE_SECURITY_PDCP_MODE_DATA) && |
| 1076 | (conf->pdcp_xfrm.sn_size == RTE_SECURITY_PDCP_SN_SIZE_12) && |
| 1077 | (conf->pdcp_xfrm.pkt_dir == RTE_SECURITY_PDCP_DOWNLINK) && |
| 1078 | (!en_priv->flags.is_authenticated)) { |
| 1079 | entity->pre_process = pdcp_pre_process_uplane_sn_12_dl; |
| 1080 | entity->post_process = pdcp_post_process_uplane_dl; |
| 1081 | } |
| 1082 | |
| 1083 | if ((conf->pdcp_xfrm.domain == RTE_SECURITY_PDCP_MODE_DATA) && |
| 1084 | (conf->pdcp_xfrm.sn_size == RTE_SECURITY_PDCP_SN_SIZE_18) && |
| 1085 | (conf->pdcp_xfrm.pkt_dir == RTE_SECURITY_PDCP_DOWNLINK) && |
| 1086 | (en_priv->flags.is_authenticated)) { |
| 1087 | entity->pre_process = pdcp_pre_process_uplane_sn_18_dl_ip; |
| 1088 | entity->post_process = pdcp_post_process_uplane_dl_ip; |
no test coverage detected