ethdev: fix C99 flexible arrays from flow API
[dpdk.git] / examples / ipsec-secgw / ipsec.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2016-2017 Intel Corporation
3  */
4 #include <sys/types.h>
5 #include <netinet/in.h>
6 #include <netinet/ip.h>
7
8 #include <rte_branch_prediction.h>
9 #include <rte_log.h>
10 #include <rte_crypto.h>
11 #include <rte_security.h>
12 #include <rte_cryptodev.h>
13 #include <rte_ethdev.h>
14 #include <rte_mbuf.h>
15 #include <rte_hash.h>
16
17 #include "ipsec.h"
18 #include "esp.h"
19
20 static inline void
21 set_ipsec_conf(struct ipsec_sa *sa, struct rte_security_ipsec_xform *ipsec)
22 {
23         if (ipsec->mode == RTE_SECURITY_IPSEC_SA_MODE_TUNNEL) {
24                 struct rte_security_ipsec_tunnel_param *tunnel =
25                                 &ipsec->tunnel;
26                 if (sa->flags == IP4_TUNNEL) {
27                         tunnel->type =
28                                 RTE_SECURITY_IPSEC_TUNNEL_IPV4;
29                         tunnel->ipv4.ttl = IPDEFTTL;
30
31                         memcpy((uint8_t *)&tunnel->ipv4.src_ip,
32                                 (uint8_t *)&sa->src.ip.ip4, 4);
33
34                         memcpy((uint8_t *)&tunnel->ipv4.dst_ip,
35                                 (uint8_t *)&sa->dst.ip.ip4, 4);
36                 }
37                 /* TODO support for Transport and IPV6 tunnel */
38         }
39         ipsec->esn_soft_limit = IPSEC_OFFLOAD_ESN_SOFTLIMIT;
40 }
41
42 static inline int
43 create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
44 {
45         struct rte_cryptodev_info cdev_info;
46         unsigned long cdev_id_qp = 0;
47         int32_t ret = 0;
48         struct cdev_key key = { 0 };
49
50         key.lcore_id = (uint8_t)rte_lcore_id();
51
52         key.cipher_algo = (uint8_t)sa->cipher_algo;
53         key.auth_algo = (uint8_t)sa->auth_algo;
54         key.aead_algo = (uint8_t)sa->aead_algo;
55
56         if (sa->type == RTE_SECURITY_ACTION_TYPE_NONE) {
57                 ret = rte_hash_lookup_data(ipsec_ctx->cdev_map, &key,
58                                 (void **)&cdev_id_qp);
59                 if (ret < 0) {
60                         RTE_LOG(ERR, IPSEC,
61                                 "No cryptodev: core %u, cipher_algo %u, "
62                                 "auth_algo %u, aead_algo %u\n",
63                                 key.lcore_id,
64                                 key.cipher_algo,
65                                 key.auth_algo,
66                                 key.aead_algo);
67                         return -1;
68                 }
69         }
70
71         RTE_LOG_DP(DEBUG, IPSEC, "Create session for SA spi %u on cryptodev "
72                         "%u qp %u\n", sa->spi,
73                         ipsec_ctx->tbl[cdev_id_qp].id,
74                         ipsec_ctx->tbl[cdev_id_qp].qp);
75
76         if (sa->type != RTE_SECURITY_ACTION_TYPE_NONE) {
77                 struct rte_security_session_conf sess_conf = {
78                         .action_type = sa->type,
79                         .protocol = RTE_SECURITY_PROTOCOL_IPSEC,
80                         {.ipsec = {
81                                 .spi = sa->spi,
82                                 .salt = sa->salt,
83                                 .options = { 0 },
84                                 .direction = sa->direction,
85                                 .proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
86                                 .mode = (sa->flags == IP4_TUNNEL ||
87                                                 sa->flags == IP6_TUNNEL) ?
88                                         RTE_SECURITY_IPSEC_SA_MODE_TUNNEL :
89                                         RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT,
90                         } },
91                         .crypto_xform = sa->xforms,
92                         .userdata = NULL,
93
94                 };
95
96                 if (sa->type == RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL) {
97                         struct rte_security_ctx *ctx = (struct rte_security_ctx *)
98                                                         rte_cryptodev_get_sec_ctx(
99                                                         ipsec_ctx->tbl[cdev_id_qp].id);
100
101                         /* Set IPsec parameters in conf */
102                         set_ipsec_conf(sa, &(sess_conf.ipsec));
103
104                         sa->sec_session = rte_security_session_create(ctx,
105                                         &sess_conf, ipsec_ctx->session_pool);
106                         if (sa->sec_session == NULL) {
107                                 RTE_LOG(ERR, IPSEC,
108                                 "SEC Session init failed: err: %d\n", ret);
109                                 return -1;
110                         }
111                 } else if (sa->type == RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
112                         struct rte_flow_error err;
113                         struct rte_security_ctx *ctx = (struct rte_security_ctx *)
114                                                         rte_eth_dev_get_sec_ctx(
115                                                         sa->portid);
116                         const struct rte_security_capability *sec_cap;
117                         int ret = 0;
118
119                         sa->sec_session = rte_security_session_create(ctx,
120                                         &sess_conf, ipsec_ctx->session_pool);
121                         if (sa->sec_session == NULL) {
122                                 RTE_LOG(ERR, IPSEC,
123                                 "SEC Session init failed: err: %d\n", ret);
124                                 return -1;
125                         }
126
127                         sec_cap = rte_security_capabilities_get(ctx);
128
129                         /* iterate until ESP tunnel*/
130                         while (sec_cap->action !=
131                                         RTE_SECURITY_ACTION_TYPE_NONE) {
132
133                                 if (sec_cap->action == sa->type &&
134                                     sec_cap->protocol ==
135                                         RTE_SECURITY_PROTOCOL_IPSEC &&
136                                     sec_cap->ipsec.mode ==
137                                         RTE_SECURITY_IPSEC_SA_MODE_TUNNEL &&
138                                     sec_cap->ipsec.direction == sa->direction)
139                                         break;
140                                 sec_cap++;
141                         }
142
143                         if (sec_cap->action == RTE_SECURITY_ACTION_TYPE_NONE) {
144                                 RTE_LOG(ERR, IPSEC,
145                                 "No suitable security capability found\n");
146                                 return -1;
147                         }
148
149                         sa->ol_flags = sec_cap->ol_flags;
150                         sa->security_ctx = ctx;
151                         sa->pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
152
153                         sa->pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV4;
154                         sa->pattern[1].mask = &rte_flow_item_ipv4_mask;
155                         if (sa->flags & IP6_TUNNEL) {
156                                 sa->pattern[1].spec = &sa->ipv6_spec;
157                                 memcpy(sa->ipv6_spec.hdr.dst_addr,
158                                         sa->dst.ip.ip6.ip6_b, 16);
159                                 memcpy(sa->ipv6_spec.hdr.src_addr,
160                                        sa->src.ip.ip6.ip6_b, 16);
161                         } else {
162                                 sa->pattern[1].spec = &sa->ipv4_spec;
163                                 sa->ipv4_spec.hdr.dst_addr = sa->dst.ip.ip4;
164                                 sa->ipv4_spec.hdr.src_addr = sa->src.ip.ip4;
165                         }
166
167                         sa->pattern[2].type = RTE_FLOW_ITEM_TYPE_ESP;
168                         sa->pattern[2].spec = &sa->esp_spec;
169                         sa->pattern[2].mask = &rte_flow_item_esp_mask;
170                         sa->esp_spec.hdr.spi = rte_cpu_to_be_32(sa->spi);
171
172                         sa->pattern[3].type = RTE_FLOW_ITEM_TYPE_END;
173
174                         sa->action[0].type = RTE_FLOW_ACTION_TYPE_SECURITY;
175                         sa->action[0].conf = sa->sec_session;
176
177                         sa->action[1].type = RTE_FLOW_ACTION_TYPE_END;
178
179                         sa->attr.egress = (sa->direction ==
180                                         RTE_SECURITY_IPSEC_SA_DIR_EGRESS);
181                         sa->attr.ingress = (sa->direction ==
182                                         RTE_SECURITY_IPSEC_SA_DIR_INGRESS);
183                         if (sa->attr.ingress) {
184                                 uint8_t rss_key[40];
185                                 struct rte_eth_rss_conf rss_conf = {
186                                         .rss_key = rss_key,
187                                         .rss_key_len = 40,
188                                 };
189                                 struct rte_eth_dev *eth_dev;
190                                 uint16_t queue[RTE_MAX_QUEUES_PER_PORT];
191                                 struct rte_flow_action_rss action_rss;
192                                 unsigned int i;
193                                 unsigned int j;
194
195                                 sa->action[2].type = RTE_FLOW_ACTION_TYPE_END;
196                                 /* Try RSS. */
197                                 sa->action[1].type = RTE_FLOW_ACTION_TYPE_RSS;
198                                 sa->action[1].conf = &action_rss;
199                                 eth_dev = ctx->device;
200                                 rte_eth_dev_rss_hash_conf_get(sa->portid,
201                                                               &rss_conf);
202                                 for (i = 0, j = 0;
203                                      i < eth_dev->data->nb_rx_queues; ++i)
204                                         if (eth_dev->data->rx_queues[i])
205                                                 queue[j++] = i;
206                                 action_rss.rss_conf = &rss_conf;
207                                 action_rss.num = j;
208                                 action_rss.queue = queue;
209                                 ret = rte_flow_validate(sa->portid, &sa->attr,
210                                                         sa->pattern, sa->action,
211                                                         &err);
212                                 if (!ret)
213                                         goto flow_create;
214                                 /* Try Queue. */
215                                 sa->action[1].type = RTE_FLOW_ACTION_TYPE_QUEUE;
216                                 sa->action[1].conf =
217                                         &(struct rte_flow_action_queue){
218                                         .index = 0,
219                                 };
220                                 ret = rte_flow_validate(sa->portid, &sa->attr,
221                                                         sa->pattern, sa->action,
222                                                         &err);
223                                 /* Try End. */
224                                 sa->action[1].type = RTE_FLOW_ACTION_TYPE_END;
225                                 sa->action[1].conf = NULL;
226                                 ret = rte_flow_validate(sa->portid, &sa->attr,
227                                                         sa->pattern, sa->action,
228                                                         &err);
229                                 if (ret)
230                                         goto flow_create_failure;
231                         } else if (sa->attr.egress &&
232                                    (sa->ol_flags &
233                                     RTE_SECURITY_TX_HW_TRAILER_OFFLOAD)) {
234                                 sa->action[1].type =
235                                         RTE_FLOW_ACTION_TYPE_PASSTHRU;
236                                 sa->action[2].type =
237                                         RTE_FLOW_ACTION_TYPE_END;
238                         }
239 flow_create:
240                         sa->flow = rte_flow_create(sa->portid,
241                                 &sa->attr, sa->pattern, sa->action, &err);
242                         if (sa->flow == NULL) {
243 flow_create_failure:
244                                 RTE_LOG(ERR, IPSEC,
245                                         "Failed to create ipsec flow msg: %s\n",
246                                         err.message);
247                                 return -1;
248                         }
249                 } else if (sa->type ==
250                                 RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL) {
251                         struct rte_security_ctx *ctx =
252                                         (struct rte_security_ctx *)
253                                         rte_eth_dev_get_sec_ctx(sa->portid);
254                         const struct rte_security_capability *sec_cap;
255
256                         if (ctx == NULL) {
257                                 RTE_LOG(ERR, IPSEC,
258                                 "Ethernet device doesn't have security features registered\n");
259                                 return -1;
260                         }
261
262                         /* Set IPsec parameters in conf */
263                         set_ipsec_conf(sa, &(sess_conf.ipsec));
264
265                         /* Save SA as userdata for the security session. When
266                          * the packet is received, this userdata will be
267                          * retrieved using the metadata from the packet.
268                          *
269                          * The PMD is expected to set similar metadata for other
270                          * operations, like rte_eth_event, which are tied to
271                          * security session. In such cases, the userdata could
272                          * be obtained to uniquely identify the security
273                          * parameters denoted.
274                          */
275
276                         sess_conf.userdata = (void *) sa;
277
278                         sa->sec_session = rte_security_session_create(ctx,
279                                         &sess_conf, ipsec_ctx->session_pool);
280                         if (sa->sec_session == NULL) {
281                                 RTE_LOG(ERR, IPSEC,
282                                 "SEC Session init failed: err: %d\n", ret);
283                                 return -1;
284                         }
285
286                         sec_cap = rte_security_capabilities_get(ctx);
287
288                         if (sec_cap == NULL) {
289                                 RTE_LOG(ERR, IPSEC,
290                                 "No capabilities registered\n");
291                                 return -1;
292                         }
293
294                         /* iterate until ESP tunnel*/
295                         while (sec_cap->action !=
296                                         RTE_SECURITY_ACTION_TYPE_NONE) {
297
298                                 if (sec_cap->action == sa->type &&
299                                     sec_cap->protocol ==
300                                         RTE_SECURITY_PROTOCOL_IPSEC &&
301                                     sec_cap->ipsec.mode ==
302                                         RTE_SECURITY_IPSEC_SA_MODE_TUNNEL &&
303                                     sec_cap->ipsec.direction == sa->direction)
304                                         break;
305                                 sec_cap++;
306                         }
307
308                         if (sec_cap->action == RTE_SECURITY_ACTION_TYPE_NONE) {
309                                 RTE_LOG(ERR, IPSEC,
310                                 "No suitable security capability found\n");
311                                 return -1;
312                         }
313
314                         sa->ol_flags = sec_cap->ol_flags;
315                         sa->security_ctx = ctx;
316                 }
317         } else {
318                 sa->crypto_session = rte_cryptodev_sym_session_create(
319                                 ipsec_ctx->session_pool);
320                 rte_cryptodev_sym_session_init(ipsec_ctx->tbl[cdev_id_qp].id,
321                                 sa->crypto_session, sa->xforms,
322                                 ipsec_ctx->session_pool);
323
324                 rte_cryptodev_info_get(ipsec_ctx->tbl[cdev_id_qp].id,
325                                 &cdev_info);
326                 if (cdev_info.sym.max_nb_sessions_per_qp > 0) {
327                         ret = rte_cryptodev_queue_pair_attach_sym_session(
328                                         ipsec_ctx->tbl[cdev_id_qp].id,
329                                         ipsec_ctx->tbl[cdev_id_qp].qp,
330                                         sa->crypto_session);
331                         if (ret < 0) {
332                                 RTE_LOG(ERR, IPSEC,
333                                         "Session cannot be attached to qp %u\n",
334                                         ipsec_ctx->tbl[cdev_id_qp].qp);
335                                 return -1;
336                         }
337                 }
338         }
339         sa->cdev_id_qp = cdev_id_qp;
340
341         return 0;
342 }
343
344 static inline void
345 enqueue_cop(struct cdev_qp *cqp, struct rte_crypto_op *cop)
346 {
347         int32_t ret, i;
348
349         cqp->buf[cqp->len++] = cop;
350
351         if (cqp->len == MAX_PKT_BURST) {
352                 ret = rte_cryptodev_enqueue_burst(cqp->id, cqp->qp,
353                                 cqp->buf, cqp->len);
354                 if (ret < cqp->len) {
355                         RTE_LOG_DP(DEBUG, IPSEC, "Cryptodev %u queue %u:"
356                                         " enqueued %u crypto ops out of %u\n",
357                                          cqp->id, cqp->qp,
358                                          ret, cqp->len);
359                         for (i = ret; i < cqp->len; i++)
360                                 rte_pktmbuf_free(cqp->buf[i]->sym->m_src);
361                 }
362                 cqp->in_flight += ret;
363                 cqp->len = 0;
364         }
365 }
366
367 static inline void
368 ipsec_enqueue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx,
369                 struct rte_mbuf *pkts[], struct ipsec_sa *sas[],
370                 uint16_t nb_pkts)
371 {
372         int32_t ret = 0, i;
373         struct ipsec_mbuf_metadata *priv;
374         struct rte_crypto_sym_op *sym_cop;
375         struct ipsec_sa *sa;
376
377         for (i = 0; i < nb_pkts; i++) {
378                 if (unlikely(sas[i] == NULL)) {
379                         rte_pktmbuf_free(pkts[i]);
380                         continue;
381                 }
382
383                 rte_prefetch0(sas[i]);
384                 rte_prefetch0(pkts[i]);
385
386                 priv = get_priv(pkts[i]);
387                 sa = sas[i];
388                 priv->sa = sa;
389
390                 switch (sa->type) {
391                 case RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL:
392                         priv->cop.type = RTE_CRYPTO_OP_TYPE_SYMMETRIC;
393                         priv->cop.status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
394
395                         rte_prefetch0(&priv->sym_cop);
396
397                         if ((unlikely(sa->sec_session == NULL)) &&
398                                         create_session(ipsec_ctx, sa)) {
399                                 rte_pktmbuf_free(pkts[i]);
400                                 continue;
401                         }
402
403                         sym_cop = get_sym_cop(&priv->cop);
404                         sym_cop->m_src = pkts[i];
405
406                         rte_security_attach_session(&priv->cop,
407                                         sa->sec_session);
408                         break;
409                 case RTE_SECURITY_ACTION_TYPE_NONE:
410
411                         priv->cop.type = RTE_CRYPTO_OP_TYPE_SYMMETRIC;
412                         priv->cop.status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
413
414                         rte_prefetch0(&priv->sym_cop);
415
416                         if ((unlikely(sa->crypto_session == NULL)) &&
417                                         create_session(ipsec_ctx, sa)) {
418                                 rte_pktmbuf_free(pkts[i]);
419                                 continue;
420                         }
421
422                         rte_crypto_op_attach_sym_session(&priv->cop,
423                                         sa->crypto_session);
424
425                         ret = xform_func(pkts[i], sa, &priv->cop);
426                         if (unlikely(ret)) {
427                                 rte_pktmbuf_free(pkts[i]);
428                                 continue;
429                         }
430                         break;
431                 case RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL:
432                         if ((unlikely(sa->sec_session == NULL)) &&
433                                         create_session(ipsec_ctx, sa)) {
434                                 rte_pktmbuf_free(pkts[i]);
435                                 continue;
436                         }
437
438                         ipsec_ctx->ol_pkts[ipsec_ctx->ol_pkts_cnt++] = pkts[i];
439                         if (sa->ol_flags & RTE_SECURITY_TX_OLOAD_NEED_MDATA)
440                                 rte_security_set_pkt_metadata(
441                                                 sa->security_ctx,
442                                                 sa->sec_session, pkts[i], NULL);
443                         continue;
444                 case RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO:
445                         priv->cop.type = RTE_CRYPTO_OP_TYPE_SYMMETRIC;
446                         priv->cop.status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
447
448                         rte_prefetch0(&priv->sym_cop);
449
450                         if ((unlikely(sa->sec_session == NULL)) &&
451                                         create_session(ipsec_ctx, sa)) {
452                                 rte_pktmbuf_free(pkts[i]);
453                                 continue;
454                         }
455
456                         rte_security_attach_session(&priv->cop,
457                                         sa->sec_session);
458
459                         ret = xform_func(pkts[i], sa, &priv->cop);
460                         if (unlikely(ret)) {
461                                 rte_pktmbuf_free(pkts[i]);
462                                 continue;
463                         }
464
465                         ipsec_ctx->ol_pkts[ipsec_ctx->ol_pkts_cnt++] = pkts[i];
466                         if (sa->ol_flags & RTE_SECURITY_TX_OLOAD_NEED_MDATA)
467                                 rte_security_set_pkt_metadata(
468                                                 sa->security_ctx,
469                                                 sa->sec_session, pkts[i], NULL);
470                         continue;
471                 }
472
473                 RTE_ASSERT(sa->cdev_id_qp < ipsec_ctx->nb_qps);
474                 enqueue_cop(&ipsec_ctx->tbl[sa->cdev_id_qp], &priv->cop);
475         }
476 }
477
478 static inline int
479 ipsec_dequeue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx,
480               struct rte_mbuf *pkts[], uint16_t max_pkts)
481 {
482         int32_t nb_pkts = 0, ret = 0, i, j, nb_cops;
483         struct ipsec_mbuf_metadata *priv;
484         struct rte_crypto_op *cops[max_pkts];
485         struct ipsec_sa *sa;
486         struct rte_mbuf *pkt;
487
488         for (i = 0; i < ipsec_ctx->nb_qps && nb_pkts < max_pkts;) {
489                 struct cdev_qp *cqp;
490                 cqp = &ipsec_ctx->tbl[ipsec_ctx->last_qp];
491
492                 while (ipsec_ctx->ol_pkts_cnt > 0 && nb_pkts < max_pkts) {
493                         pkt = ipsec_ctx->ol_pkts[--ipsec_ctx->ol_pkts_cnt];
494                         rte_prefetch0(pkt);
495                         priv = get_priv(pkt);
496                         sa = priv->sa;
497                         ret = xform_func(pkt, sa, &priv->cop);
498                         if (unlikely(ret)) {
499                                 rte_pktmbuf_free(pkt);
500                                 continue;
501                         }
502                         pkts[nb_pkts++] = pkt;
503                 }
504
505                 if (cqp->in_flight == 0) {
506                         ipsec_ctx->last_qp++;
507                         if (ipsec_ctx->last_qp == ipsec_ctx->nb_qps)
508                                 ipsec_ctx->last_qp %= ipsec_ctx->nb_qps;
509                         i++;
510                         continue;
511                 }
512
513                 nb_cops = rte_cryptodev_dequeue_burst(cqp->id, cqp->qp,
514                                 cops, max_pkts - nb_pkts);
515
516                 cqp->in_flight -= nb_cops;
517
518                 for (j = 0; j < nb_cops; j++) {
519                         pkt = cops[j]->sym->m_src;
520                         rte_prefetch0(pkt);
521
522                         priv = get_priv(pkt);
523                         sa = priv->sa;
524
525                         RTE_ASSERT(sa != NULL);
526
527                         if (sa->type == RTE_SECURITY_ACTION_TYPE_NONE) {
528                                 ret = xform_func(pkt, sa, cops[j]);
529                                 if (unlikely(ret)) {
530                                         rte_pktmbuf_free(pkt);
531                                         continue;
532                                 }
533                         }
534                         pkts[nb_pkts++] = pkt;
535                         if (cqp->in_flight < max_pkts) {
536                                 ipsec_ctx->last_qp++;
537                                 if (ipsec_ctx->last_qp == ipsec_ctx->nb_qps)
538                                         ipsec_ctx->last_qp %= ipsec_ctx->nb_qps;
539                                 i++;
540                         }
541                 }
542         }
543
544         /* return packets */
545         return nb_pkts;
546 }
547
548 uint16_t
549 ipsec_inbound(struct ipsec_ctx *ctx, struct rte_mbuf *pkts[],
550                 uint16_t nb_pkts, uint16_t len)
551 {
552         struct ipsec_sa *sas[nb_pkts];
553
554         inbound_sa_lookup(ctx->sa_ctx, pkts, sas, nb_pkts);
555
556         ipsec_enqueue(esp_inbound, ctx, pkts, sas, nb_pkts);
557
558         return ipsec_dequeue(esp_inbound_post, ctx, pkts, len);
559 }
560
561 uint16_t
562 ipsec_outbound(struct ipsec_ctx *ctx, struct rte_mbuf *pkts[],
563                 uint32_t sa_idx[], uint16_t nb_pkts, uint16_t len)
564 {
565         struct ipsec_sa *sas[nb_pkts];
566
567         outbound_sa_lookup(ctx->sa_ctx, sa_idx, sas, nb_pkts);
568
569         ipsec_enqueue(esp_outbound, ctx, pkts, sas, nb_pkts);
570
571         return ipsec_dequeue(esp_outbound_post, ctx, pkts, len);
572 }