| 222 | } |
| 223 | |
| 224 | static int |
| 225 | fs_flow_isolate(struct rte_eth_dev *dev, |
| 226 | int set, |
| 227 | struct rte_flow_error *error) |
| 228 | { |
| 229 | struct sub_device *sdev; |
| 230 | uint8_t i; |
| 231 | int ret; |
| 232 | |
| 233 | ret = fs_lock(dev, 0); |
| 234 | if (ret != 0) |
| 235 | return ret; |
| 236 | FOREACH_SUBDEV(sdev, i, dev) { |
| 237 | if (sdev->state < DEV_PROBED) |
| 238 | continue; |
| 239 | DEBUG("Calling rte_flow_isolate on sub_device %d", i); |
| 240 | if (PRIV(dev)->flow_isolated != sdev->flow_isolated) |
| 241 | WARN("flow isolation mode of sub_device %d in incoherent state.", |
| 242 | i); |
| 243 | ret = rte_flow_isolate(PORT_ID(sdev), set, error); |
| 244 | if ((ret = fs_err(sdev, ret))) { |
| 245 | ERROR("Operation rte_flow_isolate failed for sub_device %d" |
| 246 | " with error %d", i, ret); |
| 247 | fs_unlock(dev, 0); |
| 248 | return ret; |
| 249 | } |
| 250 | sdev->flow_isolated = set; |
| 251 | } |
| 252 | PRIV(dev)->flow_isolated = set; |
| 253 | fs_unlock(dev, 0); |
| 254 | return 0; |
| 255 | } |
| 256 | |
| 257 | const struct rte_flow_ops fs_flow_ops = { |
| 258 | .validate = fs_flow_validate, |
nothing calls this directly
no test coverage detected