MCPcopy Create free account
hub / github.com/F-Stack/f-stack / check_sp

Function check_sp

dpdk/examples/ipsec-secgw/ipsec_worker.c:141–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141static inline int
142check_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
163static inline void
164check_sp_bulk(struct sp_ctx *sp, struct traffic_type *ip,

Callers 2

process_ipsec_ev_inboundFunction · 0.85

Calls 1

rte_acl_classifyFunction · 0.85

Tested by

no test coverage detected