25 #include <rte_ethdev.h>
26 #include <rte_ether.h>
37 #define DECAP_MAC_TYPE_IDX 12
38 #define DECAP_IDX_SRC_MAC 6
39 #define DECAP_MARKER_HEADER_SIZE 8
40 #define UDP_DST_PORT_FOR_ESP 4500
64 struct doca_flow_pipe_cfg *pipe_cfg;
67 memset(&match, 0,
sizeof(match));
70 memset(&
fwd, 0,
sizeof(
fwd));
174 uint32_t nb_queues =
app_cfg->dpdk_config->port_config.nb_queues;
177 memset(
fwd, 0,
sizeof(*
fwd));
185 for (i = 0; i < nb_queues - 1; i++)
209 struct doca_flow_port *port,
210 int expected_entries,
211 struct doca_flow_pipe **pipe)
218 struct doca_flow_pipe_cfg *pipe_cfg;
227 memset(&
fwd, 0,
sizeof(
fwd));
229 memset(&match, 0,
sizeof(match));
232 memset(&actions_mask, 0,
sizeof(actions_mask));
289 actions_mask_arr[0] = &actions_mask;
332 memset(&match, 0,
sizeof(match));
435 int num_of_entries = 1;
438 struct doca_flow_pipe_entry **
entry =
NULL;
441 memset(&match, 0,
sizeof(match));
443 memset(&
app_cfg->secured_status[0], 0,
sizeof(
app_cfg->secured_status[0]));
475 if (
app_cfg->secured_status[0].nb_processed != num_of_entries ||
app_cfg->secured_status[0].failure)
492 struct doca_flow_pipe *next_pipe,
500 struct doca_flow_pipe_cfg *pipe_cfg;
503 memset(&match, 0,
sizeof(match));
506 memset(&
fwd, 0,
sizeof(
fwd));
588 struct doca_flow_pipe_cfg *pipe_cfg;
595 memset(&match, 0,
sizeof(match));
622 uint8_t reformat_decap_data[14] = {
725 int num_of_entries = 2;
732 struct doca_flow_pipe_cfg *pipe_cfg;
734 struct doca_flow_pipe_entry *
entry =
NULL;
742 memset(&match, 0,
sizeof(match));
746 memset(&
fwd, 0,
sizeof(
fwd));
747 memset(&
app_cfg->secured_status[0], 0,
sizeof(
app_cfg->secured_status[0]));
759 strcpy(
pipe_info->name,
"MARKER_DECAP_PIPE");
876 if (
app_cfg->secured_status[0].nb_processed != num_of_entries ||
app_cfg->secured_status[0].failure)
893 uint8_t *reformat_data,
894 uint16_t *reformat_data_sz)
896 uint8_t reformat_decap_data[14] = {
928 memcpy(reformat_data, reformat_decap_data,
sizeof(reformat_decap_data));
929 *reformat_data_sz =
sizeof(reformat_decap_data);
943 struct doca_flow_port *port,
950 struct doca_flow_pipe_entry **
entry =
NULL;
953 memset(&match, 0,
sizeof(match));
955 memset(&
app_cfg->secured_status[0], 0,
sizeof(
app_cfg->secured_status[0]));
982 app_cfg->secured_status[0].entries_in_queue += 1;
1008 app_cfg->secured_status[0].entries_in_queue += 1;
1015 }
while (
app_cfg->secured_status[0].entries_in_queue > 0);
1033 struct doca_flow_pipe_cfg *pipe_cfg;
1095 struct doca_flow_pipe_entry **
entry =
NULL;
1107 memset(&match, 0,
sizeof(match));
1109 memset(&
fwd, 0,
sizeof(
fwd));
1111 if (
app_cfg->debug_mode && !is_root) {
1117 DOCA_LOG_ERR(
"Non-ESP marker is not supported over VXLAN encapsulation");
1124 app_cfg->decrypt_pipes.decrypt_ipv4_pipe.pipe;
1174 memset(&match, 0,
sizeof(match));
1179 app_cfg->decrypt_pipes.decrypt_ipv6_pipe.pipe;
1247 memset(&
cfg, 0,
sizeof(
cfg));
1249 cfg.ipsec_sa_cfg.icv_len =
app_cfg->icv_length;
1250 cfg.ipsec_sa_cfg.salt = app_sa_attrs->
salt;
1251 cfg.ipsec_sa_cfg.implicit_iv = app_sa_attrs->
iv;
1252 cfg.ipsec_sa_cfg.key_cfg.key_type = app_sa_attrs->
key_type;
1254 cfg.ipsec_sa_cfg.sn_initial =
app_cfg->sn_initial;
1255 cfg.ipsec_sa_cfg.esn_en = app_sa_attrs->
esn_en;
1273 struct doca_flow_port *port,
1279 struct doca_flow_pipe_entry **
entry =
NULL;
1285 memset(&
app_cfg->secured_status[0], 0,
sizeof(
app_cfg->secured_status[0]));
1286 memset(&match, 0,
sizeof(match));
1298 decrypt_pipe = &
app_cfg->decrypt_pipes.decrypt_ipv4_pipe;
1301 decrypt_pipe = &
app_cfg->decrypt_pipes.decrypt_ipv6_pipe;
1334 app_cfg->secured_status[0].entries_in_queue++;
1355 }
while (
app_cfg->secured_status[0].entries_in_queue > 0);
1362 int i, array_len = nb_rules;
1363 uint32_t *res_array;
1367 res_array = (uint32_t *)malloc(array_len *
sizeof(uint32_t));
1368 if (res_array ==
NULL) {
1373 for (i = 0; i < nb_rules; i++) {
1374 res_array[i] = initial_id + i;
1378 DOCA_LOG_ERR(
"Failed to bind decrypt IDs to the port");
1395 struct doca_flow_pipe_entry **
entry =
NULL;
1397 struct doca_flow_port *secured_port;
1405 int nb_encrypt_rules =
app_cfg->app_rules.nb_encrypt_rules;
1408 secured_port = port->
port;
1414 memset(&decrypt_match, 0,
sizeof(decrypt_match));
1417 for (i = 0; i < nb_rules; i++) {
1458 decrypt_flags = flags;
1517 uint32_t nb_queues =
app_cfg->dpdk_config->port_config.nb_queues;
1520 struct doca_flow_port *secured_port;
1524 int expected_entries;
1526 if (
app_cfg->socket_ctx.socket_conf)
1528 else if (
app_cfg->app_rules.nb_decrypt_rules > 0)
1529 expected_entries =
app_cfg->app_rules.nb_decrypt_rules;
1546 &
app_cfg->decrypt_pipes.bad_syndrome_pipe.pipe);
1563 &
app_cfg->decrypt_pipes.decap_pipe);
1574 &
app_cfg->decrypt_pipes.decrypt_ipv4_pipe);
1584 &
app_cfg->decrypt_pipes.decrypt_ipv6_pipe);
1590 DOCA_LOG_ERR(
"Non-ESP marker is not supported over VXLAN encapsulation");
1595 snprintf(
app_cfg->decrypt_pipes.vxlan_decap_ipv4_pipe.name,
MAX_NAME_LEN,
"vxlan_decap_in_IPv4");
1598 app_cfg->decrypt_pipes.decrypt_ipv4_pipe.pipe,
1599 &
app_cfg->decrypt_pipes.vxlan_decap_ipv4_pipe);
1604 snprintf(
app_cfg->decrypt_pipes.vxlan_decap_ipv6_pipe.name,
MAX_NAME_LEN,
"vxlan_decap_in_IPv6");
1607 app_cfg->decrypt_pipes.decrypt_ipv6_pipe.pipe,
1608 &
app_cfg->decrypt_pipes.vxlan_decap_ipv6_pipe);
1611 }
else if (
app_cfg->marker_encap) {
1614 DOCA_LOG_ERR(
"Failed to create non-ESP marker decap ingress pipe: %s",
1645 struct rte_mbuf **seg_buf,
1646 uint32_t *seg_offset)
1648 uint32_t packet_len, seg_len;
1649 struct rte_mbuf *tmp_buf;
1651 packet_len = mb->pkt_len;
1654 if (offset >= packet_len) {
1660 for (seg_len = rte_pktmbuf_data_len(tmp_buf); seg_len <= offset; seg_len = rte_pktmbuf_data_len(tmp_buf)) {
1661 tmp_buf = tmp_buf->next;
1665 *seg_offset = offset;
1680 struct rte_mbuf *ml;
1681 const struct rte_esp_tail *esp_tail;
1682 uint32_t esp_tail_offset, esp_tail_seg_offset, trailer_len;
1689 trailer_len = icv_len +
sizeof(
struct rte_esp_tail);
1692 esp_tail_offset = (*m)->pkt_len - trailer_len;
1699 esp_tail = rte_pktmbuf_mtod_offset(ml,
const struct rte_esp_tail *, esp_tail_seg_offset);
1700 *next_proto = esp_tail->next_proto;
1701 trailer_len += esp_tail->pad_len;
1702 esp_tail_seg_offset -= esp_tail->pad_len;
1705 (*m)->pkt_len -= trailer_len;
1706 ml->data_len = esp_tail_seg_offset;
1719 uint32_t iv_len = 8;
1720 struct rte_ether_hdr *l2_header;
1721 struct rte_ipv4_hdr *ipv4;
1722 uint32_t proto, l3_len;
1725 uint16_t reformat_decap_data_len;
1734 l2_header = rte_pktmbuf_mtod(*m,
struct rte_ether_hdr *);
1735 if (RTE_ETH_IS_IPV4_HDR((*m)->packet_type)) {
1736 ipv4 = (
void *)(l2_header + 1);
1737 l3_len = rte_ipv4_hdr_len(ipv4);
1739 l3_len =
sizeof(
struct rte_ipv6_hdr);
1743 np = rte_pktmbuf_adj(*m, l3_len +
sizeof(
struct rte_esp_hdr) + iv_len);
1748 l2_header = rte_pktmbuf_mtod(*m,
struct rte_ether_hdr *);
1749 if (proto == IPPROTO_IPV6) {
1757 &reformat_decap_data_len);
1774 uint32_t iv_len = 8;
1775 struct rte_ether_hdr *l2_header;
1777 struct rte_ipv4_hdr *ipv4 =
NULL;
1778 struct rte_ipv6_hdr *ipv6 =
NULL;
1779 uint32_t l2_l3_len, proto;
1789 l2_header = rte_pktmbuf_mtod(*m,
struct rte_ether_hdr *);
1790 if (RTE_ETH_IS_IPV4_HDR((*m)->packet_type)) {
1791 ipv4 = (
void *)(l2_header + 1);
1792 l2_l3_len = rte_ipv4_hdr_len(ipv4) +
sizeof(
struct rte_ether_hdr);
1794 ipv6 = (
void *)(l2_header + 1);
1795 l2_l3_len =
sizeof(
struct rte_ipv6_hdr) + sizeof(struct rte_ether_hdr);
1799 op = rte_pktmbuf_mtod(*m,
char *);
1801 np = rte_pktmbuf_adj(*m,
sizeof(
struct rte_esp_hdr) + iv_len);
1803 np = rte_pktmbuf_adj(*m,
sizeof(
struct rte_esp_hdr) +
sizeof(
struct rte_udp_hdr) + iv_len);
1808 if (RTE_ETH_IS_IPV4_HDR((*m)->packet_type)) {
1809 ipv4->next_proto_id = proto;
1810 ipv4->total_length = rte_cpu_to_be_16((*m)->pkt_len -
sizeof(
struct rte_ether_hdr));
1811 ipv4->hdr_checksum = 0;
1812 ipv4->hdr_checksum = rte_ipv4_cksum(ipv4);
1814 ipv6->proto = proto;
1815 ipv6->payload_len = rte_cpu_to_be_16((*m)->pkt_len -
sizeof(
struct rte_ether_hdr) -
sizeof(*ipv6));
1820 for (i = l2_l3_len - 1; i >= 0; i--)
1835 struct rte_ether_hdr *oh;
1836 struct rte_ipv4_hdr *ipv4;
1837 struct rte_esp_hdr *esp_hdr;
1839 oh = rte_pktmbuf_mtod(m,
struct rte_ether_hdr *);
1840 if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
1841 ipv4 = (
void *)(oh + 1);
1842 l2_l3_len = rte_ipv4_hdr_len(ipv4) +
sizeof(
struct rte_ether_hdr);
1844 l2_l3_len =
sizeof(
struct rte_ipv6_hdr) + sizeof(struct rte_ether_hdr);
1848 l2_l3_len +=
sizeof(
struct rte_udp_hdr);
1850 esp_hdr = rte_pktmbuf_mtod_offset(m,
struct rte_esp_hdr *, l2_l3_len);
1851 *sn = rte_be_to_cpu_32(esp_hdr->seq);
1869 uint32_t diff, beg_win_sn;
1872 uint64_t *bitmap = &state->
bitmap;
1874 beg_win_sn = *end_win_sn + 1 - window_size;
1878 if (sn < beg_win_sn)
1881 if (sn <= *end_win_sn) {
1882 diff = sn - beg_win_sn;
1884 if (*bitmap & (((uint64_t)1) << diff))
1887 *bitmap |= (((uint64_t)1) << diff);
1892 diff = sn - *end_win_sn;
1893 if (diff >= window_size) {
1894 *bitmap = (((uint64_t)1) << (window_size - 1));
1897 *bitmap = (*bitmap >> diff);
1898 *bitmap |= (((uint64_t)1) << (window_size - 1));
1906 bool bad_syndrome_check,
1916 pkt_meta = *RTE_FLOW_DYNF_METADATA(*packet);
1919 if (bad_syndrome_check) {
1923 if (
ctx->config->sw_antireplay) {
1930 anti_replay(sn, &(
ctx->decrypt_rules[rule_idx].antireplay_state), &drop);
1932 DOCA_LOG_WARN(
"Anti Replay mechanism dropped packet- sn: %u, rule index: %d", sn, rule_idx);
void remove_ethernet_padding(struct rte_mbuf **m)
doca_error_t process_entries(struct doca_flow_port *port, struct entries_status *status, int timeout, uint16_t pipe_queue)
void create_hairpin_pipe_fwd(struct ipsec_security_gw_config *app_cfg, int port_id, bool encrypt, uint16_t *rss_queues, uint32_t rss_flags, struct doca_flow_fwd *fwd)
uint32_t get_icv_len_int(enum doca_flow_crypto_icv_len icv_len)
#define DEF_EXPECTED_ENTRIES
#define SET_IP6_ADDR(addr, a, b, c, d)
if(bitoffset % 64+bitlength > 64) result|
doca_error_t ipsec_security_gw_insert_decrypt_rules(struct ipsec_security_gw_ports_map *ports[], struct ipsec_security_gw_config *app_cfg)
static doca_error_t create_control_pipe(struct doca_flow_port *port, bool is_root, bool debug_mode, struct security_gateway_pipe_info *pipe_info)
#define DECAP_IDX_SRC_MAC
static void get_bad_syndrome_pipe_fwd(struct ipsec_security_gw_config *app_cfg, uint16_t *rss_queues, struct doca_flow_fwd *fwd)
doca_error_t bind_decrypt_ids(int nb_rules, int initial_id, struct doca_flow_port *port)
static doca_error_t create_ipsec_decap_pipe(struct doca_flow_port *port, struct ipsec_security_gw_config *app_cfg, struct doca_flow_fwd *fwd, struct security_gateway_pipe_info *pipe_info)
static doca_error_t remove_packet_tail(struct rte_mbuf **m, uint32_t icv_len, uint32_t *next_proto)
static doca_error_t create_ipsec_decrypt_pipe(struct doca_flow_port *port, int expected_entries, enum doca_flow_l3_type l3_type, struct ipsec_security_gw_config *app_cfg, struct security_gateway_pipe_info *pipe_info)
DOCA_LOG_REGISTER(IPSEC_SECURITY_GW::flow_decrypt)
static doca_error_t add_vxlan_decap_pipe_entry(struct doca_flow_port *port, struct security_gateway_pipe_info *pipe, struct ipsec_security_gw_config *app_cfg)
static doca_error_t add_control_pipe_entries(struct security_gateway_pipe_info *control_pipe, struct ipsec_security_gw_config *app_cfg, bool is_root)
#define DECAP_MARKER_HEADER_SIZE
static void get_esp_sn(struct rte_mbuf *m, enum ipsec_security_gw_mode mode, uint32_t *sn)
static doca_error_t mbuf_get_seg_ofs(struct rte_mbuf *mb, uint32_t offset, struct rte_mbuf **seg_buf, uint32_t *seg_offset)
static doca_error_t add_bad_syndrome_pipe_entry(struct doca_flow_pipe *pipe, struct decrypt_rule *rule, uint32_t rule_id, struct entries_status *decrypt_status, enum doca_flow_flags_type flags, int queue_id)
static doca_error_t create_ipsec_decrypt_shared_object(struct ipsec_security_gw_sa_attrs *app_sa_attrs, struct ipsec_security_gw_config *app_cfg, uint32_t ipsec_id)
static doca_error_t create_vxlan_decap_pipe(struct doca_flow_port *port, struct ipsec_security_gw_config *app_cfg, struct doca_flow_pipe *next_pipe, struct security_gateway_pipe_info *pipe)
doca_error_t handle_secured_packets_received(struct rte_mbuf **packet, bool bad_syndrome_check, struct ipsec_security_gw_core_ctx *ctx)
static void anti_replay(uint32_t sn, struct antireplay_state *state, bool *drop)
#define UDP_DST_PORT_FOR_ESP
static void create_tunnel_decap_tunnel(struct doca_flow_header_eth *eth_header, enum doca_flow_l3_type inner_l3_type, uint8_t *reformat_data, uint16_t *reformat_data_sz)
#define DECAP_MAC_TYPE_IDX
static doca_error_t create_marker_decap_pipe(struct doca_flow_port *port, struct ipsec_security_gw_config *app_cfg)
static doca_error_t decap_packet_transport(struct rte_mbuf **m, struct ipsec_security_gw_core_ctx *ctx, bool udp_transport)
static doca_error_t decap_packet_tunnel(struct rte_mbuf **m, struct ipsec_security_gw_core_ctx *ctx)
static doca_error_t create_bad_syndrome_pipe(struct ipsec_security_gw_config *app_cfg, struct doca_flow_port *port, int expected_entries, struct doca_flow_pipe **pipe)
static doca_error_t add_decap_pipe_entries(struct ipsec_security_gw_config *app_cfg, struct doca_flow_port *port, struct doca_flow_header_eth *eth_header, struct security_gateway_pipe_info *pipe)
doca_error_t add_decrypt_entries(struct ipsec_security_gw_config *app_cfg, struct ipsec_security_gw_ports_map *port, uint16_t queue_id, int nb_rules, int rule_offset)
doca_error_t add_decrypt_entry(struct decrypt_rule *rule, int rule_id, struct doca_flow_port *port, struct ipsec_security_gw_config *app_cfg)
static doca_error_t destroy_pipe_cfg(struct doca_flow_pipe_cfg *cfg)
static struct doca_flow_fwd fwd_miss
static uint16_t * rss_queues
static struct doca_flow_actions actions
static struct doca_flow_monitor monitor
static struct doca_flow_fwd fwd
static struct doca_flow_match match_mask
static struct doca_flow_pipe_entry * entry[MAX_ENTRIES]
#define DEFAULT_TIMEOUT_US
static struct app_gpu_cfg app_cfg
enum doca_error doca_error_t
DOCA API return codes.
DOCA_STABLE const char * doca_error_get_descr(doca_error_t error)
Returns the description string of an error code.
@ DOCA_ERROR_INVALID_VALUE
@ DOCA_ERROR_NOT_SUPPORTED
DOCA_EXPERIMENTAL doca_error_t doca_flow_crypto_ipsec_update_sn(uint32_t shared_res_id, uint64_t sequence_number)
Update the sequence number state for specific resource.
@ DOCA_FLOW_CRYPTO_SN_OFFLOAD_AR
@ DOCA_FLOW_CRYPTO_REPLAY_WIN_SIZE_128
@ DOCA_FLOW_CRYPTO_HEADER_UDP_ESP_OVER_IPV4
@ DOCA_FLOW_CRYPTO_HEADER_NON_ESP_MARKER
@ DOCA_FLOW_CRYPTO_HEADER_ESP_OVER_IPV4
@ DOCA_FLOW_CRYPTO_HEADER_ESP_TUNNEL
@ DOCA_FLOW_CRYPTO_RESOURCE_IPSEC_SA
@ DOCA_FLOW_CRYPTO_REFORMAT_DECAP
@ DOCA_FLOW_CRYPTO_ACTION_DECRYPT
doca_flow_l3_type
doca flow layer 3 packet type
#define DOCA_FLOW_ETHER_TYPE_IPV6
#define DOCA_FLOW_ETHER_TYPE_IPV4
@ DOCA_FLOW_L4_TYPE_EXT_UDP
@ DOCA_FLOW_TUN_EXT_VXLAN_STANDARD
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_destroy(struct doca_flow_pipe_cfg *cfg)
Destroy DOCA Flow pipe configuration struct.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_create(struct doca_flow_pipe_cfg **cfg, struct doca_flow_port *port)
Create DOCA Flow pipe configuration struct.
DOCA_STABLE doca_error_t doca_flow_entries_process(struct doca_flow_port *port, uint16_t pipe_queue, uint64_t timeout, uint32_t max_processed_entries)
Process entries in queue.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_name(struct doca_flow_pipe_cfg *cfg, const char *name)
Set pipe's name.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_match(struct doca_flow_pipe_cfg *cfg, const struct doca_flow_match *match, const struct doca_flow_match *match_mask)
Set pipe's match and match mask.
DOCA_STABLE doca_error_t doca_flow_shared_resources_bind(enum doca_flow_shared_resource_type type, uint32_t *res_array, uint32_t res_array_len, void *bindable_obj)
Binds a bulk of shared resources to a bindable object.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_control_add_entry(uint16_t pipe_queue, uint32_t priority, struct doca_flow_pipe *pipe, const struct doca_flow_match *match, const struct doca_flow_match *match_mask, const struct doca_flow_match_condition *condition, const struct doca_flow_actions *actions, const struct doca_flow_actions *actions_mask, const struct doca_flow_action_descs *action_descs, const struct doca_flow_monitor *monitor, const struct doca_flow_fwd *fwd, void *usr_ctx, struct doca_flow_pipe_entry **entry)
Add one new entry to a control pipe.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_is_root(struct doca_flow_pipe_cfg *cfg, bool is_root)
Set if pipe is root or not.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_create(const struct doca_flow_pipe_cfg *cfg, const struct doca_flow_fwd *fwd, const struct doca_flow_fwd *fwd_miss, struct doca_flow_pipe **pipe)
Create one new pipe.
doca_flow_l3_meta
doca flow l3 valid type for parser meta
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_type(struct doca_flow_pipe_cfg *cfg, enum doca_flow_pipe_type type)
Set pipe's type.
doca_flow_flags_type
doca flow flags type
DOCA_EXPERIMENTAL doca_error_t doca_flow_shared_resource_set_cfg(enum doca_flow_shared_resource_type type, uint32_t id, struct doca_flow_shared_resource_cfg *cfg)
Configure a single shared resource.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_actions(struct doca_flow_pipe_cfg *cfg, struct doca_flow_actions *const *actions, struct doca_flow_actions *const *actions_masks, struct doca_flow_action_descs *const *action_descs, size_t nr_actions)
Set pipe's actions, actions mask and actions descriptor.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_monitor(struct doca_flow_pipe_cfg *cfg, const struct doca_flow_monitor *monitor)
Set pipe's monitor.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_add_entry(uint16_t pipe_queue, struct doca_flow_pipe *pipe, const struct doca_flow_match *match, const struct doca_flow_actions *actions, const struct doca_flow_monitor *monitor, const struct doca_flow_fwd *fwd, uint32_t flags, void *usr_ctx, struct doca_flow_pipe_entry **entry)
Add one new entry to a pipe.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_nr_entries(struct doca_flow_pipe_cfg *cfg, uint32_t nr_entries)
Set pipe's maximum number of flow rules.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_dir_info(struct doca_flow_pipe_cfg *cfg, enum doca_flow_direction_info dir_info)
Set pipe's Direction info.
doca_flow_l4_meta
doca flow l4 valid type for parser meta
DOCA_STABLE struct doca_flow_port * doca_flow_port_switch_get(const struct doca_flow_port *port)
Get doca flow switch port.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_domain(struct doca_flow_pipe_cfg *cfg, enum doca_flow_pipe_domain domain)
Set pipe's domain.
@ DOCA_FLOW_SHARED_RESOURCE_IPSEC_SA
@ DOCA_FLOW_DIRECTION_NETWORK_TO_HOST
@ DOCA_FLOW_WAIT_FOR_BATCH
@ DOCA_FLOW_RESOURCE_TYPE_NON_SHARED
@ DOCA_FLOW_PIPE_DOMAIN_SECURE_INGRESS
#define DOCA_LOG_ERR(format,...)
Generates an ERROR application log message.
#define DOCA_LOG_WARN(format,...)
Generates a WARNING application log message.
#define DOCA_LOG_DBG(format,...)
Generates a DEBUG application log message.
const struct ip_frag_config * cfg
@ IPSEC_SECURITY_GW_FWD_SYNDROME_RSS
@ IPSEC_SECURITY_GW_UDP_TRANSPORT
@ IPSEC_SECURITY_GW_TUNNEL
@ IPSEC_SECURITY_GW_TRANSPORT
@ IPSEC_SECURITY_GW_SWITCH
@ IPSEC_SECURITY_GW_ESP_OFFLOAD_DECAP
@ IPSEC_SECURITY_GW_ESP_OFFLOAD_BOTH
struct doca_flow_pipe_entry * entry
struct security_gateway_pipe_info decrypt_ipv4_pipe
struct security_gateway_pipe_info decrypt_ipv6_pipe
struct security_gateway_pipe_info bad_syndrome_pipe
enum doca_flow_l3_type inner_l3_type
enum doca_flow_l3_type l3_type
struct ipsec_security_gw_sa_attrs sa_attrs
struct bad_syndrome_entry entries[NUM_OF_SYNDROMES]
doca flow actions information
struct doca_flow_crypto_encap_action crypto_encap
struct doca_flow_meta meta
enum doca_flow_resource_type decap_type
struct doca_flow_crypto_action crypto
struct doca_flow_resource_decap_cfg decap_cfg
struct doca_flow_crypto_action::@73::@75 ipsec_sa
enum doca_flow_crypto_action_type action_type
enum doca_flow_crypto_resource_type resource_type
enum doca_flow_crypto_encap_action_type action_type
enum doca_flow_crypto_encap_net_type net_type
uint8_t encap_data[DOCA_FLOW_CRYPTO_HEADER_LEN_MAX]
struct doca_flow_pipe * next_pipe
enum doca_flow_fwd_type type
enum doca_flow_resource_type rss_type
struct doca_flow_resource_rss_cfg rss
doca flow matcher information
struct doca_flow_header_format inner
struct doca_flow_parser_meta parser_meta
struct doca_flow_header_format outer
struct doca_flow_meta meta
doca monitor action configuration
enum doca_flow_resource_type counter_type
doca flow shared resource configuration
enum doca_flow_tun_type type
enum doca_flow_tun_ext_vxlan_type vxlan_type
user context struct that will be used in entries process callback
struct doca_flow_port * port
uint32_t lifetime_threshold
uint8_t enc_key_data[MAX_KEY_LEN]
enum doca_flow_crypto_key_type key_type
struct doca_flow_pipe * pipe
char name[MAX_NAME_LEN+1]
struct doca_flow_pipe_entry * entry
struct doca_flow_pipe * pipe
struct security_gateway_entry_info * entries_info
struct doca_flow_port * ports[UPF_ACCEL_PORTS_MAX]
static struct doca_flow_port * ports[FLOW_SWITCH_PORTS_MAX]
struct upf_accel_ctx * ctx