* Initialize packet processor. * * @return * 0 on success, negative error value otherwise. */
| 243 | * 0 on success, negative error value otherwise. |
| 244 | */ |
| 245 | static int |
| 246 | mrvl_init_pp2(void) |
| 247 | { |
| 248 | struct pp2_init_params init_params; |
| 249 | int err; |
| 250 | |
| 251 | memset(&init_params, 0, sizeof(init_params)); |
| 252 | init_params.hif_reserved_map = MRVL_MUSDK_HIFS_RESERVED; |
| 253 | init_params.bm_pool_reserved_map = MRVL_MUSDK_BPOOLS_RESERVED; |
| 254 | init_params.rss_tbl_reserved_map = MRVL_MUSDK_RSS_RESERVED; |
| 255 | if (mrvl_cfg && mrvl_cfg->pp2_cfg.prs_udfs.num_udfs) |
| 256 | memcpy(&init_params.prs_udfs, &mrvl_cfg->pp2_cfg.prs_udfs, |
| 257 | sizeof(struct pp2_parse_udfs)); |
| 258 | err = pp2_init(&init_params); |
| 259 | if (err != 0) { |
| 260 | MRVL_LOG(ERR, "PP2 init failed"); |
| 261 | return -1; |
| 262 | } |
| 263 | |
| 264 | err = mrvl_pp2_fixup_init(); |
| 265 | if (err != 0) { |
| 266 | MRVL_LOG(ERR, "PP2 fixup init failed"); |
| 267 | return -1; |
| 268 | } |
| 269 | |
| 270 | return 0; |
| 271 | } |
| 272 | |
| 273 | static void |
| 274 | mrvl_pp2_fixup_deinit(void) |
no test coverage detected