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

Function nfp_mtr_update_ref_cnt

dpdk/drivers/net/nfp/nfp_mtr.c:1156–1170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1154}
1155
1156int
1157nfp_mtr_update_ref_cnt(struct nfp_mtr_priv *priv,
1158 uint32_t mtr_id,
1159 bool add)
1160{
1161 struct nfp_mtr *mtr;
1162
1163 mtr = nfp_mtr_find_by_mtr_id(priv, mtr_id);
1164 if (mtr == NULL)
1165 return -EINVAL;
1166
1167 mtr->ref_cnt += add ? 1 : -1;
1168
1169 return 0;
1170}

Callers 2

nfp_flow_createFunction · 0.85
nfp_flow_destroyFunction · 0.85

Calls 1

nfp_mtr_find_by_mtr_idFunction · 0.85

Tested by

no test coverage detected