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

Function sfc_flow_rss_attach

dpdk/drivers/net/sfc/sfc_flow_rss.c:21–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include "sfc_rx.h"
20
21int
22sfc_flow_rss_attach(struct sfc_adapter *sa)
23{
24 const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);
25 struct sfc_flow_rss *flow_rss = &sa->flow_rss;
26 int rc;
27
28 sfc_log_init(sa, "entry");
29
30 flow_rss->qid_span_max = encp->enc_rx_scale_indirection_max_nqueues;
31 flow_rss->nb_tbl_entries_min = encp->enc_rx_scale_tbl_min_nentries;
32 flow_rss->nb_tbl_entries_max = encp->enc_rx_scale_tbl_max_nentries;
33
34 sfc_log_init(sa, "allocate the bounce buffer for indirection entries");
35 flow_rss->bounce_tbl = rte_calloc("sfc_flow_rss_bounce_tbl",
36 flow_rss->nb_tbl_entries_max,
37 sizeof(*flow_rss->bounce_tbl), 0);
38 if (flow_rss->bounce_tbl == NULL) {
39 rc = ENOMEM;
40 goto fail;
41 }
42
43 TAILQ_INIT(&flow_rss->ctx_list);
44
45 sfc_log_init(sa, "done");
46
47 return 0;
48
49fail:
50 sfc_log_init(sa, "failed %d", rc);
51
52 return rc;
53}
54
55void
56sfc_flow_rss_detach(struct sfc_adapter *sa)

Callers 1

sfc_attachFunction · 0.85

Calls 2

efx_nic_cfg_getFunction · 0.85
rte_callocFunction · 0.85

Tested by

no test coverage detected