| 139 | } |
| 140 | |
| 141 | static inline int |
| 142 | check_sp(struct sp_ctx *sp, const uint8_t *nlp, uint32_t *sa_idx) |
| 143 | { |
| 144 | uint32_t res; |
| 145 | |
| 146 | if (unlikely(sp == NULL)) |
| 147 | return 0; |
| 148 | |
| 149 | rte_acl_classify((struct rte_acl_ctx *)sp, &nlp, &res, 1, |
| 150 | DEFAULT_MAX_CATEGORIES); |
| 151 | |
| 152 | if (unlikely(res == DISCARD)) |
| 153 | return 0; |
| 154 | else if (res == BYPASS) { |
| 155 | *sa_idx = -1; |
| 156 | return 1; |
| 157 | } |
| 158 | |
| 159 | *sa_idx = res - 1; |
| 160 | return 1; |
| 161 | } |
| 162 | |
| 163 | static inline void |
| 164 | check_sp_bulk(struct sp_ctx *sp, struct traffic_type *ip, |
no test coverage detected