* Compares the preserved HWS configuration with the provided one. * * @param[in] hw_attr * Pointer to preserved HWS configuration. * @param[in] new_pa * Port configuration attributes to compare. * @param[in] new_nbq * Number of queues to compare. * @param[in] new_qa * Array that holds attributes for each flow queue. * * @return * True if configurations are the same, false oth
| 9287 | * True if configurations are the same, false otherwise. |
| 9288 | */ |
| 9289 | static bool |
| 9290 | flow_hw_compare_config(const struct mlx5_flow_hw_attr *hw_attr, |
| 9291 | const struct rte_flow_port_attr *new_pa, |
| 9292 | const uint16_t new_nbq, |
| 9293 | const struct rte_flow_queue_attr *new_qa[]) |
| 9294 | { |
| 9295 | const struct rte_flow_port_attr *old_pa = &hw_attr->port_attr; |
| 9296 | const uint16_t old_nbq = hw_attr->nb_queue; |
| 9297 | const struct rte_flow_queue_attr *old_qa = hw_attr->queue_attr; |
| 9298 | unsigned int i; |
| 9299 | |
| 9300 | if (old_pa->nb_counters != new_pa->nb_counters || |
| 9301 | old_pa->nb_aging_objects != new_pa->nb_aging_objects || |
| 9302 | old_pa->nb_meters != new_pa->nb_meters || |
| 9303 | old_pa->nb_conn_tracks != new_pa->nb_conn_tracks || |
| 9304 | old_pa->flags != new_pa->flags) |
| 9305 | return false; |
| 9306 | if (old_nbq != new_nbq) |
| 9307 | return false; |
| 9308 | for (i = 0; i < old_nbq; ++i) |
| 9309 | if (old_qa[i].size != new_qa[i]->size) |
| 9310 | return false; |
| 9311 | return true; |
| 9312 | } |
| 9313 | |
| 9314 | static int |
| 9315 | flow_hw_validate_attributes(const struct rte_flow_port_attr *port_attr, |