| 58 | |
| 59 | #ifdef MLX5_REGEX_DEBUG |
| 60 | static inline uint16_t |
| 61 | validate_ops(struct rte_regex_ops **ops, uint16_t nb_ops) |
| 62 | { |
| 63 | uint16_t nb_left = nb_ops; |
| 64 | struct rte_mbuf *mbuf; |
| 65 | |
| 66 | while (nb_left--) { |
| 67 | mbuf = ops[nb_left]->mbuf; |
| 68 | if ((mbuf->pkt_len > MLX5_RXP_MAX_JOB_LENGTH) || |
| 69 | (mbuf->nb_segs > max_nb_segs)) { |
| 70 | DRV_LOG(ERR, "Failed to validate regex ops"); |
| 71 | return 1; |
| 72 | } |
| 73 | } |
| 74 | return 0; |
| 75 | } |
| 76 | #endif |
| 77 | |
| 78 | static inline uint32_t |
no outgoing calls
no test coverage detected