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

Function nix_meter_fini

dpdk/drivers/net/cnxk/cnxk_ethdev.c:221–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221static int
222nix_meter_fini(struct cnxk_eth_dev *dev)
223{
224 struct cnxk_meter_node *next_mtr = NULL;
225 struct roc_nix_bpf_objs profs = {0};
226 struct cnxk_meter_node *mtr = NULL;
227 struct cnxk_mtr *fms = &dev->mtr;
228 struct roc_nix *nix = &dev->nix;
229 struct roc_nix_rq *rq;
230 uint32_t i;
231 int rc = 0;
232
233 RTE_TAILQ_FOREACH_SAFE(mtr, fms, next, next_mtr) {
234 for (i = 0; i < mtr->rq_num; i++) {
235 rq = &dev->rqs[mtr->rq_id[i]];
236 rc |= roc_nix_bpf_ena_dis(nix, mtr->bpf_id, rq, false);
237 }
238
239 profs.level = mtr->level;
240 profs.count = 1;
241 profs.ids[0] = mtr->bpf_id;
242 rc = roc_nix_bpf_free(nix, &profs, 1);
243
244 if (rc)
245 return rc;
246
247 TAILQ_REMOVE(fms, mtr, next);
248 plt_free(mtr);
249 }
250 return 0;
251}
252
253static int
254nix_security_release(struct cnxk_eth_dev *dev)

Callers 2

cnxk_nix_configureFunction · 0.85
cnxk_eth_dev_uninitFunction · 0.85

Calls 2

roc_nix_bpf_ena_disFunction · 0.85
roc_nix_bpf_freeFunction · 0.85

Tested by

no test coverage detected