MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mrvl_init_hif

Function mrvl_init_hif

dpdk/drivers/net/mvpp2/mrvl_ethdev.c:352–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352static int
353mrvl_init_hif(int core_id)
354{
355 struct pp2_hif_params params;
356 char match[MRVL_MATCH_LEN];
357 int ret;
358
359 ret = mrvl_reserve_bit(&used_hifs, MRVL_MUSDK_HIFS_MAX);
360 if (ret < 0) {
361 MRVL_LOG(ERR, "Failed to allocate hif %d", core_id);
362 return ret;
363 }
364
365 snprintf(match, sizeof(match), "hif-%d", ret);
366 memset(&params, 0, sizeof(params));
367 params.match = match;
368 params.out_size = MRVL_PP2_AGGR_TXQD_MAX;
369 ret = pp2_hif_init(&params, &hifs[core_id]);
370 if (ret) {
371 MRVL_LOG(ERR, "Failed to initialize hif %d", core_id);
372 return ret;
373 }
374
375 return 0;
376}
377
378static inline struct pp2_hif*
379mrvl_get_hif(struct mrvl_priv *priv, int core_id)

Callers 1

mrvl_get_hifFunction · 0.85

Calls 3

mrvl_reserve_bitFunction · 0.85
snprintfFunction · 0.85
memsetFunction · 0.85

Tested by

no test coverage detected