4 * Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * * Neither the name of Intel Corporation nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 #include <rte_common.h>
37 #include <rte_malloc.h>
38 #include <rte_ether.h>
41 #include <rte_byteorder.h>
42 #include <rte_table_acl.h>
44 #include "pipeline_firewall_be.h"
46 struct pipeline_firewall {
48 pipeline_msg_req_handler custom_handlers[PIPELINE_FIREWALL_MSG_REQS];
51 uint32_t n_rule_fields;
52 struct rte_acl_field_def *field_format;
53 uint32_t field_format_size;
54 } __rte_cache_aligned;
57 pipeline_firewall_msg_req_custom_handler(struct pipeline *p, void *msg);
59 static pipeline_msg_req_handler handlers[] = {
60 [PIPELINE_MSG_REQ_PING] =
61 pipeline_msg_req_ping_handler,
62 [PIPELINE_MSG_REQ_STATS_PORT_IN] =
63 pipeline_msg_req_stats_port_in_handler,
64 [PIPELINE_MSG_REQ_STATS_PORT_OUT] =
65 pipeline_msg_req_stats_port_out_handler,
66 [PIPELINE_MSG_REQ_STATS_TABLE] =
67 pipeline_msg_req_stats_table_handler,
68 [PIPELINE_MSG_REQ_PORT_IN_ENABLE] =
69 pipeline_msg_req_port_in_enable_handler,
70 [PIPELINE_MSG_REQ_PORT_IN_DISABLE] =
71 pipeline_msg_req_port_in_disable_handler,
72 [PIPELINE_MSG_REQ_CUSTOM] =
73 pipeline_firewall_msg_req_custom_handler,
77 pipeline_firewall_msg_req_add_handler(struct pipeline *p, void *msg);
80 pipeline_firewall_msg_req_del_handler(struct pipeline *p, void *msg);
83 pipeline_firewall_msg_req_add_bulk_handler(struct pipeline *p, void *msg);
86 pipeline_firewall_msg_req_del_bulk_handler(struct pipeline *p, void *msg);
89 pipeline_firewall_msg_req_add_default_handler(struct pipeline *p, void *msg);
92 pipeline_firewall_msg_req_del_default_handler(struct pipeline *p, void *msg);
94 static pipeline_msg_req_handler custom_handlers[] = {
95 [PIPELINE_FIREWALL_MSG_REQ_ADD] =
96 pipeline_firewall_msg_req_add_handler,
97 [PIPELINE_FIREWALL_MSG_REQ_DEL] =
98 pipeline_firewall_msg_req_del_handler,
99 [PIPELINE_FIREWALL_MSG_REQ_ADD_BULK] =
100 pipeline_firewall_msg_req_add_bulk_handler,
101 [PIPELINE_FIREWALL_MSG_REQ_DEL_BULK] =
102 pipeline_firewall_msg_req_del_bulk_handler,
103 [PIPELINE_FIREWALL_MSG_REQ_ADD_DEFAULT] =
104 pipeline_firewall_msg_req_add_default_handler,
105 [PIPELINE_FIREWALL_MSG_REQ_DEL_DEFAULT] =
106 pipeline_firewall_msg_req_del_default_handler,
112 struct firewall_table_entry {
113 struct rte_pipeline_table_entry head;
116 static struct rte_acl_field_def field_format_ipv4[] = {
119 .type = RTE_ACL_FIELD_TYPE_BITMASK,
120 .size = sizeof(uint8_t),
123 .offset = sizeof(struct ether_hdr) +
124 offsetof(struct ipv4_hdr, next_proto_id),
127 /* Source IP address (IPv4) */
129 .type = RTE_ACL_FIELD_TYPE_MASK,
130 .size = sizeof(uint32_t),
133 .offset = sizeof(struct ether_hdr) +
134 offsetof(struct ipv4_hdr, src_addr),
137 /* Destination IP address (IPv4) */
139 .type = RTE_ACL_FIELD_TYPE_MASK,
140 .size = sizeof(uint32_t),
143 .offset = sizeof(struct ether_hdr) +
144 offsetof(struct ipv4_hdr, dst_addr),
149 .type = RTE_ACL_FIELD_TYPE_RANGE,
150 .size = sizeof(uint16_t),
153 .offset = sizeof(struct ether_hdr) +
154 sizeof(struct ipv4_hdr) +
155 offsetof(struct tcp_hdr, src_port),
158 /* Destination Port */
160 .type = RTE_ACL_FIELD_TYPE_RANGE,
161 .size = sizeof(uint16_t),
164 .offset = sizeof(struct ether_hdr) +
165 sizeof(struct ipv4_hdr) +
166 offsetof(struct tcp_hdr, dst_port),
170 #define SIZEOF_VLAN_HDR 4
172 static struct rte_acl_field_def field_format_vlan_ipv4[] = {
175 .type = RTE_ACL_FIELD_TYPE_BITMASK,
176 .size = sizeof(uint8_t),
179 .offset = sizeof(struct ether_hdr) +
181 offsetof(struct ipv4_hdr, next_proto_id),
184 /* Source IP address (IPv4) */
186 .type = RTE_ACL_FIELD_TYPE_MASK,
187 .size = sizeof(uint32_t),
190 .offset = sizeof(struct ether_hdr) +
192 offsetof(struct ipv4_hdr, src_addr),
195 /* Destination IP address (IPv4) */
197 .type = RTE_ACL_FIELD_TYPE_MASK,
198 .size = sizeof(uint32_t),
201 .offset = sizeof(struct ether_hdr) +
203 offsetof(struct ipv4_hdr, dst_addr),
208 .type = RTE_ACL_FIELD_TYPE_RANGE,
209 .size = sizeof(uint16_t),
212 .offset = sizeof(struct ether_hdr) +
214 sizeof(struct ipv4_hdr) +
215 offsetof(struct tcp_hdr, src_port),
218 /* Destination Port */
220 .type = RTE_ACL_FIELD_TYPE_RANGE,
221 .size = sizeof(uint16_t),
224 .offset = sizeof(struct ether_hdr) +
226 sizeof(struct ipv4_hdr) +
227 offsetof(struct tcp_hdr, dst_port),
231 #define SIZEOF_QINQ_HEADER 8
233 static struct rte_acl_field_def field_format_qinq_ipv4[] = {
236 .type = RTE_ACL_FIELD_TYPE_BITMASK,
237 .size = sizeof(uint8_t),
240 .offset = sizeof(struct ether_hdr) +
242 offsetof(struct ipv4_hdr, next_proto_id),
245 /* Source IP address (IPv4) */
247 .type = RTE_ACL_FIELD_TYPE_MASK,
248 .size = sizeof(uint32_t),
251 .offset = sizeof(struct ether_hdr) +
253 offsetof(struct ipv4_hdr, src_addr),
256 /* Destination IP address (IPv4) */
258 .type = RTE_ACL_FIELD_TYPE_MASK,
259 .size = sizeof(uint32_t),
262 .offset = sizeof(struct ether_hdr) +
264 offsetof(struct ipv4_hdr, dst_addr),
269 .type = RTE_ACL_FIELD_TYPE_RANGE,
270 .size = sizeof(uint16_t),
273 .offset = sizeof(struct ether_hdr) +
275 sizeof(struct ipv4_hdr) +
276 offsetof(struct tcp_hdr, src_port),
279 /* Destination Port */
281 .type = RTE_ACL_FIELD_TYPE_RANGE,
282 .size = sizeof(uint16_t),
285 .offset = sizeof(struct ether_hdr) +
287 sizeof(struct ipv4_hdr) +
288 offsetof(struct tcp_hdr, dst_port),
293 pipeline_firewall_parse_args(struct pipeline_firewall *p,
294 struct pipeline_params *params)
296 uint32_t n_rules_present = 0;
297 uint32_t pkt_type_present = 0;
301 p->n_rules = 4 * 1024;
302 p->n_rule_fields = RTE_DIM(field_format_ipv4);
303 p->field_format = field_format_ipv4;
304 p->field_format_size = sizeof(field_format_ipv4);
306 for (i = 0; i < params->n_args; i++) {
307 char *arg_name = params->args_name[i];
308 char *arg_value = params->args_value[i];
310 if (strcmp(arg_name, "n_rules") == 0) {
315 p->n_rules = atoi(arg_value);
319 if (strcmp(arg_name, "pkt_type") == 0) {
320 if (pkt_type_present)
322 pkt_type_present = 1;
325 if (strcmp(arg_value, "ipv4") == 0) {
326 p->n_rule_fields = RTE_DIM(field_format_ipv4);
327 p->field_format = field_format_ipv4;
328 p->field_format_size =
329 sizeof(field_format_ipv4);
334 if (strcmp(arg_value, "vlan_ipv4") == 0) {
336 RTE_DIM(field_format_vlan_ipv4);
337 p->field_format = field_format_vlan_ipv4;
338 p->field_format_size =
339 sizeof(field_format_vlan_ipv4);
344 if (strcmp(arg_value, "qinq_ipv4") == 0) {
346 RTE_DIM(field_format_qinq_ipv4);
347 p->field_format = field_format_qinq_ipv4;
348 p->field_format_size =
349 sizeof(field_format_qinq_ipv4);
365 pipeline_firewall_init(struct pipeline_params *params,
366 __rte_unused void *arg)
369 struct pipeline_firewall *p_fw;
372 /* Check input arguments */
373 if ((params == NULL) ||
374 (params->n_ports_in == 0) ||
375 (params->n_ports_out == 0))
378 /* Memory allocation */
379 size = RTE_CACHE_LINE_ROUNDUP(sizeof(struct pipeline_firewall));
380 p = rte_zmalloc(NULL, size, RTE_CACHE_LINE_SIZE);
381 p_fw = (struct pipeline_firewall *) p;
385 strcpy(p->name, params->name);
386 p->log_level = params->log_level;
388 PLOG(p, HIGH, "Firewall");
390 /* Parse arguments */
391 if (pipeline_firewall_parse_args(p_fw, params))
396 struct rte_pipeline_params pipeline_params = {
397 .name = params->name,
398 .socket_id = params->socket_id,
402 p->p = rte_pipeline_create(&pipeline_params);
410 p->n_ports_in = params->n_ports_in;
411 for (i = 0; i < p->n_ports_in; i++) {
412 struct rte_pipeline_port_in_params port_params = {
413 .ops = pipeline_port_in_params_get_ops(
414 ¶ms->port_in[i]),
415 .arg_create = pipeline_port_in_params_convert(
416 ¶ms->port_in[i]),
419 .burst_size = params->port_in[i].burst_size,
422 int status = rte_pipeline_port_in_create(p->p,
427 rte_pipeline_free(p->p);
434 p->n_ports_out = params->n_ports_out;
435 for (i = 0; i < p->n_ports_out; i++) {
436 struct rte_pipeline_port_out_params port_params = {
437 .ops = pipeline_port_out_params_get_ops(
438 ¶ms->port_out[i]),
439 .arg_create = pipeline_port_out_params_convert(
440 ¶ms->port_out[i]),
442 .f_action_bulk = NULL,
446 int status = rte_pipeline_port_out_create(p->p,
451 rte_pipeline_free(p->p);
460 struct rte_table_acl_params table_acl_params = {
461 .name = params->name,
462 .n_rules = p_fw->n_rules,
463 .n_rule_fields = p_fw->n_rule_fields,
466 struct rte_pipeline_table_params table_params = {
467 .ops = &rte_table_acl_ops,
468 .arg_create = &table_acl_params,
469 .f_action_hit = NULL,
470 .f_action_miss = NULL,
473 sizeof(struct firewall_table_entry) -
474 sizeof(struct rte_pipeline_table_entry),
479 memcpy(table_acl_params.field_format,
481 p_fw->field_format_size);
483 status = rte_pipeline_table_create(p->p,
488 rte_pipeline_free(p->p);
494 /* Connecting input ports to tables */
495 for (i = 0; i < p->n_ports_in; i++) {
496 int status = rte_pipeline_port_in_connect_to_table(p->p,
501 rte_pipeline_free(p->p);
507 /* Enable input ports */
508 for (i = 0; i < p->n_ports_in; i++) {
509 int status = rte_pipeline_port_in_enable(p->p,
513 rte_pipeline_free(p->p);
519 /* Check pipeline consistency */
520 if (rte_pipeline_check(p->p) < 0) {
521 rte_pipeline_free(p->p);
527 p->n_msgq = params->n_msgq;
528 for (i = 0; i < p->n_msgq; i++)
529 p->msgq_in[i] = params->msgq_in[i];
530 for (i = 0; i < p->n_msgq; i++)
531 p->msgq_out[i] = params->msgq_out[i];
533 /* Message handlers */
534 memcpy(p->handlers, handlers, sizeof(p->handlers));
535 memcpy(p_fw->custom_handlers,
537 sizeof(p_fw->custom_handlers));
543 pipeline_firewall_free(void *pipeline)
545 struct pipeline *p = (struct pipeline *) pipeline;
547 /* Check input arguments */
552 rte_pipeline_free(p->p);
558 pipeline_firewall_track(void *pipeline,
559 __rte_unused uint32_t port_in,
562 struct pipeline *p = (struct pipeline *) pipeline;
564 /* Check input arguments */
566 (port_in >= p->n_ports_in) ||
570 if (p->n_ports_in == 1) {
579 pipeline_firewall_timer(void *pipeline)
581 struct pipeline *p = (struct pipeline *) pipeline;
583 pipeline_msg_req_handle(p);
584 rte_pipeline_flush(p->p);
590 pipeline_firewall_msg_req_custom_handler(struct pipeline *p,
593 struct pipeline_firewall *p_fw = (struct pipeline_firewall *) p;
594 struct pipeline_custom_msg_req *req = msg;
595 pipeline_msg_req_handler f_handle;
597 f_handle = (req->subtype < PIPELINE_FIREWALL_MSG_REQS) ?
598 p_fw->custom_handlers[req->subtype] :
599 pipeline_msg_req_invalid_handler;
601 if (f_handle == NULL)
602 f_handle = pipeline_msg_req_invalid_handler;
604 return f_handle(p, req);
608 pipeline_firewall_msg_req_add_handler(struct pipeline *p, void *msg)
610 struct pipeline_firewall_add_msg_req *req = msg;
611 struct pipeline_firewall_add_msg_rsp *rsp = msg;
613 struct rte_table_acl_rule_add_params params;
614 struct firewall_table_entry entry = {
616 .action = RTE_PIPELINE_ACTION_PORT,
617 {.port_id = p->port_out_id[req->port_id]},
621 memset(¶ms, 0, sizeof(params));
623 switch (req->key.type) {
624 case PIPELINE_FIREWALL_IPV4_5TUPLE:
625 params.priority = req->priority;
626 params.field_value[0].value.u8 =
627 req->key.key.ipv4_5tuple.proto;
628 params.field_value[0].mask_range.u8 =
629 req->key.key.ipv4_5tuple.proto_mask;
630 params.field_value[1].value.u32 =
631 req->key.key.ipv4_5tuple.src_ip;
632 params.field_value[1].mask_range.u32 =
633 req->key.key.ipv4_5tuple.src_ip_mask;
634 params.field_value[2].value.u32 =
635 req->key.key.ipv4_5tuple.dst_ip;
636 params.field_value[2].mask_range.u32 =
637 req->key.key.ipv4_5tuple.dst_ip_mask;
638 params.field_value[3].value.u16 =
639 req->key.key.ipv4_5tuple.src_port_from;
640 params.field_value[3].mask_range.u16 =
641 req->key.key.ipv4_5tuple.src_port_to;
642 params.field_value[4].value.u16 =
643 req->key.key.ipv4_5tuple.dst_port_from;
644 params.field_value[4].mask_range.u16 =
645 req->key.key.ipv4_5tuple.dst_port_to;
649 rsp->status = -1; /* Error */
653 rsp->status = rte_pipeline_table_entry_add(p->p,
656 (struct rte_pipeline_table_entry *) &entry,
658 (struct rte_pipeline_table_entry **) &rsp->entry_ptr);
664 pipeline_firewall_msg_req_del_handler(struct pipeline *p, void *msg)
666 struct pipeline_firewall_del_msg_req *req = msg;
667 struct pipeline_firewall_del_msg_rsp *rsp = msg;
669 struct rte_table_acl_rule_delete_params params;
671 memset(¶ms, 0, sizeof(params));
673 switch (req->key.type) {
674 case PIPELINE_FIREWALL_IPV4_5TUPLE:
675 params.field_value[0].value.u8 =
676 req->key.key.ipv4_5tuple.proto;
677 params.field_value[0].mask_range.u8 =
678 req->key.key.ipv4_5tuple.proto_mask;
679 params.field_value[1].value.u32 =
680 req->key.key.ipv4_5tuple.src_ip;
681 params.field_value[1].mask_range.u32 =
682 req->key.key.ipv4_5tuple.src_ip_mask;
683 params.field_value[2].value.u32 =
684 req->key.key.ipv4_5tuple.dst_ip;
685 params.field_value[2].mask_range.u32 =
686 req->key.key.ipv4_5tuple.dst_ip_mask;
687 params.field_value[3].value.u16 =
688 req->key.key.ipv4_5tuple.src_port_from;
689 params.field_value[3].mask_range.u16 =
690 req->key.key.ipv4_5tuple.src_port_to;
691 params.field_value[4].value.u16 =
692 req->key.key.ipv4_5tuple.dst_port_from;
693 params.field_value[4].mask_range.u16 =
694 req->key.key.ipv4_5tuple.dst_port_to;
698 rsp->status = -1; /* Error */
702 rsp->status = rte_pipeline_table_entry_delete(p->p,
712 pipeline_firewall_msg_req_add_bulk_handler(struct pipeline *p, void *msg)
714 struct pipeline_firewall_add_bulk_msg_req *req = msg;
715 struct pipeline_firewall_add_bulk_msg_rsp *rsp = msg;
717 struct rte_table_acl_rule_add_params *params[req->n_keys];
718 struct firewall_table_entry *entries[req->n_keys];
722 n_keys = req->n_keys;
724 for (i = 0; i < n_keys; i++) {
725 entries[i] = rte_malloc(NULL,
726 sizeof(struct firewall_table_entry),
727 RTE_CACHE_LINE_SIZE);
728 if (entries[i] == NULL) {
733 params[i] = rte_malloc(NULL,
734 sizeof(struct rte_table_acl_rule_add_params),
735 RTE_CACHE_LINE_SIZE);
736 if (params[i] == NULL) {
741 entries[i]->head.action = RTE_PIPELINE_ACTION_PORT;
742 entries[i]->head.port_id = p->port_out_id[req->port_ids[i]];
744 switch (req->keys[i].type) {
745 case PIPELINE_FIREWALL_IPV4_5TUPLE:
746 params[i]->priority = req->priorities[i];
747 params[i]->field_value[0].value.u8 =
748 req->keys[i].key.ipv4_5tuple.proto;
749 params[i]->field_value[0].mask_range.u8 =
750 req->keys[i].key.ipv4_5tuple.proto_mask;
751 params[i]->field_value[1].value.u32 =
752 req->keys[i].key.ipv4_5tuple.src_ip;
753 params[i]->field_value[1].mask_range.u32 =
754 req->keys[i].key.ipv4_5tuple.src_ip_mask;
755 params[i]->field_value[2].value.u32 =
756 req->keys[i].key.ipv4_5tuple.dst_ip;
757 params[i]->field_value[2].mask_range.u32 =
758 req->keys[i].key.ipv4_5tuple.dst_ip_mask;
759 params[i]->field_value[3].value.u16 =
760 req->keys[i].key.ipv4_5tuple.src_port_from;
761 params[i]->field_value[3].mask_range.u16 =
762 req->keys[i].key.ipv4_5tuple.src_port_to;
763 params[i]->field_value[4].value.u16 =
764 req->keys[i].key.ipv4_5tuple.dst_port_from;
765 params[i]->field_value[4].mask_range.u16 =
766 req->keys[i].key.ipv4_5tuple.dst_port_to;
770 rsp->status = -1; /* Error */
772 for (i = 0; i < n_keys; i++) {
773 rte_free(entries[i]);
781 rsp->status = rte_pipeline_table_entry_add_bulk(p->p, p->table_id[0],
782 (void *)params, (struct rte_pipeline_table_entry **)entries,
783 n_keys, req->keys_found,
784 (struct rte_pipeline_table_entry **)req->entries_ptr);
786 for (i = 0; i < n_keys; i++) {
787 rte_free(entries[i]);
795 pipeline_firewall_msg_req_del_bulk_handler(struct pipeline *p, void *msg)
797 struct pipeline_firewall_del_bulk_msg_req *req = msg;
798 struct pipeline_firewall_del_bulk_msg_rsp *rsp = msg;
800 struct rte_table_acl_rule_delete_params *params[req->n_keys];
804 n_keys = req->n_keys;
806 for (i = 0; i < n_keys; i++) {
807 params[i] = rte_malloc(NULL,
808 sizeof(struct rte_table_acl_rule_delete_params),
809 RTE_CACHE_LINE_SIZE);
810 if (params[i] == NULL) {
815 switch (req->keys[i].type) {
816 case PIPELINE_FIREWALL_IPV4_5TUPLE:
817 params[i]->field_value[0].value.u8 =
818 req->keys[i].key.ipv4_5tuple.proto;
819 params[i]->field_value[0].mask_range.u8 =
820 req->keys[i].key.ipv4_5tuple.proto_mask;
821 params[i]->field_value[1].value.u32 =
822 req->keys[i].key.ipv4_5tuple.src_ip;
823 params[i]->field_value[1].mask_range.u32 =
824 req->keys[i].key.ipv4_5tuple.src_ip_mask;
825 params[i]->field_value[2].value.u32 =
826 req->keys[i].key.ipv4_5tuple.dst_ip;
827 params[i]->field_value[2].mask_range.u32 =
828 req->keys[i].key.ipv4_5tuple.dst_ip_mask;
829 params[i]->field_value[3].value.u16 =
830 req->keys[i].key.ipv4_5tuple.src_port_from;
831 params[i]->field_value[3].mask_range.u16 =
832 req->keys[i].key.ipv4_5tuple.src_port_to;
833 params[i]->field_value[4].value.u16 =
834 req->keys[i].key.ipv4_5tuple.dst_port_from;
835 params[i]->field_value[4].mask_range.u16 =
836 req->keys[i].key.ipv4_5tuple.dst_port_to;
840 rsp->status = -1; /* Error */
842 for (i = 0; i < n_keys; i++)
849 rsp->status = rte_pipeline_table_entry_delete_bulk(p->p, p->table_id[0],
850 (void **)¶ms, n_keys, req->keys_found, NULL);
852 for (i = 0; i < n_keys; i++)
859 pipeline_firewall_msg_req_add_default_handler(struct pipeline *p, void *msg)
861 struct pipeline_firewall_add_default_msg_req *req = msg;
862 struct pipeline_firewall_add_default_msg_rsp *rsp = msg;
864 struct firewall_table_entry default_entry = {
866 .action = RTE_PIPELINE_ACTION_PORT,
867 {.port_id = p->port_out_id[req->port_id]},
871 rsp->status = rte_pipeline_table_default_entry_add(p->p,
873 (struct rte_pipeline_table_entry *) &default_entry,
874 (struct rte_pipeline_table_entry **) &rsp->entry_ptr);
880 pipeline_firewall_msg_req_del_default_handler(struct pipeline *p, void *msg)
882 struct pipeline_firewall_del_default_msg_rsp *rsp = msg;
884 rsp->status = rte_pipeline_table_default_entry_delete(p->p,
891 struct pipeline_be_ops pipeline_firewall_be_ops = {
892 .f_init = pipeline_firewall_init,
893 .f_free = pipeline_firewall_free,
895 .f_timer = pipeline_firewall_timer,
896 .f_track = pipeline_firewall_track,