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

Function cpfl_rule_process

dpdk/drivers/net/cpfl/cpfl_fxp_rule.c:236–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236int
237cpfl_rule_process(struct cpfl_itf *itf,
238 struct idpf_ctlq_info *tx_cq,
239 struct idpf_ctlq_info *rx_cq,
240 struct cpfl_rule_info *rinfo,
241 int rule_num,
242 bool add)
243{
244 struct idpf_hw *hw = &itf->adapter->base.hw;
245 int i;
246 int ret = 0;
247
248 if (rule_num == 0)
249 return 0;
250
251 for (i = 0; i < rule_num; i++) {
252 ret = cpfl_rule_pack(&rinfo[i], &itf->dma[i], &itf->msg[i], add);
253 if (ret) {
254 PMD_INIT_LOG(ERR, "Could not pack rule");
255 return ret;
256 }
257 }
258 ret = cpfl_send_ctlq_msg(hw, tx_cq, rule_num, itf->msg);
259 if (ret) {
260 PMD_INIT_LOG(ERR, "Failed to send control message");
261 return ret;
262 }
263 ret = cpfl_receive_ctlq_msg(hw, rx_cq, rule_num, itf->msg);
264 if (ret) {
265 PMD_INIT_LOG(ERR, "Failed to update rule");
266 return ret;
267 }
268
269 return 0;
270}

Callers 2

cpfl_fxp_createFunction · 0.85
cpfl_fxp_destroyFunction · 0.85

Calls 3

cpfl_rule_packFunction · 0.85
cpfl_send_ctlq_msgFunction · 0.85
cpfl_receive_ctlq_msgFunction · 0.85

Tested by

no test coverage detected