| 2308 | } |
| 2309 | |
| 2310 | static int |
| 2311 | bnxt_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error) |
| 2312 | { |
| 2313 | struct bnxt *bp = dev->data->dev_private; |
| 2314 | struct bnxt_vnic_info *vnic; |
| 2315 | struct rte_flow *flow; |
| 2316 | unsigned int i; |
| 2317 | int ret = 0; |
| 2318 | |
| 2319 | bnxt_acquire_flow_lock(bp); |
| 2320 | for (i = 0; i < bp->max_vnics; i++) { |
| 2321 | vnic = &bp->vnic_info[i]; |
| 2322 | if (vnic && vnic->fw_vnic_id == INVALID_VNIC_ID) |
| 2323 | continue; |
| 2324 | |
| 2325 | while (!STAILQ_EMPTY(&vnic->flow_list)) { |
| 2326 | flow = STAILQ_FIRST(&vnic->flow_list); |
| 2327 | |
| 2328 | if (!flow->filter) |
| 2329 | continue; |
| 2330 | |
| 2331 | ret = _bnxt_flow_destroy(bp, flow, error); |
| 2332 | if (ret) |
| 2333 | break; |
| 2334 | } |
| 2335 | } |
| 2336 | |
| 2337 | bnxt_cancel_fc_thread(bp); |
| 2338 | bnxt_release_flow_lock(bp); |
| 2339 | |
| 2340 | return ret; |
| 2341 | } |
| 2342 | |
| 2343 | const struct rte_flow_ops bnxt_flow_ops = { |
| 2344 | .validate = bnxt_flow_validate, |
nothing calls this directly
no test coverage detected